PopNowDokumentacja API
Treść główna

Gemini 2.5 Pro TTS: dokumentacja API

Głosy, które można reżyserować – do narracji i dialogów we dwoje

Jednym kluczem API PopNow wywołasz Gemini 2.5 Pro TTS z własnego kodu. Znajdziesz tu identyfikatory modelu, które trzeba wysłać, każde pole wejściowe, koszt zapytania w kredytach i gotowe zapytanie do wklejenia w terminalu.

Opisy parametrów pochodzą ze schematu wejściowego modelu i są dostępne tylko po angielsku.

W skrócie

Twórca
Google
Wynik
Audio
Od
0.07 kr. za sekundę wyniku ($0.0007)

1 kredyt = 0,01 USD. Po przyjęciu zadanie blokuje najwyższą możliwą kwotę, a na koniec rozlicza faktyczne zużycie, zaokrąglone w górę do pełnych kredytów; resztę zwalnia. Za zadania zakończone błędem nie płacisz. Dokładną kwotę przed uruchomieniem poda POST /api/v1/jobs/quote.

Tekst na mowę

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

Cena

OpcjaKredyty (za sekundę wyniku)Dolary USA
Domyślnie0.07$0.0007

Parametry

PoleTypDomyślnieDozwolone wartościDo czego służy
textOpcjonalnestring—do 5000 znakówThe words to be spoken, exactly as written. Cues in square brackets such as [sighs] are performed rather than read aloud.
dialogueOpcjonalnearray<object>—do 20 elementówA scripted conversation, used instead of text: each line names a speaker from speakers.
speakersOpcjonalnearray<object>—do 2 elementówThe cast for dialogue: one or two voices, each with a name the lines refer to.
voice_idOpcjonalnestringKoreAchernar, 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.
styleOpcjonalnestring—whisper, empathetic, vocal_smile, newscaster, promo_hype, deadpanOverall manner of the reading. Omit it to use the voice's own default manner.
paceOpcjonalnestring—natural, rapid_fire, the_drift, staccatoRhythm of the reading. Omit it to keep the voice's own rhythm.
accentOpcjonalnestringneutralneutral, american_general, american_valley, american_south, british_rp, british_brixton, transatlantic, australianEnglish accent used for the reading.
instructionsOpcjonalnestring—do 1000 znakówHow to read the text: pace, mood, distance from the microphone, who is listening. Shapes the delivery and is not spoken.
sceneOpcjonalnestring—do 500 znakówWhere and to whom the words are spoken. Shapes the delivery and is not spoken.
temperatureOpcjonalnenumber—od 0 do 2Variation between takes; higher is less predictable.

Przykładowe zapytanie

To zapytanie działa w obecnej postaci; pominięte pola mają wartości domyślne. Najpierw zapisz klucz w zmiennej 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."
  }
}'

Odpowiedź od razu zawiera taskId. Wynik pobierzesz przez GET /api/v1/jobs/recordInfo albo dodaj callBackUrl, by dostać powiadomienie.

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"

Co dalej

Na tej stronie