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

# OpenAI Audio generation

***

## Text to Speech Request

<CodeGroup>
  ```shellscript cURL theme={null}
  curl --location 'https://api.znapai.com/v1/audio/speech' \
  --header 'Authorization: Bearer $ZnapAI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
      "model": "gpt-4o-mini-tts",
      "input": "Today is a wonderful day to build something people love!",
      "voice": "coral",
      "instructions": "Speak in a cheerful and positive tone."
    }'
  ```
</CodeGroup>

## Reponse

<img src="https://mintcdn.com/znapai/qzs76XVwMha6T86A/images/image-4.png?fit=max&auto=format&n=qzs76XVwMha6T86A&q=85&s=a215bca0b6a739385680e3a0be50d73b" alt="Image" width="1201" height="399" data-path="images/image-4.png" />

***

## Parameters

<ParamField path="model" type="string" required>
  Name of the model to use. Must be a suitable deployed audio model.

  Allowed values:

  * `tts-1`
</ParamField>

<ParamField path="input" type="string" required>
  The text to generate audio for. Maximum length is 4096 characters.
</ParamField>

<ParamField path="voice" type="string" required>
  The voice to generate the audio in. Allowed values include `coral` and other standard OpenAI voices.
</ParamField>

<ParamField path="instructions" type="string">
  Optional instructions to guide the style or tone of the generated audio.
</ParamField>

***

## Params to Avoid

| Param             | Reason                                                         |
| ----------------- | -------------------------------------------------------------- |
| `response_format` | Format adjustments are not supported; audio is returned as MP3 |
| `speed`           | Speed adjustments are not supported                            |
