1. get an api key
sign in to the rumik dashboard, open api keys, and create a new key. the full key is shown only once at creation, so copy it somewhere safe before closing the dialog.generate an api key
create and manage keys in your dashboard.
2. pick a model
every request takes amodel and text. muga is our more expressive
model; mulberry is faster. each is steered differently. see the
prompting guides for muga and mulberry
for the full breakdown.
3. synthesize speech
pass your key as a bearer token. whenaudio_format is omitted, the response
body is a 24 khz mono wav.
choose another audio format
setaudio_format to opus, pcm, mulaw, alaw, or mp3. for example,
this returns opus in an ogg container:
curl
"audio_format": null. see
audio formats for binary http, json base64, and websocket
examples.
errors
tts errors come back as json with anerror message and a code:
the 400s above apply to the two http synthesis routes,
POST /v1/tts and
POST /v1/tts/json. POST /v1/tts/ws-connect shares UNSUPPORTED_AUDIO_FORMAT
and the 422, but does not check the text when it mints: unspeakable text is
reported on the socket as an INVALID_TEXT error frame; see
streaming.
a 422 names the failing field and does not echo your request back: