# ImageToTextTask

OCR a single image into text.

## Task type

`ImageToTextTask`

## Sync or poll

Async — poll `/getTaskResult`

## Parameters

| Field | Type | Required | Notes |
|---|---|---|---|
| `type` | string | yes | `ImageToTextTask` |
| `body` | string | yes | Base64 image; `data:image/...;base64,` prefix allowed |

## Minimal request

```json
{
  "clientKey": "YOUR_API_KEY",
  "task": {"type":"ImageToTextTask","body":"BASE64_IMAGE"}
}
```

## Success solution

```json
{"text":"abc123"}
```

## Typical failures

`ERROR_CAPTCHA_UNSOLVABLE`, `ERROR_BAD_REQUEST`, `ERROR_TASK_NOT_SUPPORTED`

Source: https://kaptra.ai/docs/task-types/image-to-text
