Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

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.

Preço base
$0.05USD / execução
Execução
async
Tipo de modelo
audio
Campos de entrada
7
Rota de produção

Testar o modelo

Playground

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. Intervalo: 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'.
SaídaExemplo
  1. O que você gostaria de fazer em seguida?

    Abrir original

Exemplos

Selecione um exemplo para carregar as entradas e o resultado no 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 ↗

Cartão do modelo

Especificações

Preços

Preço base
$0.05 / execução

Contexto e modalidades

Entrada
Definido pelo schema
Saída
audio

Capacidades

Chat
Não suportado
Visão
Não suportado
Raciocínio
Não suportado
Saída estruturada
Não suportado
Chamada de função
Não suportado
Entrada de áudio
Não suportado

Acesso

Provedor
Google
ID do modelo
google/gemini-3.1-flash-tts
Execução
async
URL base
https://api.sandbase.ai
API
Unified Run API
Endpoint
/v1/run

README da 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).

Comece a construir

Envie sua primeira solicitação

Endpoint compatível com OpenAI com autenticação unificada e rastreamento de uso.

API de produção
endpoint Unified Run API
https://api.sandbase.ai/v1/run
ID do 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 obrigatórios · 6 opcionais

ParâmetroTipoObrigatórioDescrição
promptstringObrigatórioThe 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!'). · Tamanho mín.: 1 · Tamanho máx.: 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). · Opções: 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 · Padrão: "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 · Padrão: 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. · Opções: 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. · Opções: wav, mp3, ogg_opus · Padrão: "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'. · Tamanho máx.: 4000
02

Esquema de saída

CampoTipoDescrição
idstringIdentificador exclusivo da tarefa de geração
statusstringStatus da tarefa: pending, running, completed, failed, timeout
modelstringModelo usado para a geração
outputsarrayVetor de itens de saída
outputs[].urlstringURL do artefato gerado
outputs[].content_typestringTipo MIME (por exemplo, image/png, video/mp4)
errorobject | nullDetalhes do erro se houver falha, null em caso de sucesso
error.typestringCódigo do tipo de erro legível por máquina
error.messagestringDescrição do erro legível por humanos

Fluxo assíncrono

Este modelo é executado de forma assíncrona. Envie uma solicitação e depois faça polling pelo resultado.

  1. Enviar: faça POST para /v1/run e leia o id retornado.
  2. Fazer polling: faça GET em /v1/run/{id} até o status ser completed, failed ou timeout.
  3. Recuperar: leia outputs da resposta concluída.

Escolha seu modelo

Comparar modelos

Todos os modelos de imagem e vídeo
ModeloTipoPreço padrãoLançado
GoogleÁudio$0.05 / execução16 de abr. de 2026
GoogleÁudio$0.04 / execução25 de set. de 2026
GoogleÁudio$0.03 / execução25 de set. de 2026
GoogleÁudio$0.10 / execução15 de set. de 2026
GoogleÁudio$0.08 / execução30 de mar. de 2026
GoogleÁudio$0.04 / execução30 de mar. de 2026

Perguntas

FAQ

Como faço chamadas ao Google Gemini 3.1 Flash Tts pela SandBase?

Crie uma chave de API da SandBase e depois envie solicitações com o ID do modelo "google/gemini-3.1-flash-tts" para Unified Run API (/v1/run) em https://api.sandbase.ai. Os exemplos de requisição nesta página mostram a carga exata.

Preciso de uma conta Google separada?

Não. Uma única chave de API e saldo da SandBase dão acesso a Google Gemini 3.1 Flash Tts e aos outros modelos do catálogo; você não precisa se cadastrar separadamente no Google.