IronStratum

POST /v1/ocr/jobs

Enqueue an async OCR job (long-processing documents)

Specialty route (route_type: ocr): the async-job variant for long-PROCESSING documents (the ~100 s edge wall) — never bigger bodies (the 25 MiB ONE cap applies identically; over-cap payloads are client-chunked into page-range jobs). Same multipart contract and §3 gate as /v1/ocr. The create body forwards byte-identical; the answer is the model's 202 {job_id}. NOTHING meters at create — the work has not happened; metering lands exactly once at the done-observing status read.

Request

The body is multipart/form-data — one part per field below; the sample sends it with curl -F legs (curl owns the boundary — no Content-Type header).

Request body fields for ocrJobCreate
Field Type Required Description
file string (binary) yes The document (≤ 25 MiB).
model string yes An IronStratum alias whose route_type is ocr.
mode string enum no —
diplomatic string enum no —
language string no —

Responses

400 400

400 response fields for ocrJobCreate
Field Type Required Description
error object yes —

401 401

401 response fields for ocrJobCreate
Field Type Required Description
error object yes —

402 402

402 response fields for ocrJobCreate
Field Type Required Description
error object yes —

403 403

403 response fields for ocrJobCreate
Field Type Required Description
error object yes —

404 404

404 response fields for ocrJobCreate
Field Type Required Description
error object yes —

413 413

413 response fields for ocrJobCreate
Field Type Required Description
error object yes —

500 500

500 response fields for ocrJobCreate
Field Type Required Description
error object yes —

502 502

502 response fields for ocrJobCreate
Field Type Required Description
error object yes —

503 503

503 response fields for ocrJobCreate
Field Type Required Description
error object yes —

Status codes

  • 200 — The enqueue answer verbatim (202-class: {job_id}); poll GET /v1/ocr/jobs/{id}?model=... for status.

Example

curl -X POST https://api.ironstratum.com/v1/ocr/jobs \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -F file=@<file>
  -F model=<model>

All operations · interactive reference · openapi.yaml