PopNowDocs API
Contenuto principale

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, quanti crediti costa ogni richiesta 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
Google
Risultato
Audio
Da
0.07 crediti per secondo generato ($0.0007)

1 credito = 0,01 $. All’accettazione l’attività trattiene l’importo massimo possibile e alla fine addebita il consumo reale, arrotondato al credito superiore; il resto viene sbloccato. Le attività non riuscite non vengono addebitate. Per conoscere la cifra esatta prima di eseguire, chiama POST /api/v1/jobs/quote.

Sintesi vocale

google/gemini-2.5-pro-tts/text-to-speech

Prezzo

OpzioneCrediti (per secondo generato)Dollari USA
Predefinito0.07$0.0007

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
textFacoltativostring—fino a 5000 caratteriThe words to be spoken, exactly as written. Cues in square brackets such as [sighs] are performed rather than read aloud.
dialogueFacoltativoarray<object>—fino a 20 elementiA scripted conversation, used instead of text: each line names a speaker from speakers.
speakersFacoltativoarray<object>—fino a 2 elementiThe cast for dialogue: one or two voices, each with a name the lines refer to.
voice_idFacoltativostringKoreAchernar, 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.
styleFacoltativostring—whisper, empathetic, vocal_smile, newscaster, promo_hype, deadpanOverall manner of the reading. Omit it to use the voice's own default manner.
paceFacoltativostring—natural, rapid_fire, the_drift, staccatoRhythm of the reading. Omit it to keep the voice's own rhythm.
accentFacoltativostringneutralneutral, american_general, american_valley, american_south, british_rp, british_brixton, transatlantic, australianEnglish accent used for the reading.
instructionsFacoltativostring—fino a 1000 caratteriHow to read the text: pace, mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken.
sceneFacoltativostring—fino a 500 caratteriWhere and to whom the words are spoken. Shapes the delivery and is not spoken.
temperatureFacoltativonumber—da 0 a 2Variation 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.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Passi successivi

In questa pagina