Skip to main content
POST
/
v1
/
documents
/
{id}
/
upload-url
curl -X POST https://api.okrapdf.com/v1/documents/doc-abc123/upload-url \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/report.pdf",
    "page_images": "eager"
  }'

Documentation Index

Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Provide a publicly accessible URL and OkraPDF will fetch and process the PDF. This is the easiest upload method when your file is already hosted somewhere (S3, GCS, public link).

Request

id
string
required
Document ID (e.g. doc-abc123) or 6-char short hash.
url
string
required
Public URL of the PDF to ingest.
page_images
string
Page image rendering strategy: eager (default, render all pages), cover (page 1 only), or none. lazy is accepted as a deprecated alias for eager.
capabilities
string
Comma-separated capability flags.
curl -X POST https://api.okrapdf.com/v1/documents/doc-abc123/upload-url \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/report.pdf",
    "page_images": "eager"
  }'

Response (202)

{
  "id": "doc-abc123",
  "phase": "uploading",
  "status_url": "https://api.okrapdf.com/v1/documents/doc-abc123"
}