Skip to main content
POST
synthesize speech as json

Authorizations

Authorization
string
header
required

your rumik api key, e.g. rk_live_.... create one in the rumik dashboard.

Body

application/json
text
string
required

text to synthesize. up to 2000 characters. for muga, prefix with a tone tag, e.g. [happy].

Maximum string length: 2000
Example:

"[happy] namaste! kaise hain aap?"

model
enum<string>
default:muga

which model to use. muga is steered by a tone tag in the text; mulberry is steered by a natural-language description.

Available options:
muga,
mulberry
audio_format
enum<string>

optional output format. omit the field for the original wav response. explicit null, wav, ogg, and unsupported values return 400 UNSUPPORTED_AUDIO_FORMAT.

Available options:
opus,
pcm,
mulaw,
alaw,
mp3
normalization
boolean
default:true

set false to send text to the model exactly as written. see normalization.

description
string

always send it for mulberry. natural-language voice/style description. the voice is built from this. send it on every mulberry request, including when speaker is set. if it is missing or empty the api does not reject the request, it falls back to a generic neutral voice. not used by muga. billed with the text: when sent, its characters count at the same per-character rate.

Example:

"a female 30s hindi voice, smooth timbre, conversational pacing, like a podcast host"

speaker
enum<string>

mulberry only. optional named voice, case-insensitive. emma, mia, sophia, ava, ira, siya, aisha and zoya are female; lucas, noah, theo and adam are male. omit and a voice is generated from description. description is required either way.

Available options:
emma,
mia,
sophia,
ava,
ira,
siya,
aisha,
zoya,
lucas,
noah,
theo,
adam
Example:

"siya"

temperature
number
default:0.6

sampling temperature.

top_p
number
default:0.95

nucleus sampling.

top_k
integer
default:50

top-k sampling.

repetition_penalty
number
default:1.2

penalize repeated tokens.

max_new_tokens
integer
default:2048

output length cap. for mulberry, if long text comes back truncated, raise this above the default 2048 (up to 8000; the engine clamps higher values, it does not reject them).

Required range: x <= 8192

Response

json response containing base64-encoded audio in the requested format.

audio_base64
string<byte>
required

base64-encoded audio bytes in the requested format; wav when audio_format was omitted.

audio_duration_ms
integer
required

server-derived source audio duration in integer milliseconds.

Required range: x >= 0
request_id
string<uuid>
required

identifier for this synthesis request.

credits_used
integer
required

legacy credit usage. payg and unlimited requests return zero.

Required range: x >= 0
usage_cost_nanos
integer
required

payg charge in integer nanounits of the account's billing currency. unlimited and legacy-credit requests return zero.

Required range: x >= 0
speaker
string

the named voice, present when the request set speaker on mulberry, as sent.

Example:

"siya"