PeumeAPI

AI generation

Text to Speech

Convert text to natural speech (MP3) with a library, cloned, or zero-shot voice.

From $0.023 per call

Call it

curl https://api.peume.com/v1/call/text-to-speech-4 \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "text": "your text",
    "model": "s2.1-pro"
  }
}'

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-4.

Parameters

textRequiredstring

Text to speak (1–5000 characters). Billed per UTF-8 byte: an English letter is 1 byte, a Chinese character 3. Steer delivery inline with bracket cues, e.g. '[whispers] I can't believe it [laughs]'. For dialogue, prefix turns with <|speaker:0|>, <|speaker:1|>… and pass one voice_id per speaker.

modelstring

s2.1-pro (default; best quality/latency, 83 languages), s2-pro (previous generation, same price), or drama-3 (newest; direct each line in plain language, e.g. '[low, gravelly, tired] Status report.'; priced higher).

s2.1-pro · s2-pro · drama-3

Example: s2.1-pro

voice_idstring

Voice to speak with: a public voice id from /voices, or a voice you cloned via /voices/clone. For multi-speaker dialogue pass an array (2–10 ids), one per <|speaker:N|>. Omit for the default voice.

reference_audio_urlstring

Instant voice cloning without saving a voice: HTTPS URL of a clean 10–30 s recording (WAV/MP3/FLAC, ≤ 20 MB) to imitate. Requires reference_text; cannot be combined with voice_id.

reference_textstring

Exact transcript of reference_audio_url (not billed).

temperaturenumber

Expressiveness 0–1 (higher = more varied). Upstream default 0.7.

top_pnumber

Nucleus sampling 0–1. Upstream default 0.7.

prosodyobject
latencystring

Quality/latency trade-off: normal (best quality, default), balanced, or low.

normal · balanced · low

normalizeboolean

Normalize English/Chinese text (numbers, dates) before speaking. Default true.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.