Generate Multi Speaker Speech
POST/gemini-tts/generate-multi-speaker
Generate multi-speaker speech using Gemini TTS. Args: request: Multi-speaker generation request current_user: Authenticated user (required — Gemini calls cost real money) service: Gemini TTS service instance history_service: TTS history service Returns: Generated multi-speaker audio as streaming response
Authentication
Authorization: Bearer vm_sk_… with the media.write permission (or all.write). See Authentication.
Request body
application/json
| Field | Type | Description |
|---|---|---|
save_to_history | boolean | Save generated audio to history |
speakers* | object[] | Speaker configurations with name and voice |
style_prompt | string | Style instructions for speakers |
text* | string | Text with speaker markers |
Response
200 application/json
any
Errors
401 | Missing, wrong, revoked or expired key. |
403 | The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client. |
402 | Not enough credits, or the key reached its spending cap. |
422 | The request failed validation; `detail` lists the fields. |
429 | Over a rate limit; retry after `Retry-After` seconds. |
All statuses: Errors.
Example
curl -X POST "https://api.voicemint.io/api/v1/gemini-tts/generate-multi-speaker" \
-H "Authorization: Bearer $VOICEMINT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"save_to_history": false,
"speakers": [
{}
],
"style_prompt": "string",
"text": "string"
}'