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/successAl precio del proveedor
- Success rate
- 100 %Last 30 days · 550 calls
- Latency p50
- 3.2 sp95 8.6 s
- Last verified
- 30 sept 2026Verified working
POSThttps://toolswitch.dev/v1/tools/google-ai.voice-gen.gemini-3-8-flash-lite-ttsPreviewTry onlinePróximamenteProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Parámetros
| Parámetro | Tipo | Obligatorio | Descripción | Ejemplo |
|---|---|---|---|---|
| Parámetros de ruta | ||||
model | cadena | Obligatorio | gemini-3.8-flash-lite-tts | |
- Parámetros de ruta
modelcadenaObligatorioEjemplo:
gemini-3.8-flash-lite-tts
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
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());La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a $0.035/success, incluida la tarifa de servicio.