API reference
Extract text
Read text out of a scan, photo or screenshot, with per-word confidence.
POST /v1/ocr/extract1 operation per image
The programmatic form of Read text in the dashboard — same models, same allowance.
Request
multipart/form-data, with your key as a bearer token.
| Field | Type | Default | Description |
|---|---|---|---|
| imagerequired | file | — | JPEG, PNG or WebP. |
| language | string | en | ISO 639-1 language hint. Only the first two characters are used. |
Example
curl -X POST https://api.quantilence.com/v1/ocr/extract \
-H "Authorization: Bearer $QUANTILENCE_API_KEY" \
-F "image=@photo.jpg" \
-F "language=en"Response
200 OK with this shape. Values below are illustrative; the keys and types are not.
{
"success": true,
"full_text": "INVOICE\nAcme Ltd\nTotal: $1,240.00",
"blocks": [
{
"block_id": 1,
"text": "INVOICE",
"confidence": 0.976,
"words": [
{
"text": "INVOICE",
"confidence": 0.976,
"bbox": [
0.081,
0.052,
0.243,
0.094
]
}
]
}
],
"language": "en",
"processing_time_ms": 412.7
}| Field | Type | Description |
|---|---|---|
| success | boolean | Always true on a 200. |
| full_text | string | Every block joined with newlines. |
| blocks | Block[] | Text grouped as the page lays it out. |
| blocks[].block_id | integer | Stable within one response. |
| blocks[].text | string | The block's words, space-joined. |
| blocks[].confidence | float | Mean word confidence, 0–1. |
| blocks[].words | Word[] | Individual words with boxes. |
| blocks[].words[].text | string | One word. |
| blocks[].words[].confidence | float | 0–1. |
| blocks[].words[].bbox | float[4] | [x1, y1, x2, y2], normalised 0–1 against the image. |
| language | string | The hint that was applied. |
| processing_time_ms | float | Model time, excluding transfer. |
Worth knowing
- Boxes are normalised 0–1, so they map onto any rendered size by multiplying by width and height.
- A page with no readable text returns 200 with an empty `blocks` array, not an error.