Synthesise Speech
POST/openai/v1/audio/speech
Synthesise speech from Bambara text.
Mirrors POST /v1/audio/speech, so client.audio.speech.create() works unchanged.
Parameters:
input: the text to synthesise.model:jifili-1(default),djelia-tts-v2ordjelia-tts-v1.voice:moussa,sekouorseydou. OpenAI's voice names are accepted as aliases.jifili-1servesmoussaonly, and answers 400unsupported_voicefor the others.response_format:jifili-1servesmp3(default),wav,pcm,opus,ulaw,alaw,l16_8000,l16_16000andfmp4(AAC in fragmented MP4); it answers 422invalid_requestfor the legacy-only namesflac,aac,wav_8kandulaw_8k. The older models servemp3,opus,aac,flac,wav,pcmand the telephony formatswav_8kandulaw_8k, and answer 400 for a format their encoder lacks.stream_format:audio(default) for raw bytes,sseforspeech.audio.deltaevents.
Djelia extension. TTS v2 is prompt-steerable, which the fixed OpenAI voice
enum cannot express. Pass a free-text description to reach it:
client.audio.speech.create(
model="djelia-tts-v2",
input="Aw ni ce, i ka kene wa?",
voice="moussa",
extra_body={"djelia": {"description": "speaks slowly, warm and reassuring"}},
)
jifili-1 selects a voice by name, so djelia.description does not reach it.
Its sampling is steered by djelia.temperature, djelia.top_p and
djelia.repetition_penalty; each one left out keeps the model's own default.
A synthesis that fails once it is under way ends the stream where it stopped, since the status line has already been sent.
Ignored: speed, instructions (use djelia.description instead).
Request
Responses
- 200
- 400
- 401
- 402
- 404
- default
The synthesised audio in the requested response_format. stream_format="sse" returns speech.audio.delta events instead.
Invalid request
Invalid or missing API key
Insufficient balance
Unknown model or endpoint
Error