Referencia de la API de Gemini 3.8 Flash TTS
Voz expresiva que interpreta indicaciones como [laughing]
Con una sola clave de API de PopNow puedes llamar a Gemini 3.8 Flash TTS desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuántos créditos cuesta cada solicitud y una petición que puedes pegar tal cual en la terminal.
Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.
De un vistazo
- Creado por
- Resultado
- Audio
- Desde
- 0.05 créditos por segundo generado ($0.0005)
- Tiempo habitual
- unos 11 s
- ID de modelo
1 crédito = 0,01 US$. Al aceptarse, la tarea retiene el cargo máximo posible y al terminar cobra el uso real, redondeado al crédito superior; el resto se libera. Las tareas fallidas no se cobran. Para saber la cifra exacta antes de ejecutar, llama a POST /api/v1/jobs/quote.
Texto a voz
google/gemini-3.8-flash-tts/text-to-speech
Precio
| Opción | Créditos (por segundo generado) | Dólares |
|---|---|---|
Predeterminado | 0.05 | $0.0005 |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
textOpcional | string | — | hasta 5000 caracteres | The words to be spoken, exactly as written. Direction such as [whispering] or [sighs] goes into the text itself. |
dialogueOpcional | array<object> | — | hasta 20 elementos | A scripted conversation, used instead of text: each line names a speaker from speakers. |
speakersOpcional | array<object> | — | hasta 2 elementos | The cast for dialogue: one or two voices, each with a name the lines refer to. |
voice_idOpcional | string | Kore | Achernar, Achird, Algenib, Algieba, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, … (+16) | Prebuilt voice that reads the text. Each voice has a fixed character. |
styleOpcional | string | — | whisper, empathetic, vocal_smile, newscaster, promo_hype, deadpan | Overall manner of the reading. Omit it to use the voice's own default manner. |
paceOpcional | string | — | natural, rapid_fire, the_drift, staccato | Rhythm of the reading. Omit it to keep the voice's own rhythm. |
accentOpcional | string | — | neutral, american_general, american_valley, american_south, british_rp, british_brixton, transatlantic, australian | English accent used for the reading. |
instructionsOpcional | string | — | hasta 1000 caracteres | How to read the text: mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken. |
sceneOpcional | string | — | hasta 500 caracteres | Where and to whom the words are spoken. Shapes the delivery and is not spoken. |
temperatureOpcional | number | — | de 0 a 2 | Variation between takes; higher is less predictable. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "google/gemini-3.8-flash-tts/text-to-speech",
"input": {
"text": "Hi there! This voice was created with the PopNow API in just a few seconds."
}
}'La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
