Reference
API reference
Every endpoint, header, and error code in one place. For a walkthrough that goes zero-to-JSON in 60 seconds, start with the Quickstart.
Base URL
https://api.ocrqueen.comAll endpoints are versioned under /v1. The current stable version is v1; breaking changes ship under a new prefix and old versions keep working.
Authentication
Every request carries an API key in the Authorization header:
Authorization: Bearer pk_live_xxxKeys come in two flavours: pk_test_* (free, never billed, marked test_mode in usage logs) and pk_live_* (billed at the rate of the profile used). Generate keys in the dashboard; the plaintext is shown exactly once and is unrecoverable after.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /v1/extract | Submit a document for extraction |
GET | /v1/jobs/{id} | Poll a job, fetch the result |
DELETE | /v1/jobs/{id} | Cancel a queued or processing job |
Webhook deliveries are a server-to-server payload contract, not an inbound endpoint — documented separately.
Request & response formats
POST /v1/extract is multipart/form-data because it carries a file. Every other endpoint takes/returns JSON. All response bodies are UTF-8 JSON unless explicitly noted.
Rate limits
Limits are per API key per minute (fixed window) and are enforced before the upload body is read so a 429 saves you bandwidth. Each successful response includes:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 23
X-Usage-Pages-This-Month: 184
X-Usage-Pages-Limit: unlimitedReset is seconds until the current window resets, not an epoch timestamp. Pages-Limit is "unlimited" for paid plans and a number (e.g. "200") on free. On a 429 the body carries RATE_LIMITED; back off and retry —Idempotency-Key (if you sent one) protects you against double extraction.
Versioning
Additive changes (new fields, new optional headers, new endpoints) ship under /v1 without notice. Breaking changes — removing fields, tightening types, changing semantics — only ship under a new prefix (/v2). Subscribe to changelog entries from the dashboard if you want a heads-up.
Next
- POST /v1/extract — every parameter, every header, sync vs async, idempotency.
- GET /v1/jobs/{id} — poll loop, response shape, terminal statuses.
- Webhook deliveries — payload shape, HMAC signature verification, retry schedule.
- Errors — every error code you can hit and how to recover.
