Audio

Text-to-speech (sync)

Synthesize speech from text. Synchronous - returns the audio bytes directly. OpenAI /audio/speech compatible (input + voice). Billed per character (max 5000 chars/request). Pick a voice_id from GET /v1/audio/voices, or omit voice to use a provider default.

post/audio/speech

Request

  • Base URL: https://kymaapi.com/v1
  • URL: https://kymaapi.com/v1/audio/speech
  • Auth: HTTP bearer

Request body

modelstring

TTS model SKU (ElevenLabs or MiniMax family). Non-TTS models return 400 not_a_tts_model.

inputstring required

Text to speak. Max 5000 characters (NFC-normalized) per request - split longer text client-side. Alias: text.

voicestring

Voice id. OpenAI-style voice or provider voice_id both accepted. Defaults to a known-good voice per provider when omitted. List options via GET /v1/audio/voices.

response_formatstring

Output audio format. ElevenLabs uses names like mp3_44100_128; MiniMax accepts mp3/wav/flac/pcm. The first segment is used, so an OpenAI-style mp3_44100_128 maps to mp3 on MiniMax.

speednumber

MiniMax only. Playback speed multiplier.

voice_settingsobject

ElevenLabs only. Passed through (stability, similarity_boost, style, etc.).

Response

Audio bytes in the requested format. Billing rides X-Kyma-* response headers. Append ?save_to_blob=1 to instead receive a JSON body with a hosted url (used by the Kyma canvas).

Changes

No recorded changes to this operation across all 1 revision of this API.