Docs / Realtime API / Server events

Realtime API

Server events

The events the Realtime socket sends, in OpenAI’s Realtime transcription format. Ignore event types you do not handle.

Events

EventMeaning
session.createdThe session is open.
session.updatedThe configuration in effect. Fields without effect come back as null.
input_audio_buffer.speech_startedA new segment has begun: item_id, audio_start_ms.
conversation.item.input_audio_transcription.deltaNew text for the segment named by item_id, in delta.
input_audio_buffer.speech_stopped, input_audio_buffer.committedThe segment has ended: item_id, with audio_end_ms or previous_item_id.
conversation.item.input_audio_transcription.completedThe segment’s full transcript, with audio_start_ms and audio_end_ms.
errorA problem with an event, in error.code and error.message. The session continues unless the socket closes.
session.endThe session has ended, just before the socket closes: reason and stats. An addition of .wave’s.

Speech events

Speech events follow the recognized text, so they arrive slightly after the sound. For the acoustic onset, run your own voice activity detector.

Why a session ended

session.end.reason is client_close, deleted, idle_timeout, max_duration, input_audio_overflow, protocol_error, server_shutdown or internal_error. session.end.stats counts the session’s audio, such as frames, late_frames, missing_frames and duplicate_frames. The socket then closes with a close code.