Browse docs

Voice sessions · vor-realtime-v1

Realtime events

Every event is JSON with a unique event_id. Responses keep stable response_id and item_id values from creation through terminal usage.

Client events

Commands sent from your WebSocket client to the gateway.

EventRequired fieldsContract
session.updateevent_id, sessionUpdate supported instructions, voice, turn detection, modalities, and public audio format.
input_audio_buffer.appendevent_id, audioAppend one aligned base64 raw PCM16LE frame. Maximum public frame size is 98,304 bytes.
input_audio_buffer.commitevent_idCommit a manual turn boundary after manual turn detection has been negotiated.
input_audio_buffer.clearevent_idDiscard pending input audio that has not been committed.
response.createevent_idRequest a response when using manual response control.
response.cancelevent_idCancel the current response and suppress stale output after an interruption.

Server events

Lifecycle, VAD, response output, usage, and bounded protocol errors.

EventRequired fieldsContract
session.createdevent_id, sessionFirst event after a successful connection; contains the public session resource.
conversation.createdevent_id, conversation_idConversation scope is ready for input audio.
session.updatedevent_id, sessionAcknowledges a supported session update.
input_audio_buffer.speech_startedevent_idServer VAD detected the start of a speech turn.
input_audio_buffer.speech_stoppedevent_idServer VAD detected the end of a speech turn.
input_audio_buffer.committedevent_idAcknowledges a manual input turn boundary.
input_audio_buffer.clearedevent_idAcknowledges that pending input audio was discarded.
response.createdevent_id, response_idA response generation has started.
response.output_item.addedevent_id, response_id, item_idA response output item has been added before its audio content arrives.
response.output_audio.deltaevent_id, response_id, item_id, output_index, content_index, deltaOne base64 output audio delta to play immediately.
response.output_audio.doneevent_id, response_id, item_idAll audio deltas for the current output content are complete.
response.output_item.doneevent_id, response_id, item_idThe response output item is complete.
response.doneterminalevent_id, response_id, usageTerminal response event. Usage is normalized for settlement and support.
errorevent_id, errorA bounded protocol error using the same logical error shape as HTTP.

Server events are emitted by the gateway. Clients should not synthesize lifecycle events.

Normal response order

Audio deltas can be zero or more; response.done is the terminal response signal.

session.createdconversation.createdsession.updatedresponse.createdresponse.output_item.addedresponse.output_audio.delta × Nresponse.output_audio.doneresponse.output_item.doneresponse.done
response.output_audio.delta
{
  "type": "response.output_audio.delta",
  "event_id": "evt_EXAMPLE",
  "response_id": "resp_EXAMPLE",
  "item_id": "item_EXAMPLE",
  "output_index": 0,
  "content_index": 0,
  "delta": "BASE64_PCM16LE_OUTPUT"
}

Audio event rules

The audio field is base64 of raw PCM16LE, never a WAV or provider-specific frame.

  • Send 20–100 ms frames in normal clients; each frame must be aligned to two-byte samples.
  • Play each response.output_audio.delta immediately instead of waiting for the whole response.
  • Ignore or suppress stale output after a response generation has been cancelled.
  • Use response.done.usage as the normalized terminal usage record.