Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

Gemini 3.1 Flash Tts

google/gemini-3.1-flash-tts

Gemini 3.1 Flash Tts by Google - convert text to natural-sounding speech with AI. Supports multiple voices, languages, emotions, and speaking styles for content creation and accessibility.

Precio base
$0.05USD / ejecución
Ejecución
async
Tipo de modelo
audio
Campos de entrada
7
Ruta de producción

Probar el modelo

Entorno de pruebas

Abrir playground
Entrada
The text to convert to speech. Gemini 3.1 Flash TTS supports natural-language prompting for style, pace, accent, and emotional expression — include delivery instructions inline with the text (e.g. 'Say cheerfully: Have a wonderful day!'). Supports expressive audio tags like [sigh], [laughing], [whispering], [short pause] for fine-grained control over delivery. For multi-speaker synthesis, prefix lines with speaker aliases defined in the speakers field (e.g. 'Alice: Hello!\nBob: Hi!').
Audio output format. mp3: compressed, small file size (recommended). wav: uncompressed PCM wrapped in WAV (24 kHz, 16-bit mono). ogg_opus: Ogg container with Opus codec, good quality-to-size ratio.
02
Controls the randomness of the speech output. Higher values produce more creative and varied delivery, while lower values make the output more predictable and focused. Rango: de 0 a 2.
Multi-speaker voice configuration. When set, enables multi-speaker synthesis where different parts of the text are spoken by different voices. Each speaker needs a voice and a speaker_id (alias) that matches prefixes in the prompt.
Language for multilingual synthesis. When set, steers the model to speak in the specified language. If not set, the model auto-detects the language from the text.
Voice preset for single-speaker synthesis. 30 distinct voices are available. Ignored when speakers is set. Popular choices: Kore (strong, firm female), Puck (upbeat, lively male), Charon (calm, professional male), Zephyr (bright, clear female), Aoede (warm, melodic female).
Optional style and delivery instructions prepended to the prompt. Controls expressiveness, accent, pace, tone, and emotional expression using natural language. Use this to separate style control from the text content. Examples: 'Speak warmly and slowly', 'Read this as a dramatic newscast', 'Use a British accent with a cheerful tone', 'Whisper mysteriously'.
SalidaEjemplo
  1. ¿Qué le gustaría hacer después?

    Abrir original

Ejemplos

Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.

  • Entrada
    {
      "prompt": "I can't believe it worked! [laughing] After all those hours of debugging [sigh] it was just a missing semicolon."
    }
    Abrir resultado ↗

Ficha del modelo

Especificaciones

Precios

Precio base
$0.05 / ejecución

Contexto y modalidades

Entrada
Definido por esquema
Salida
audio

Capacidades

Chat
No compatible
Visión
No compatible
Razonamiento
No compatible
Salida estructurada
No compatible
Llamadas a funciones
No compatible
Entrada de audio
No compatible

Acceso

Proveedor
Google
ID del modelo
google/gemini-3.1-flash-tts
Ejecución
async
URL base
https://api.sandbase.ai
API
Unified Run API
Endpoint
/v1/run

README de la API

Gemini 3.1 Flash Tts

Gemini 3.1 Flash TTS speaks text in dozens of languages with 30 prebuilt voices, and supports two-speaker dialogue through speakers. Steer tone and pace with style_instructions.

Fields

