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

FieldRequiredDescription
modelyesCatalog id for a speech-capable model
inputyesText to synthesize
voiceyesVoice id (per model/upstream)
response_formatnomp3, wav, opus, aac, flac, pcm
speedno0.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

StatusTypical cause
400Model does not support speech, invalid params
401 / 403Auth or policy
429Rate limit

See Errors.

Related