Google: Gemini 3.8 Flash-Lite TTS
google-ai.voice-gen.gemini-3-8-flash-lite-ttsSpeak a text in one of 30 prebuilt voices, or a two-speaker dialogue, with Gemini 3.8 Flash-Lite TTS on Google's own API; the audio returns inline as base64 WAV (24 kHz mono).
- Price
- $0.035/successPelo preço do provedor
- Success rate
- 100%Last 30 days · 550 calls
- Latency p50
- 3.2 sp95 8.6 s
- Last verified
- 30 de set. de 2026Verified working
POSThttps://toolswitch.dev/v1/tools/google-ai.voice-gen.gemini-3-8-flash-lite-ttsPreviewTry onlineEm breveProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de caminho | ||||
model | string | Obrigatório | gemini-3.8-flash-lite-tts | |
- Parâmetros de caminho
modelstringObrigatórioExemplo:
gemini-3.8-flash-lite-tts
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
Preview
curl -X POST 'https://toolswitch.dev/v1/tools/google-ai.voice-gen.gemini-3-8-flash-lite-tts' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"contents":[{"parts":[{"text":"Say cheerfully: Welcome to treg, the tool catalog for your agents."}]}],"generationConfig":{"speechConfig":{"voiceConfig":{"prebuiltVoiceConfig":{"voiceName":"Kore"}}},"responseModalities":["AUDIO"]}}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/google-ai.voice-gen.gemini-3-8-flash-lite-tts",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"contents\":[{\"parts\":[{\"text\":\"Say cheerfully: Welcome to treg, the tool catalog for your agents.\"}]}],\"generationConfig\":{\"speechConfig\":{\"voiceConfig\":{\"prebuiltVoiceConfig\":{\"voiceName\":\"Kore\"}}},\"responseModalities\":[\"AUDIO\"]}}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/google-ai.voice-gen.gemini-3-8-flash-lite-tts", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"contents\":[{\"parts\":[{\"text\":\"Say cheerfully: Welcome to treg, the tool catalog for your agents.\"}]}],\"generationConfig\":{\"speechConfig\":{\"voiceConfig\":{\"prebuiltVoiceConfig\":{\"voiceName\":\"Kore\"}}},\"responseModalities\":[\"AUDIO\"]}}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a $0.035/success, incluindo a taxa de serviço.