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": "lazy"
  }'

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: none, cover (default — page 1 only), or lazy (render on demand).
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": "lazy"
  }'

Response (202)

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