# Generate alt text

> Queues a description of an image, written to be read aloud. Returns a task; the text arrives on its result.

`POST /image/alt`

**Auth:** API key or OAuth token

## Request body

- `url` (required, string)

## Response

### 201 — Image alt text task created

- `data` (required, object)
  - `estimatedCost` (required, string) — Estimated cost in USD reserved for this task. Failed tasks are not charged. Example `"0.0002"`.
  - `taskId` (required, string) — Task ID Example `"tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"`.

```json
{
  "data": {
    "estimatedCost": "0.0002",
    "taskId": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"
  }
}
```

### 400 — Validation Error

- `success` (required, false)
- `error` (required, array)
- `data` (required, any)

```json
{
  "success": false,
  "error": []
}
```

## Request samples

### cURL

```bash
curl -X POST https://api.mynth.io/image/alt \
  -H "Authorization: Bearer $MYNTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "string"
  }'
```

### JavaScript

```ts
const response = await fetch("https://api.mynth.io/image/alt", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MYNTH_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "string"
  }),
});

const { data } = await response.json();
```

The full schema for this endpoint is in the [OpenAPI document](https://api.mynth.io/openapi.json).
