Speech API
Send text and a voice ID to receive audio.
POST /v1/audio/speech
Fields
| Required | Fields |
|---|---|
| Required | model=kitsch-voice, input, voice |
| — | instructions |
| — | response_format=mp3 (Format), wav, pcm |
| — | stream_format=audio |
| — | speed (0.25–4) |
| — | effects |
instructions is accepted for compatibility; speaking instructions are unsupported.
speed sets playback speed from 0.25 to 4.
For effects, speed, and SDK examples, see Voice Effects.
Set KITSCH_OPENAI_BASE_URL to your Audio API URL ending in /v1.
curl "$KITSCH_OPENAI_BASE_URL/audio/speech" \
-H "Authorization: Bearer $KITSCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"kitsch-voice","voice":"<voice_id>","input":"Hello.","response_format":"wav"}'
Expression and delivery instructions
Put sound and delivery tags directly in input, rather than instructions.
Tags and natural-language instructions currently support English only. Dialogue can use a supported language.
Use [sigh] for a sound and wrap the intended passage in <whisper>dialogue</whisper> for delivery.
{
"model": "kitsch-voice",
"voice": "<voice_id>",
"input": "[sigh] <whisper>Let's keep this between us.</whisper>",
"response_format": "wav"
}
See Expression and Delivery Instructions for recommended tags, dialogue examples, and natural-language instructions.
Response
| Format | Content-Type |
|---|---|
| mp3 | audio/mpeg |
| wav | audio/wav |
| pcm | audio/pcm |
PCM: signed PCM16 little-endian, mono, 24 kHz.