Base URL
https://api.okrapdf.com/openapi.json (version 1.14.0).
Authentication
Use a Bearer token for authenticated endpoints:okra_sk_ prefix. Browser-facing publishable keys use okra_pk_. Create and rotate keys in app.okrapdf.com/settings.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Upload, host, extract, and query PDFs with the Okra API.
https://api.okrapdf.com
https://api.okrapdf.com/openapi.json (version 1.14.0).
Authorization: Bearer okra_sk_YOUR_KEY
okra_sk_ prefix. Browser-facing publishable keys use okra_pk_. Create and rotate keys in app.okrapdf.com/settings.
curl -X POST https://api.okrapdf.com/v1/documents \
-H "Authorization: Bearer $OKRA_API_KEY" \
-F "file=@report.pdf"
{
"id": "doc-abc123",
"status": "queued"
}
| Surface | Endpoint family | Use it for |
|---|---|---|
| Files | /v1/files | Store passive private PDF assets before running a workflow or hosting. |
| Documents | /v1/documents | Upload, parse, read markdown/pages/entities, chat, and manage document config. |
| Host | /v1/host | Publish clean *.okrapdf.dev PDF deployments from files or documents. |
| Conversions | /v1/conversions | One-call file conversion flows such as image to hosted PDF. |
| MCP | /mcp | Remote agent tools and visual MCP Apps. |
| Workflows | /v1/workflows, /v1/runs | Built-in document workflows and private-beta dynamic agent workflows. |
| Collections | /v1/collections | Group documents and run multi-document queries or exports. |
| Agents | /v1/agents | Register and run reusable JSON-configured document agents. |
| Method | Path | Description |
|---|---|---|
| POST | /v1/documents | Upload a document with multipart form data. |
| GET | /v1/documents/{id} | Get document status and metadata. |
| GET | /v1/documents/{id}/full.md | Read the full document as markdown. |
| GET | /v1/documents/{id}/pages/{page_number}/image.png | Render a page image. |
| GET | /v1/documents/{id}/entities/tables | List extracted tables. |
| POST | /v1/documents/{id}/structured-output | Extract JSON using a schema. |
| POST | /v1/documents/{id}/chat/completions | Ask questions using the OpenAI-compatible chat shape. |
{
"error": {
"code": "BAD_REQUEST",
"message": "Human-readable description of the problem"
}
}