FieldTypeDefaultNotes
promptstring, required—Text to speak. For dialogue, prefix lines with the speaker names defined in speakers.
output_formatwav / mp3 / ogg_opusmp3Output file format.
temperaturenumber 0–21Higher values give more varied delivery.
speakersobject[]—Optional speaker-to-voice list for multi-speaker dialogue.
language_codeArabic (Egypt) / Bangla (Bangladesh) / Dutch (Netherlands) / English (India) / English (US) / French (France) / German (Germany) / Hindi (India) / Indonesian (Indonesia) / Italian (Italy) / Japanese (Japan) / Korean (South Korea) / Marathi (India) / Polish (Poland) / Portuguese (Brazil) / Romanian (Romania) / Russian (Russia) / Spanish (Spain) / Tamil (India) / Telugu (India) / Thai (Thailand) / Turkish (Turkey) / Ukrainian (Ukraine) / Vietnamese (Vietnam) / Afrikaans (South Africa) / Albanian (Albania) / Amharic (Ethiopia) / Arabic (World) / Armenian (Armenia) / Azerbaijani (Azerbaijan) / Basque (Spain) / Belarusian (Belarus) / Bulgarian (Bulgaria) / Burmese (Myanmar) / Catalan (Spain) / Cebuano (Philippines) / Chinese Mandarin (China) / Chinese Mandarin (Taiwan) / Croatian (Croatia) / Czech (Czech Republic) / Danish (Denmark) / English (Australia) / English (UK) / Estonian (Estonia) / Filipino (Philippines) / Finnish (Finland) / French (Canada) / Galician (Spain) / Georgian (Georgia) / Greek (Greece) / Gujarati (India) / Haitian Creole (Haiti) / Hebrew (Israel) / Hungarian (Hungary) / Icelandic (Iceland) / Javanese (Java) / Kannada (India) / Konkani (India) / Lao (Laos) / Latin (Vatican City) / Latvian (Latvia) / Lithuanian (Lithuania) / Luxembourgish (Luxembourg) / Macedonian (North Macedonia) / Maithili (India) / Malagasy (Madagascar) / Malay (Malaysia) / Malayalam (India) / Mongolian (Mongolia) / Nepali (Nepal) / Norwegian Bokmal (Norway) / Norwegian Nynorsk (Norway) / Odia (India) / Pashto (Afghanistan) / Persian (Iran) / Portuguese (Portugal) / Punjabi (India) / Serbian (Serbia) / Sindhi (India) / Sinhala (Sri Lanka) / Slovak (Slovakia) / Slovenian (Slovenia) / Spanish (Latin America) / Spanish (Mexico) / Swahili (Kenya) / Swedish (Sweden) / Urdu (Pakistan)—Spoken language.
voiceAchernar / Achird / Algenib / Algieba / Alnilam / Aoede / Autonoe / Callirrhoe / Charon / Despina / Enceladus / Erinome / Fenrir / Gacrux / Iapetus / Kore / Laomedeia / Leda / Orus / Pulcherrima / Puck / Rasalgethi / Sadachbia / Sadaltager / Schedar / Sulafat / Umbriel / Vindemiatrix / Zephyr / ZubenelgenubiKorePrebuilt voice for single-speaker requests.
style_instructionsstring—How to say it.

Billing

$0.05 per started 1,000 characters of text.

TextPrice
200 characters$0.05
1,000 characters$0.05
2,500 characters$0.15

Failed runs are not charged.

Prompting

  • For dialogue, write Name: line and map each name to a voice in speakers.

Also on SandBase

Related: google/gemini-3.8-flash-tts (newer, cheaper).

Empiece a construir

Envíe su primera solicitud

Endpoint compatible con OpenAI con autenticación unificada y seguimiento de uso.

API de producción
Endpoint de Unified Run API
https://api.sandbase.ai/v1/run
ID del modelo
google/gemini-3.1-flash-tts
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "google/gemini-3.1-flash-tts",
  "voice": "Kore",
  "prompt": "I can't believe it worked! [laughing] After all those hours of debugging [sigh] it was just a missing semicolon.",
  "speakers": [
    {
      "voice": "Charon",
      "speaker_id": "Host"
    },
    {
      "voice": "Kore",
      "speaker_id": "DrChen"
    }
  ],
  "temperature": 1,
  "language_code": "English (US)",
  "output_format": "mp3",
  "style_instructions": "Say the following in a warm, conversational tone"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"
01

Esquema de entrada

7 parámetros · 1 obligatorios · 6 opcionales

