POST https://51kik.com/v1/audio/speech
Text-to-speech (TTS). Shape follows the OpenAI Audio Speech API.
Authentication
Authorization: Bearer YOUR_API_KEY
Request body
| Field | Required | Description |
|---|---|---|
model | yes | Catalog id for a speech-capable model |
input | yes | Text to synthesize |
voice | yes | Voice id (per model/upstream) |
response_format | no | mp3, wav, opus, aac, flac, pcm |
speed | no | 0.25–4.0 |
Limit: JSON body up to 1 MB.
Some deployments support streaming via extra fields (stream_format, etc.) depending on model/upstream.
Example
curl -sS "https://51kik.com/v1/audio/speech" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_TTS_MODEL_ID",
"input": "Hello from RouterBrain.",
"voice": "alloy",
"response_format": "mp3"
}' \
-o speech.mp3
Success returns raw audio bytes (not JSON); Content-Type depends on format.
Errors
| Status | Typical cause |
|---|---|
| 400 | Model does not support speech, invalid params |
| 401 / 403 | Auth or policy |
| 429 | Rate limit |
See Errors.
Related
- List models
- Create chat completion (chat vs TTS are separate endpoints)