Riferimento API di Gemini 2.5 Pro TTS
Voci da dirigere per narrazioni e dialoghi a due
Con una sola chiave API di PopNow chiami Gemini 2.5 Pro TTS dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanto costa ogni richiesta in USD e una richiesta da incollare nel terminale così com’è.
Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.
In sintesi
- Sviluppato da
- Risultato
- Audio
- Da
- $0.00045 USD per secondo generato
- Tempo tipico
- circa 18 s
- ID del modello
I prezzi sono indicati in USD e gli importi vengono addebitati sul tuo saldo PopNow. Alla ricezione viene riservato il massimo importo; al termine viene addebitato il consumo effettivo e il resto viene sbloccato. Le attività fallite non vengono addebitate. Per un preventivo esatto prima di eseguire, usa POST /api/v1/jobs/quote.
Sintesi vocale
google/gemini-2.5-pro-tts/text-to-speech
Prezzo
| Opzione | USD |
|---|---|
Predefinito | $0.00045 per secondo generato |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
textFacoltativo | string | — | fino a 5000 caratteri | The words to be spoken, exactly as written. Cues in square brackets such as [sighs] are performed rather than read aloud. |
dialogueFacoltativo | array<object> | — | fino a 20 elementi | A scripted conversation, used instead of text: each line names a speaker from speakers. |
speakersFacoltativo | array<object> | — | fino a 2 elementi | The cast for dialogue: one or two voices, each with a name the lines refer to. |
voice_idFacoltativo | 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. |
styleFacoltativo | string | — | whisper, empathetic, vocal_smile, newscaster, promo_hype, deadpan | Overall manner of the reading. Omit it to use the voice's own default manner. |
paceFacoltativo | string | — | natural, rapid_fire, the_drift, staccato | Rhythm of the reading. Omit it to keep the voice's own rhythm. |
accentFacoltativo | string | neutral | neutral, american_general, american_valley, american_south, british_rp, british_brixton, transatlantic, australian | English accent used for the reading. |
instructionsFacoltativo | string | — | fino a 1000 caratteri | How to read the text: pace, mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken. |
sceneFacoltativo | string | — | fino a 500 caratteri | Where and to whom the words are spoken. Shapes the delivery and is not spoken. |
temperatureFacoltativo | number | — | da 0 a 2 | Variation between takes; higher is less predictable. |
Richiesta di esempio
Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in 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-2.5-pro-tts/text-to-speech",
"input": {
"text": "Hi there! This voice was created with the PopNow API in just a few seconds."
}
}'La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
