Call it
curl https://api.peume.com/v1/call/google-gemini-3-8-flash-tts \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"model": "gemini-3.8-flash-tts",
"contents": [
{
"parts": [
{
"text": "Welcome to example.",
"speechMetadata": {
"style": "cheerful"
}
}
]
}
],
"generationConfig": "your generationConfig"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-gemini-3-8-flash-tts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"model": "gemini-3.8-flash-tts",
"contents": [
{
"parts": [
{
"text": "Welcome to example.",
"speechMetadata": {
"style": "cheerful"
}
}
]
}
],
"generationConfig": "your generationConfig"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-gemini-3-8-flash-tts",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"model": "gemini-3.8-flash-tts",
"contents": [
{
"parts": [
{
"text": "Welcome to example.",
"speechMetadata": {
"style": "cheerful"
}
}
]
}
],
"generationConfig": "your generationConfig"
}
},
)
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: google-gemini-3-8-flash-tts.
Parameters
modelRequiredstring's key runs only gemini-3.8-flash-tts; your own key can name another model.
Example: gemini-3.8-flash-tts
contentsRequiredarrayOne user turn: {parts: [{text: script}]}. Gemini 3.8 TTS reads `text` as a verbatim transcript: a direction written into it ("Say cheerfully:...") is spoken aloud and billed as audio. Put delivery directions in the part's `speechMetadata.style` ({text: "Welcome to.", speechMetadata: {style: cheerful}}) and keep `text` to the words to be spoken. For two speakers, give each line its own part with its speaker: [{text: "Did it finish?", speechMetadata: {speaker: Joe}}, {text: "Yes.", speechMetadata: {speaker: Jane}}], and name both in multiSpeakerVoiceConfig; a single "Joe:... Jane:..." te
Example: [{"parts":[{"text":"Welcome to example.","speechMetadata":{"style":"cheerful"}}]}]
generationConfigRequiredobject