Skip to content
VoiceMint Developers

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

FieldTypeDescription
save_to_historybooleanSave generated audio to history
speakers*object[]Speaker configurations with name and voice
style_promptstringStyle instructions for speakers
text*stringText with speaker markers

Response

200 application/json

any

Errors

401Missing, wrong, revoked or expired key.
403The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client.
402Not enough credits, or the key reached its spending cap.
422The request failed validation; `detail` lists the fields.
429Over 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"
}'