GPT-Realtime-2.1 API-Referenz
Gesprochene Anfragen verarbeiten und als Sprache oder Text beantworten.
Mit einem einzigen PopNow-API-Schlüssel rufst du GPT-Realtime-2.1 aus deinem eigenen Code auf. Hier findest du die Modell-IDs, jedes Eingabefeld, die Kosten pro Anfrage in USD und eine Anfrage, die du direkt ins Terminal kopieren kannst.
Die Parameterbeschreibungen stammen aus dem Eingabeschema des Modells und sind nur auf Englisch verfügbar.
Auf einen Blick
- Hersteller
- OpenAI
- Ergebnis
- Audio
- Ab
- $0.0048 USD per_1k_tokens
- Modell-IDs
Die Preise werden in USD angezeigt und von deinem PopNow-Guthaben abgebucht. Bei Annahme wird der Höchstbetrag reserviert, nach Abschluss der tatsächliche Verbrauch abgerechnet und der Rest freigegeben. Fehlgeschlagene Tasks kosten nichts. Ein genaues Angebot erhältst du vorab über POST /api/v1/jobs/quote.
Echtzeitstimme
openai/gpt-realtime-2.1/realtime
Preis
| Option | USD |
|---|---|
Standard | $0.0048 per_1k_tokens |
Parameter
| Feld | Typ | Standardwert | Erlaubt | Bedeutung |
|---|---|---|---|---|
promptOptional | string | — | bis zu 4.096 Zeichen | Text that starts a single spoken response; live audio uses the Realtime WebSocket. |
voice_idOptional | string | — | alloy, ash, ballad, coral, echo, sage, shimmer, verse, marin, cedar | Preset speaking voice; select before the first audio response. |
reasoning_effortOptional | string | — | minimal, low, medium, high, xhigh | Reasoning effort for the spoken response; reasoning consumes output tokens. |
output_formatOptional | string | — | pcm, g711_ulaw, g711_alaw | Live playback encoding; single-response tasks return a matching WAV container. |
speedOptional | number | 1 | 0.25 bis 1.5 | Speaking-speed multiplier for output audio. |
max_tokensOptional | integer | 512 | 16 bis 32000 | Per-turn output cap, including reasoning, text and audio tokens. |
max_context_tokensOptional | integer | 4096 | 512 bis 123888 | Retained-history cap; this, the 4096-token instruction allowance and output must fit 128000. |
audio_input_formatOptional | string | pcm | pcm, g711_ulaw, g711_alaw | Encoding of live microphone samples; PCM is 24 kHz mono 16-bit, G.711 is 8 kHz. |
audio_noise_reductionOptional | string | near_field | near_field, far_field, none | Input denoising profile for a close microphone, room microphone, or preprocessed audio. |
realtime_sessionOptional | object | — | — | Advanced native session configuration; overlapping regular controls must agree. Function tools are executed by your application. |
Beispielanfrage
Diese Anfrage läuft so, wie sie ist; weggelassene Felder behalten ihren Standardwert. Leg deinen Schlüssel vorher in POPNOW_API_KEY ab.
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": "openai/gpt-realtime-2.1/realtime",
"input": {
"prompt": "A bright, cheerful scene with soft natural light"
}
}'Die Antwort enthält sofort eine taskId. Das Ergebnis holst du mit GET /api/v1/jobs/recordInfo ab – oder du gibst callBackUrl mit und wirst benachrichtigt.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
