# Get a synthesis job

`GET https://my.neuronai.uz/api/v1/tts/jobs/{id}`

API maʼlumotnomasi › Matnni ovozga aylantirish

Returns a synthesis job and its status: `queued`, `running`, `succeeded` or `failed`.

A job that has succeeded carries its cost and `audio_url`; one that has failed carries an `error`. A failed job is never charged.

**Authentication:** `Authorization: Bearer <API key>`, a key with `tts:read`.

## Yoʻl parametrlari

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The job id returned when the job was created. |

## Javob (200, `application/json`)

The job under `data`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | Yes |  |
| `data.id` | string | Yes |  |
| `data.status` | string | Yes | One of `queued`, `running`, `succeeded`, `failed`. |
| `data.created_at` | string | Yes |  |
| `data.started_at` | string \| null | Yes | When a worker started on the job, or `null` while it is queued. |
| `data.finished_at` | string \| null | Yes | When the job succeeded or failed, or `null` until then. |
| `data.character_count` | integer | Yes |  |
| `data.cost` | number \| null | Yes |  |
| `data.balance_after` | number \| null | Yes |  |
| `data.voice_custom` | boolean | Yes |  |
| `data.latency_ms` | number \| null | Yes |  |
| `data.error` | object \| null | Yes | Why the job failed, set only once it has `failed`. `code` is `insufficient_balance`, `voice_unavailable`, `synthesis_failed`, `storage_failed` or `queue_timeout`. |
| `data.error.code` | string | Yes |  |
| `data.error.message` | string | Yes |  |
| `data.audio_url` | string \| null | Yes |  |
| `request_id` | string | Yes |  |

```json
{
  "data": {
    "id": "7c4a8d09-ca37-4f3c-9e2b-1b0f3c2a9d41",
    "status": "queued",
    "created_at": "2026-11-17T09:30:00Z",
    "started_at": "2026-11-17T09:30:00Z",
    "finished_at": "2026-11-17T09:30:00Z",
    "character_count": 42,
    "cost": 12.6,
    "balance_after": 987.4,
    "voice_custom": true,
    "latency_ms": 840,
    "error": {
      "code": "string",
      "message": "string"
    },
    "audio_url": "https://my.neuronai.uz/api/v1/tts/jobs/7c4a8d09-ca37-4f3c-9e2b-1b0f3c2a9d41/audio"
  },
  "request_id": "7c4a8d09-ca37-4f3c-9e2b-1b0f3c2a9d41"
}
```

### Sarlavhalar

| Header | Type | Description |
| --- | --- | --- |
| `X-Request-Id` | string | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
| `X-RateLimit-Limit` | integer | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
| `X-RateLimit-Remaining` | integer | How many of them are left this minute. |

## Xatolar

Every error has the same JSON shape:

```json
{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_request",
    "message": "The request is malformed or failed validation.",
    "param": null
  },
  "request_id": "7c4a8d09-ca37-4f3c-9e2b-1b0f3c2a9d41"
}
```

| Status | Meaning |
| --- | --- |
| 401 | The API key is missing or not recognized (`invalid_api_key`), revoked (`api_key_revoked`), disabled (`api_key_disabled`) or expired (`api_key_expired`). |
| 403 | The key lacks the permission this endpoint needs (`insufficient_permissions`), or the client IP is not in its allowlist (`ip_not_allowed`). |
| 404 | No such job in your organization: `not_found`. |
| 429 | A rate or concurrency limit was reached (`rate_limit_exceeded`, `concurrency_limit_exceeded`). Retry after `Retry-After` seconds. |
| default | Any other error, in the same shape, such as `server_error` (500) or `service_unavailable` (503). |

## Examples

### TypeScript SDK

```typescript
import {NeuronAI} from "@naiuz/sdk";

const client = new NeuronAI();

const job = await client.tts.jobs.retrieve("<job-id>");

console.log(job.status);
```

### Python SDK

```python
from naiuz import NeuronAI

client = NeuronAI()

job = client.tts.jobs.retrieve("<job-id>")

print(job.status)
```

### PHP SDK

```php
$client = new \Naiuz\NeuronAI();

$job = $client->tts->jobs->retrieve('<job-id>');

echo $job->status, PHP_EOL;
```

---

Source: https://docs.neuronai.uz/uz/api/reference/text-to-speech/retrieve-tts-job
