Create Speech
Generate audio from the input text.
In: header
Header Parameters
Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.
Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization
The text to generate audio for. The maximum length is 4096 characters.
length <= 4096One of the available TTS models.
The voice to use when generating the audio.
Control the voice of your generated audio with additional instructions.
""length <= 4096The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.
"mp3""mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.
10.25 <= value <= 4The format to stream the audio in. Supported formats are sse and audio. sse is not supported for tts-1 or tts-1-hd.
"audio""sse" | "audio"Response Body
curl -X POST "https://loading/v1/audio/speech" \ -H "OpenAI-Organization: string" \ -H "OpenAI-Project: string" \ -H "Content-Type: application/json" \ -d '{ "input": "string", "model": "string", "voice": "string" }'null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.