📞 Realtime Official Documentation

â‹™ Create Realtime Client Secret

Create an ephemeral client secret for browser/mobile realtime sessions.

Put Realtime session configuration inside msg.payload.session. Top-level msg.payload is reserved for client-secret options such as expires_after.

msg.payload Properties

expires_after object
Optional client-secret expiration config, for example { "anchor": "created_at", "seconds": 600 }.
session object
Realtime session configuration to attach to the generated client secret.
session.type string
Use realtime for voice-agent payloads or translation for translation payloads.
session.model string
Session model id, including gpt-realtime-2, gpt-realtime-1.5, gpt-audio-1.5, or translation model ids.
session.reasoning.effort string
Reasoning setting for supported models such as gpt-realtime-2.
session.parallel_tool_calls boolean
Allow parallel tool calls on supported realtime models.
session.instructions string
Default system instructions for the session.
session.include array
Additional server output fields to include, such as item.input_audio_transcription.logprobs.
session.max_output_tokens integer | string
Maximum output tokens per assistant response, or inf.
session.output_modalities array
Output modalities such as text or audio.
session.audio object
Input/output audio config, including session.audio.input.transcription.model such as gpt-realtime-whisper, session.audio.input.transcription.delay, session.audio.input.turn_detection, session.audio.input.noise_reduction, and session.audio.output.language.
session.prompt object
Reusable prompt reference and variables for the session.
session.tools array
Tools available to the realtime model.
session.tool_choice string | object
How tools are selected.
session.tracing string | object | null
Trace configuration for the realtime session.
session.truncation string | object
Conversation truncation behavior for the session.

See the official docs above for transport, lifecycle, and tuning details.

Successful responses are returned in msg.payload with top-level value, expires_at, and session fields.

â‹™ Accept Realtime Call

Accept an incoming SIP call and attach it to a realtime session.

msg.payload Properties

call_id string
The incoming call id.
type string
Must be realtime.
include array
Additional server output fields to include, such as item.input_audio_transcription.logprobs.
model string
Realtime model id, including gpt-realtime-2, gpt-realtime-1.5, and gpt-audio-1.5.
reasoning.effort string
Reasoning setting for supported realtime call models.
parallel_tool_calls boolean
Allow multiple parallel tool calls for supported realtime call models.
instructions string
System instructions for the call session.
max_output_tokens integer | string
Maximum output tokens per assistant response, or inf.
output_modalities array
Output modalities such as text or audio.
audio object
Input/output audio config for the accepted call session.
prompt object
Reusable prompt reference and variables for the call session.
tools array
Tools available in the call session.
tool_choice string | object
Tool selection strategy.
tracing string | object | null
Trace configuration for the accepted call session.
truncation string | object
Conversation truncation behavior for the call session.

â‹™ Hangup Realtime Call

Hang up an active realtime call.

msg.payload Properties

call_id string
The call id.

â‹™ Refer Realtime Call

Transfer an active call using SIP REFER.

msg.payload Properties

call_id string
The call id.
target_uri string
Transfer target URI, for example tel:+14155550123.

â‹™ Reject Realtime Call

Reject an incoming call.

msg.payload Properties

call_id string
The call id.
status_code integer
Optional SIP status code. Default is 603.

Call operations return a small confirmation object in msg.payload when successful.