Introduction
GPT-Realtime-2.1 handles a spoken request and produces a response within a continuing voice conversation. It combines speech understanding with configurable reasoning, so an application can ask for a considered answer without assembling separate transcription, language and speech-generation steps. This endpoint provides a server WebSocket connection, plus a short text-to-voice task for checking a single response.
Key features & highlights
The 2.1 release targets recognition of letters and numbers, handling of pauses and background noise, and behavior when a speaker interrupts. Those capabilities matter when an assistant must confirm a reference code or listen through an unfinished sentence. Recognition still needs application-level confirmation for consequential details; the model’s audio transcript is an aid to the interaction rather than proof that every digit was understood.
Configurable reasoning effort lets a voice application allocate more work to a difficult turn. Function tools can connect the conversation to application actions, while streaming audio lets playback begin before a whole answer is ready. The model has a 128,000-token context window and up to 32,000 output tokens; each connection uses the smaller context and output budgets selected by the caller.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | No | For a single GPT-Realtime-2.1 task, supply the text that starts one spoken response; live audio is sent through the WebSocket protocol. at least 1 characters · at most 4096 characters |
voice_id | No | Choose a GPT-Realtime-2.1 preset voice before generating audio; changing a voice after speech begins requires a new conversation. |
reasoning_effort | No | GPT-Realtime-2.1 accepts minimal, low, medium, high and xhigh reasoning; increased effort can use more output tokens. |
output_format | No | Select PCM, G.711 µ-law or G.711 A-law for GPT-Realtime-2.1 playback. Single-response tasks package the audio in WAV. |
speed | No | Set GPT-Realtime-2.1 audio speed from 0.25 to 1.5; this changes delivery speed, not the reasoning budget. |
max_tokens | No | Cap all GPT-Realtime-2.1 output tokens in this turn, including reasoning; the default is 512. |
max_context_tokens | No | Limit GPT-Realtime-2.1 retained conversation history. An additional 4,096-token instruction allowance and the output cap must fit within 128,000 tokens. |
audio_input_format | No | Match GPT-Realtime-2.1 input samples to 24 kHz PCM or 8 kHz G.711. The connection does not resample recordings. |
audio_noise_reduction | No | For GPT-Realtime-2.1, choose |
realtime_session | No | Advanced GPT-Realtime-2.1 session settings support function tools and voice detection. Do not repeat a conflicting value from the regular controls. |
Pricing
Text · Input $0.80 / Text · Output $4.80 / Audio · Input $6.40 / Audio · Output $12.80 / Image · Input $1 per 1 million tokens
Use cases
For a spoken scheduling assistant using GPT-Realtime-2.1, let a function check availability before the assistant proposes a time. Read back the selected date and participants before a separate application action confirms the booking.
For guided troubleshooting, keep the current device state in the conversation and ask one diagnostic question at a time. Use a tool result to establish whether an operation succeeded, then let the model explain the next step aloud.
Prompt guide & pro tips
Give GPT-Realtime-2.1 a concise role, the desired language and a rule for confirming ambiguous names or numbers. Describe when each function should be called and which result permits a success statement. Start with minimal reasoning for a short acknowledgement, then compare a higher effort on representative multi-step questions instead of assuming every turn benefits from extra reasoning.
Choose a voice, playback encoding and speaking speed before a response starts. PCM is 24 kHz mono audio; G.711 uses 8 kHz. With automatic voice detection, tune the silence threshold against realistic microphone noise and short hesitations. The client controls playback and interruptions. This endpoint uses server WebSocket transport; its audio input transcription runs on a separately metered transcription connection. Reserve enough history for useful context while keeping the per-turn output cap appropriate to a spoken answer.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "openai/gpt-realtime-2.1/realtime",
"input": {
"prompt": "Calm ambient pads with a slow rising motif",
"audio_input_format": "pcm",
"audio_noise_reduction": "near_field"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.

















