Call it
curl https://api.peume.com/v1/call/s2-1-pro-text-to-speech \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"text": "Welcome to example.",
"temperature": 0.7,
"top_p": 0.7,
"prosody": {
"speed": 1,
"volume": 0,
"normalize_loudness": true
},
"chunk_length": 300,
"format": "mp3"
}
}'const res = await fetch("https://api.peume.com/v1/call/s2-1-pro-text-to-speech", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"text": "Welcome to example.",
"temperature": 0.7,
"top_p": 0.7,
"prosody": {
"speed": 1,
"volume": 0,
"normalize_loudness": true
},
"chunk_length": 300,
"format": "mp3"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/s2-1-pro-text-to-speech",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"text": "Welcome to example.",
"temperature": 0.7,
"top_p": 0.7,
"prosody": {
"speed": 1,
"volume": 0,
"normalize_loudness": True
},
"chunk_length": 300,
"format": "mp3"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: s2-1-pro-text-to-speech.
Parameters
textRequiredstringExample: Welcome to example.
reference_idarrayOmit for Fish's default voice. On 's key each id must be owned by the current team or verified by Fish as public.
temperaturenumberExample: 0.7
top_pnumberExample: 0.7
prosodyobjectExample: {"speed":1,"volume":0,"normalize_loudness":true}
chunk_lengthintegerExample: 300
formatstringmp3 · wav · pcm · opus
Example: mp3
sample_rateintegerSupported output rates depend on the selected format.
8000 · 16000 · 24000 · 32000 · 44100 · 48000
mp3_bitrateinteger64 · 128 · 192
Example: 128
opus_bitrateinteger-1000 · 24000 · 32000 · 48000 · 64000
Example: -1000
normalizebooleanExample: true
latencystringlow · normal · balanced
Example: normal
max_new_tokensintegerExample: 1024
repetition_penaltynumberExample: 1.2
min_chunk_lengthintegerExample: 50
condition_on_previous_chunksbooleanExample: true
early_stop_thresholdnumberExample: 1
