Ocr Extract Blocks
POST
/ocr/extract_blocks
const url = 'https://example.com/ocr/extract_blocks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"image":"example","model":"example","variant":"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_blocks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "image": "example", "model": "example", "variant": "example" }'Submit an OCR spatial-blocks job and return immediately with a task_id.
Returns per-block text with bounding boxes and confidence scores. Only supported by models with spatial grounding: deepseek-ocr2, paddleocr-vl. Poll GET /ocr/blocks/{task_id} for the result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
OCRBlocksRequest
object
Examplegenerated
{ "image": "example", "model": "example", "variant": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
OCRBlocksSubmission
object
task_id
required
Task Id
Celery task ID for tracking the OCR blocks job
string
status
Status
Initial status of the task
string
Example
{ "status": "queued"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}