OpenAI API

RealtimeServerEventInputAudioBufferSpeechStarted

object

Sent by the server when in server_vad mode to indicate that speech has been
detected in the audio buffer. This can happen any time audio is added to the
buffer (unless speech is already detected). The client may want to use this
event to interrupt audio playback or provide visual feedback to the user.

The client should expect to receive a input_audio_buffer.speech_stopped event
when speech stops. The item_id property is the ID of the user message item
that will be created when speech stops and will also be included in the
input_audio_buffer.speech_stopped event (unless the client manually commits
the audio buffer during VAD activation).

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be input_audio_buffer.speech_started.

Allowed values:input_audio_buffer.speech_started

audio_start_msintegerrequired

Milliseconds from the start of all audio written to the buffer during the
session when speech was first detected. This will correspond to the
beginning of audio sent to the model, and thus includes the
prefix_padding_ms configured in the Session.

item_idstringrequired

The ID of the user message item that will be created when speech stops.

Example

RealtimeServerEventInputAudioBufferSpeechStopped

object

Returned in server_vad mode when the server detects the end of speech in
the audio buffer. The server will also send an conversation.item.created
event with the user message item that is created from the audio buffer.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be input_audio_buffer.speech_stopped.

Allowed values:input_audio_buffer.speech_stopped

audio_end_msintegerrequired

Milliseconds since the session started when speech stopped. This will
correspond to the end of audio sent to the model, and thus includes the
min_silence_duration_ms configured in the Session.

item_idstringrequired

The ID of the user message item that will be created.

Example

RealtimeServerEventRateLimitsUpdated

object

Emitted at the beginning of a Response to indicate the updated rate limits.
When a Response is created some tokens will be “reserved” for the output
tokens, the rate limits shown here reflect that reservation, which is then
adjusted accordingly once the Response is completed.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be rate_limits.updated.

Allowed values:rate_limits.updated

rate_limitsarray[object]required

List of rate limit information.

Show Child Parameters
Example

RealtimeServerEventResponseAudioDelta

object

Returned when the model-generated audio is updated.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be response.audio.delta.

Allowed values:response.audio.delta

response_idstringrequired

The ID of the response.

item_idstringrequired

The ID of the item.

output_indexintegerrequired

The index of the output item in the response.

content_indexintegerrequired

The index of the content part in the item’s content array.

deltastringrequired

Base64-encoded audio data delta.

Example

RealtimeServerEventResponseAudioDone

object

Returned when the model-generated audio is done. Also emitted when a Response
is interrupted, incomplete, or cancelled.

event_idstringrequired

The unique ID of the server event.

typestringrequired

The event type, must be response.audio.done.

Allowed values:response.audio.done

response_idstringrequired

The ID of the response.

item_idstringrequired

The ID of the item.

output_indexintegerrequired

The index of the output item in the response.

content_indexintegerrequired

The index of the content part in the item’s content array.

Example