API documentation
Production reference for Textora's REST surface. For a quickstart narrative see the API landing page.
export API="https://textora.site" export TEXTORA_KEY="txo_..." curl -X POST "$API/api/v1/ocr/jobs" \ -H "Authorization: Bearer $TEXTORA_KEY" \ -F "[email protected]" \ -F "language=eng" \ -F "output_format=txt,json"
Base URL
Production API root: `https://textora.site`. Session routes: `https://textora.site/api/...`. Versioned public API: `https://textora.site/api/v1/...`. Machine-readable spec: `GET https://textora.site/api/v1/openapi.json`.
Authentication
Browser apps use the `textora_session` HTTP-only cookie with `credentials: include`. Server-to-server calls use a Textora API key (`txo_...`) via `Authorization: Bearer <key>` or `X-API-Key`. Create keys in the developer dashboard (Pro+).
POST /api/v1/ocr/jobs
Multipart: `file` (required), `language`, `output_format`. Optional header `Idempotency-Key`. Returns `202` with `{ id, status, created_at, status_url }`.
POST /api/v1/ocr/batch
Multipart field `files` (up to 20). Requires Pro+ batch entitlement. Returns `202` with `{ jobs[] }`.
GET /api/v1/ocr/jobs/:id
Poll job status. Lifecycle: `PENDING` → `QUEUED` → `PROCESSING` → `GENERATING_OUTPUT` → `COMPLETED` | `FAILED` | `CANCELED`.
GET /api/v1/ocr/jobs/:id/result
Returns the OCR result when `COMPLETED`. Otherwise `409` with code `result_not_ready`.
DELETE /api/v1/ocr/jobs/:id
Deletes the job and associated stored files.
GET|POST|DELETE /api/v1/webhooks
Webhook CRUD (Business+). Create body: `{ url, events[] }`. Canonical events: `job.completed`, `job.failed`. Signing secret is returned once. Deliveries include `X-Textora-Signature: t=<unix>,v1=<hmac-sha256>`.
GET /api/v1/usage · GET /api/v1/account
Credit balance and plan metadata for the API key’s organization.
Session routes (cookie auth)
`POST /api/auth/register|login|logout`, `GET /api/auth/me`, `POST /api/ocr/jobs`, developer key routes under `/api/developer/*`, billing under `/api/billing/*`.
GET /api/health
Liveness and database reachability.