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=1.0 |
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"}'
Response
| Format | Content-Type |
|---|---|
| mp3 | audio/mpeg |
| wav | audio/wav |
| pcm | audio/pcm |
PCM: signed PCM16 little-endian, mono, 24 kHz.