Skip to main content

Base URL

https://api.okrapdf.com
The Mintlify API reference is backed by the live OpenAPI 3.1 spec from https://api.okrapdf.com/openapi.json (version 1.14.0).

Authentication

Use a Bearer token for authenticated endpoints:
Authorization: Bearer okra_sk_YOUR_KEY
Secret keys use the okra_sk_ prefix. Browser-facing publishable keys use okra_pk_. Create and rotate keys in app.okrapdf.com/settings.

First request

curl -X POST https://api.okrapdf.com/v1/documents \
  -H "Authorization: Bearer $OKRA_API_KEY" \
  -F "file=@report.pdf"
Response:
{
  "id": "doc-abc123",
  "status": "queued"
}

Current surfaces

SurfaceEndpoint familyUse it for
Files/v1/filesStore passive private PDF assets before running a workflow or hosting.
Documents/v1/documentsUpload, parse, read markdown/pages/entities, chat, and manage document config.
Host/v1/hostPublish clean *.okrapdf.dev PDF deployments from files or documents.
Conversions/v1/conversionsOne-call file conversion flows such as image to hosted PDF.
MCP/mcpRemote agent tools and visual MCP Apps.
Workflows/v1/workflows, /v1/runsBuilt-in document workflows and private-beta dynamic agent workflows.
Collections/v1/collectionsGroup documents and run multi-document queries or exports.
Agents/v1/agentsRegister and run reusable JSON-configured document agents.

Common document endpoints

MethodPathDescription
POST/v1/documentsUpload a document with multipart form data.
GET/v1/documents/{id}Get document status and metadata.
GET/v1/documents/{id}/full.mdRead the full document as markdown.
GET/v1/documents/{id}/pages/{page_number}/image.pngRender a page image.
GET/v1/documents/{id}/entities/tablesList extracted tables.
POST/v1/documents/{id}/structured-outputExtract JSON using a schema.
POST/v1/documents/{id}/chat/completionsAsk questions using the OpenAI-compatible chat shape.

Errors

Errors use a structured JSON envelope:
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Human-readable description of the problem"
  }
}
See Errors for common codes and retry behavior.