Call it
curl https://api.peume.com/v1/call/text-to-speech \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"model": "stepaudio-3-tts",
"input": "your input",
"voice": "your voice"
}
}'const res = await fetch("https://api.peume.com/v1/call/text-to-speech", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"model": "stepaudio-3-tts",
"input": "your input",
"voice": "your voice"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/text-to-speech",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"model": "stepaudio-3-tts",
"input": "your input",
"voice": "your voice"
}
},
)
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: text-to-speech.
Parameters
modelRequiredstringstepaudio-3-tts (newest, most natural; laughter, breath and hesitation; cheaper) or stepaudio-2.5-tts (context-aware, previous generation; priced higher). Required.
stepaudio-3-tts · stepaudio-2.5-tts
inputRequiredstringText to speak (1-1000 characters). Text inside parentheses is a delivery instruction and is not spoken, e.g. '(whispering) I can see it from here'.
voiceRequiredstringA system voice id from /voices (e.g. magnetic-voiced-male) or a voice you cloned via /voices/clone.
languagestringzh, en (upstream default), ja, ko, fr or es (the last four in preview). Cloned voices support only zh and en.
zh · en · ja · ko · fr · es
instructionstringGlobal delivery guidance for the whole clip, e.g. 'calm, warm late-night radio host'. Up to 500 characters on stepaudio-3-tts, 200 on stepaudio-2.5-tts.
speednumberSpeaking rate 0.5-2.0 (1.0 = normal).
volumenumberVolume 0.1-2.0 (1.0 = unchanged).
sample_ratestringOutput sample rate in Hz (upstream default 24000).
pronunciation_maparrayPronunciation overrides as 'term/reading', e.g. 'LOL/laugh out loudly'. Chinese tones use 1-4 (5 = neutral).
markdown_filterbooleanStrip Markdown syntax from input before speaking.
