# OCR

An image URL in, the text it carries out — receipts, signs, documents, ten languages.

- Method: `GET`
- Path: `/v1/dev/ocr`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `image_url` | string | required | A public URL to the image. |
| `language` | string | optional | `eng`, `ara`, `idn`, `chs`, `jpn`, `kor`, `fre`, `ger`, `spa`, or `rus`. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/dev/ocr \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "imageUrl": "https://example.com/receipt.jpg",
    "language": "eng",
    "engineUsed": 2,
    "text": "TOTAL Rp 45.000\nTERIMA KASIH",
    "lines": [
      { "text": "TOTAL Rp 45.000", "confidencePct": 94.5 },
      { "text": "TERIMA KASIH", "confidencePct": 91.2 }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-22T04:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-23T04:05:00.000Z"
  }
}
```