Generate speech audio from text
Generates audio from the provided text using the OpenAI-compatible Audio API. Mirrors the OpenAI POST /v1/audio/speech request body. The response is the synthesized audio as raw binary bytes; the actual Content-Type header of the response reflects the requested response_format (e.g. audio/mpeg for mp3).
Not every provider implements the Audio API. Requests routed to a provider that does not support it return 400 Bad Request with an explanatory error message; use /chat/completions for those providers.
Query parameters
Specific provider to use (default determined by model)
Request body
Response
The synthesized audio as raw binary bytes. The actual Content-Type header of the response reflects the requested response_format.
Changes
Changed in 2 of the 59 revisions of this API.2
- ○
added the new optional request property
new-optional-request-property
- ○
- ○
endpoint added
endpoint-added
- ○