# Text to speech

`POST /v1/audio/speech`

Converts text into audio

## Authorizations

Bearer authentication — send `Authorization: Bearer <token>`.

## Request Body (application/json) — required

```json
{
  "type": "object",
  "required": [
    "model",
    "input",
    "voice"
  ],
  "properties": {
    "model": {
      "type": "string",
      "example": "tts-1"
    },
    "input": {
      "type": "string",
      "description": "Text to convert",
      "maxLength": 4096
    },
    "voice": {
      "type": "string",
      "enum": [
        "alloy",
        "echo",
        "fable",
        "onyx",
        "nova",
        "shimmer"
      ]
    },
    "response_format": {
      "type": "string",
      "enum": [
        "mp3",
        "opus",
        "aac",
        "flac",
        "wav",
        "pcm"
      ],
      "default": "mp3"
    },
    "speed": {
      "type": "number",
      "minimum": 0.25,
      "maximum": 4,
      "default": 1
    }
  }
}
```

## Responses

### 200 — Audio generated

`audio/mpeg`

```json
{
  "type": "string",
  "format": "binary"
}
```
