# Introduction

Kaptra exposes a CapSolver-compatible REST API. Every call is `POST` with a JSON body. **HTTP status is always 200**; success and failure live in `errorId` (`0` or `1`) and `errorCode`.

## Authentication

Put `clientKey` in the JSON body. Do not send an Authorization header.

## Sync vs poll

- Some types (today: `AntiAwsWafTask`) return `status=ready` from `/createTask`.
- Everything else is async: `/createTask` returns `status=processing` and a `taskId`. Poll `/getTaskResult` every 1–2 seconds, at most 120 times.

## Minimal example

```json
POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ImageToTextTask",
    "body": "BASE64_ENCODED_IMAGE"
  }
}
```

Source: https://kaptra.ai/docs/quick-start/introduction