ParámetroTipoObligatorioDescripción
promptstringObligatorioThe text to convert to speech. Gemini 3.1 Flash TTS supports natural-language prompting for style, pace, accent, and emotional expression — include delivery instructions inline with the text (e.g. 'Say cheerfully: Have a wonderful day!'). Supports expressive audio tags like [sigh], [laughing], [whispering], [short pause] for fine-grained control over delivery. For multi-speaker synthesis, prefix lines with speaker aliases defined in the speakers field (e.g. 'Alice: Hello!\nBob: Hi!'). · Longitud mínima: 1 · Longitud máxima: 50000
voicestringOpcionalVoice preset for single-speaker synthesis. 30 distinct voices are available. Ignored when speakers is set. Popular choices: Kore (strong, firm female), Puck (upbeat, lively male), Charon (calm, professional male), Zephyr (bright, clear female), Aoede (warm, melodic female). · Opciones: Achernar, Achird, Algenib, Algieba, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Pulcherrima, Puck, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi · Valor predeterminado: "Kore"
AchernarAchirdAlgenibAlgiebaAlnilamAoedeAutonoeCallirrhoeCharonDespinaEnceladusErinomeFenrirGacruxIapetusKoreLaomedeiaLedaOrusPulcherrimaPuckRasalgethiSadachbiaSadaltagerSchedarSulafatUmbrielVindemiatrixZephyrZubenelgenubi
speakersobject[]OpcionalMulti-speaker voice configuration. When set, enables multi-speaker synthesis where different parts of the text are spoken by different voices. Each speaker needs a voice and a speaker_id (alias) that matches prefixes in the prompt.
temperaturenumberOpcionalControls the randomness of the speech output. Higher values produce more creative and varied delivery, while lower values make the output more predictable and focused. · Mín.: 0 · Máx.: 2 · Valor predeterminado: 1
language_codestringOpcionalLanguage for multilingual synthesis. When set, steers the model to speak in the specified language. If not set, the model auto-detects the language from the text. · Opciones: Arabic (Egypt), Bangla (Bangladesh), Dutch (Netherlands), English (India), English (US), French (France), German (Germany), Hindi (India), Indonesian (Indonesia), Italian (Italy), Japanese (Japan), Korean (South Korea), Marathi (India), Polish (Poland), Portuguese (Brazil), Romanian (Romania), Russian (Russia), Spanish (Spain), Tamil (India), Telugu (India), Thai (Thailand), Turkish (Turkey), Ukrainian (Ukraine), Vietnamese (Vietnam), Afrikaans (South Africa), Albanian (Albania), Amharic (Ethiopia), Arabic (World), Armenian (Armenia), Azerbaijani (Azerbaijan), Basque (Spain), Belarusian (Belarus), Bulgarian (Bulgaria), Burmese (Myanmar), Catalan (Spain), Cebuano (Philippines), Chinese Mandarin (China), Chinese Mandarin (Taiwan), Croatian (Croatia), Czech (Czech Republic), Danish (Denmark), English (Australia), English (UK), Estonian (Estonia), Filipino (Philippines), Finnish (Finland), French (Canada), Galician (Spain), Georgian (Georgia), Greek (Greece), Gujarati (India), Haitian Creole (Haiti), Hebrew (Israel), Hungarian (Hungary), Icelandic (Iceland), Javanese (Java), Kannada (India), Konkani (India), Lao (Laos), Latin (Vatican City), Latvian (Latvia), Lithuanian (Lithuania), Luxembourgish (Luxembourg), Macedonian (North Macedonia), Maithili (India), Malagasy (Madagascar), Malay (Malaysia), Malayalam (India), Mongolian (Mongolia), Nepali (Nepal), Norwegian Bokmal (Norway), Norwegian Nynorsk (Norway), Odia (India), Pashto (Afghanistan), Persian (Iran), Portuguese (Portugal), Punjabi (India), Serbian (Serbia), Sindhi (India), Sinhala (Sri Lanka), Slovak (Slovakia), Slovenian (Slovenia), Spanish (Latin America), Spanish (Mexico), Swahili (Kenya), Swedish (Sweden), Urdu (Pakistan)
Arabic (Egypt)Bangla (Bangladesh)Dutch (Netherlands)English (India)English (US)French (France)German (Germany)Hindi (India)Indonesian (Indonesia)Italian (Italy)Japanese (Japan)Korean (South Korea)Marathi (India)Polish (Poland)Portuguese (Brazil)Romanian (Romania)Russian (Russia)Spanish (Spain)Tamil (India)Telugu (India)Thai (Thailand)Turkish (Turkey)Ukrainian (Ukraine)Vietnamese (Vietnam)Afrikaans (South Africa)Albanian (Albania)Amharic (Ethiopia)Arabic (World)Armenian (Armenia)Azerbaijani (Azerbaijan)Basque (Spain)Belarusian (Belarus)Bulgarian (Bulgaria)Burmese (Myanmar)Catalan (Spain)Cebuano (Philippines)Chinese Mandarin (China)Chinese Mandarin (Taiwan)Croatian (Croatia)Czech (Czech Republic)Danish (Denmark)English (Australia)English (UK)Estonian (Estonia)Filipino (Philippines)Finnish (Finland)French (Canada)Galician (Spain)Georgian (Georgia)Greek (Greece)Gujarati (India)Haitian Creole (Haiti)Hebrew (Israel)Hungarian (Hungary)Icelandic (Iceland)Javanese (Java)Kannada (India)Konkani (India)Lao (Laos)Latin (Vatican City)Latvian (Latvia)Lithuanian (Lithuania)Luxembourgish (Luxembourg)Macedonian (North Macedonia)Maithili (India)Malagasy (Madagascar)Malay (Malaysia)Malayalam (India)Mongolian (Mongolia)Nepali (Nepal)Norwegian Bokmal (Norway)Norwegian Nynorsk (Norway)Odia (India)Pashto (Afghanistan)Persian (Iran)Portuguese (Portugal)Punjabi (India)Serbian (Serbia)Sindhi (India)Sinhala (Sri Lanka)Slovak (Slovakia)Slovenian (Slovenia)Spanish (Latin America)Spanish (Mexico)Swahili (Kenya)Swedish (Sweden)Urdu (Pakistan)
output_formatstringOpcionalAudio output format. mp3: compressed, small file size (recommended). wav: uncompressed PCM wrapped in WAV (24 kHz, 16-bit mono). ogg_opus: Ogg container with Opus codec, good quality-to-size ratio. · Opciones: wav, mp3, ogg_opus · Valor predeterminado: "mp3"
wavmp3ogg_opus
style_instructionsstringOpcionalOptional style and delivery instructions prepended to the prompt. Controls expressiveness, accent, pace, tone, and emotional expression using natural language. Use this to separate style control from the text content. Examples: 'Speak warmly and slowly', 'Read this as a dramatic newscast', 'Use a British accent with a cheerful tone', 'Whisper mysteriously'. · Longitud máxima: 4000
02

