Generate Speech

Convert text to speech with the OpenAI-compatible audio API.

Generate streamed audio from text using a supported speech model and voice.

POST/openai/v1/audio/speech

Request Body

FieldTypeRequiredDescription
modelstringYesText-to-speech model identifier.
inputstringYesText to synthesize.
voicestringYesVoice supported by the selected provider.
response_formatstringNoRequested audio format, such as mp3.

Response

The endpoint streams binary audio. Use the response content type to choose the correct file extension or playback decoder.

Transcription

Use POST /openai/v1/audio/transcriptions with multipart form data. Both file and model are required. Do not rely on a default transcription model; choose a current model from the published catalog.