> ## Documentation Index
> Fetch the complete documentation index at: https://docs.destined.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for all Destined Voice API endpoints

## Base URL

```
https://api.destined.ai
```

## Authentication

Most endpoints require Bearer token authentication:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Response Format

All responses are JSON with this structure:

```json theme={null}
{
  "data": { ... },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}
```

## Error Format

```json theme={null}
{
  "detail": "Error message here",
  "status_code": 400,
  "request_id": "req_abc123"
}
```

## Status Codes

| Code  | Description                             |
| ----- | --------------------------------------- |
| `200` | Success                                 |
| `201` | Created                                 |
| `400` | Bad Request - Invalid parameters        |
| `401` | Unauthorized - Invalid/missing API key  |
| `403` | Forbidden - Insufficient permissions    |
| `404` | Not Found - Resource doesn't exist      |
| `429` | Too Many Requests - Rate limit exceeded |
| `500` | Internal Server Error                   |

## Pagination

List endpoints support pagination:

```bash theme={null}
GET /v1/speakers?limit=20&offset=40
```

| Parameter | Type    | Default | Description              |
| --------- | ------- | ------- | ------------------------ |
| `limit`   | integer | 20      | Items per page (max 100) |
| `offset`  | integer | 0       | Number of items to skip  |

Response includes pagination metadata:

```json theme={null}
{
  "items": [...],
  "total": 2400,
  "limit": 20,
  "offset": 40,
  "has_more": true
}
```

## Rate Limits

| Tier       | Requests/min | Requests/day |
| ---------- | ------------ | ------------ |
| Starter    | 60           | 1,000        |
| Pro        | 300          | 10,000       |
| Enterprise | 1,000        | Unlimited    |

Rate limit headers in every response:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705312260
```

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Health" icon="heart-pulse" href="/api-reference/health/health-check">
    API status and health checks
  </Card>

  <Card title="Speakers" icon="users" href="/api-reference/speakers/list-speakers">
    Browse 2,400+ speaker voices
  </Card>

  <Card title="TTS Generation" icon="microphone" href="/api-reference/tts/synthesize">
    Generate speech from text
  </Card>

  <Card title="Jobs" icon="list-check" href="/api-reference/jobs/get-job">
    Track batch processing jobs
  </Card>

  <Card title="STT Testing" icon="chart-line" href="/api-reference/stt/transcribe">
    Evaluate STT providers
  </Card>

  <Card title="Datasets" icon="database" href="/api-reference/datasets/upload">
    Import CSV for bulk generation
  </Card>

  <Card title="Users" icon="user" href="/api-reference/users/me">
    Profile and usage info
  </Card>

  <Card title="Billing" icon="credit-card" href="/api-reference/billing/subscription">
    Subscription management
  </Card>
</CardGroup>
