Ocr Extract
const url = 'https://example.com/ocr/extract';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"image":"example","model":"example","variant":"example","output_format":"text","task":"ocr","source_lang":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/ocr/extract \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "image": "example", "model": "example", "variant": "example", "output_format": "text", "task": "ocr", "source_lang": "example" }'Submit an OCR job and return immediately with a task_id.
The Celery worker handles model warmup (dispatcher pattern) and calls the ACA /ocr endpoint. Poll GET /ocr/{task_id} for the result.
Supported models: deepseek-ocr2 — A100, general-purpose high-quality OCR paddleocr-vl — T4, fast 0.9B, supports table/formula/chart tasks numarkdown-8b — T4, markdown-optimised document extraction managed-model — T4 FP8, 32-language multilingual OCR with reasoning translategemma — A100 (existing deployment), image text extraction
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Base64-encoded image (JPEG, PNG, or PDF page)
Registered model name: deepseek-ocr2 | paddleocr-vl | numarkdown | managed-model | translategemma
Output format: ‘text’ or ‘markdown’
Task type — ‘table’/‘formula’/‘chart’ only supported by paddleocr-vl
Responses
Section titled “Responses”Successful Response
object
Celery task ID for tracking the OCR job
Initial status of the task
Example
{ "status": "queued"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}