Get Ocr Blocks Status
GET
/ocr/blocks/{task_id}
const url = 'https://example.com/ocr/blocks/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/ocr/blocks/example \ --header 'Authorization: Bearer <token>'Poll the status of an OCR blocks job submitted via POST /ocr/extract_blocks.
Returns: status=pending — queued, waiting for worker status=started — worker is processing (warmup or active inference) status=completed — text_blocks is populated status=failed — error contains failure details
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”task_id
required
Task Id
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
OCRBlocksStatus
object
task_id
required
Task Id
Celery task ID
string
status
required
Status
Task status: pending, started, completed, failed
string
text_blocks
Any of:
Array<object>
TextBlockobject
text
required
Text
Extracted text content of the block
string
bbox
required
Bbox
Bounding box [x, y, width, height] in pixels
Array<number>
confidence
required
Confidence
Confidence score (0–1)
number
null
Examplegenerated
{ "task_id": "example", "status": "example", "text_blocks": [ { "text": "example", "bbox": [ 1 ], "confidence": 1 } ], "model_used": "example", "processing_time_ms": 1, "error": "example"}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": {} } ]}