Esquema de salida

CampoTipoDescripción
idstringIdentificador único de la tarea de generación
statusstringEstado de la tarea: pending, running, completed, failed, timeout
modelstringModelo usado para la generación
outputsarrayMatriz de elementos de salida
outputs[].urlstringURL del artefacto generado
outputs[].content_typestringTipo MIME (por ejemplo, image/png, video/mp4)
errorobject | nullDetalles del error si falla; null en caso de éxito
error.typestringCódigo de tipo de error legible por máquina
error.messagestringDescripción del error legible por humanos

Flujo asíncrono

Este modelo se ejecuta de forma asíncrona. Envía una solicitud y luego consulta el resultado.

  1. Enviar: haz POST a /v1/run y lee el id devuelto.
  2. Consultar: haz GET a /v1/run/{id} hasta que el estado sea completed, failed o timeout.
  3. Recuperar: lee outputs de la respuesta completada.

Elija su modelo

Comparar modelos

Todos los modelos de imagen y video
ModeloTipoPrecio predeterminadoLanzamiento
GoogleAudio$0.05 / ejecución16 abr 2026
GoogleAudio$0.04 / ejecución25 sept 2026
GoogleAudio$0.03 / ejecución25 sept 2026
GoogleAudio$0.10 / ejecución15 sept 2026
GoogleAudio$0.08 / ejecución30 mar 2026
GoogleAudio$0.04 / ejecución30 mar 2026

Preguntas

FAQ

¿Cómo llamo a Google Gemini 3.1 Flash Tts a través de SandBase?

Crea una clave API de SandBase y luego envía solicitudes con el ID de modelo "google/gemini-3.1-flash-tts" a Unified Run API (/v1/run) en https://api.sandbase.ai. Los ejemplos de solicitud de esta página muestran el payload exacto.

¿Necesito una cuenta separada de Google?

No. Una sola clave API y saldo de SandBase te dan acceso a Google Gemini 3.1 Flash Tts y a los demás modelos del catálogo; no necesitas registrarte aparte en Google.