Skip to main content
POST
/
api
/
v1
/
extract
cURL
curl -X POST https://app.okrapdf.com/api/v1/extract \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/report.pdf"}'
{
  "job_id": "ocr-abc123def456",
  "status": "queued",
  "poll_url": "/api/v1/jobs/ocr-abc123def456",
  "results_url": "/api/v1/jobs/ocr-abc123def456/results",
  "filename": "<string>",
  "viewer_url": "https://app.okrapdf.com/ocr/ocr-abc123def456"
}
Use this endpoint for large documents or batch processing. It returns immediately with a job ID — poll /api/v1/jobs/{id} for progress and /api/v1/jobs/{id}/results for results. No page limit.For small documents (<10 pages) where you want results inline, use the sync endpoint instead.

Authorizations

Authorization
string
header
required

API key as Bearer token: Authorization: Bearer okra_xxx

Body

application/json
url
string<uri>

URL to fetch PDF from

file_base64
string

Base64-encoded PDF content

gcs_path
string

GCS path for pre-uploaded files (via signed URL upload)

filename
string

Required when using file_base64 or gcs_path

webhook_url
string<uri>

URL to POST when job completes

options
object

Response

Job created

job_id
string
required
Example:

"ocr-abc123def456"

status
enum<string>
required
Available options:
queued
poll_url
string
required
Example:

"/api/v1/jobs/ocr-abc123def456"

results_url
string
required
Example:

"/api/v1/jobs/ocr-abc123def456/results"

filename
string
viewer_url
string

URL to view the document in the OkraPDF web viewer

Example:

"https://app.okrapdf.com/ocr/ocr-abc123def456"