Audio
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.
post/audio/speech
Query parameters
provider'ollama' | 'ollama_cloud' | 'groq' | 'llamacpp' | 'openai' | 'cloudflare' | 'cohere' | 'anthropic' | 'deepseek' | 'google' | 'mistral' | 'minimax' | 'moonshot' | 'nvidia' | 'zai'
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.