> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boson.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Server events

> Handle session state, input audio, streamed responses, tool calls, errors, and lifecycle events.

<div className="realtime-event-catalog">
  Events sent by the server as JSON text frames. Every server event carries a server-generated `event_id` (string) and a `type`.

  ## Session and conversation

  ### `session.created`

  Sent in response to the first `session.update`. Contains the session id — read yours from `session.id`.

  <ResponseField name="session" type="object">
    The acknowledged session configuration, plus `id` (string) and `object: "realtime.session"`.
  </ResponseField>

  ### `session.updated`

  Acknowledges each `session.update` after the first.

  <ResponseField name="session" type="object">
    Same shape as in `session.created`.
  </ResponseField>

  ### `conversation.item.added`

  An item entered the conversation — user turns, assistant replies, tool calls and results, and client-created items alike.

  <ResponseField name="item" type="object">
    The [conversation item](#conversation-items).
  </ResponseField>

  <ResponseField name="previous_item_id" type="string | null">
    Id of the item immediately before this one; `null` for the first item.
  </ResponseField>

  ### `conversation.item.retrieved`

  Answer to `conversation.item.retrieve`.

  <ResponseField name="item" type="object">
    The requested [conversation item](#conversation-items).
  </ResponseField>

  ### `conversation.item.truncated`

  Acknowledges `conversation.item.truncate`, echoing its fields.

  <ResponseField name="item_id" type="string">
    Id of the truncated item.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the truncated content part.
  </ResponseField>

  <ResponseField name="audio_end_ms" type="integer">
    Cut position in milliseconds (`0` for the text-only no-op).
  </ResponseField>

  ### `conversation.item.deleted`

  Acknowledges `conversation.item.delete`.

  <ResponseField name="item_id" type="string">
    Id of the removed item.
  </ResponseField>

  ### `conversation.context.summarized`

  With `truncation: "auto"`, older conversation items were condensed into a summary to stay within the model's context window. The summarized items remain retrievable via `conversation.item.retrieve`. Extension; not part of the OpenAI Realtime API — clients built on OpenAI SDK event types should tolerate this unknown event type.

  <ResponseField name="summary" type="string">
    The summary text.
  </ResponseField>

  <ResponseField name="summarized_item_ids" type="array of string">
    Ids of the items condensed into the summary.
  </ResponseField>

  <ResponseField name="summary_item_id" type="string">
    Id of the new summary item.
  </ResponseField>

  <ResponseField name="token_count_before" type="integer">
    Context token count before summarization.
  </ResponseField>

  <ResponseField name="token_count_after" type="integer">
    Context token count after summarization.
  </ResponseField>

  ## Input audio

  ### `input_audio_buffer.speech_started`

  Server VAD detected the start of user speech. If the assistant is speaking, this is the barge-in signal — stop local playback.

  <ResponseField name="item_id" type="string">
    Id of the user item this speech will be added to.
  </ResponseField>

  <ResponseField name="audio_start_ms" type="integer">
    Position in the input audio stream, in milliseconds, where speech begins (includes `prefix_padding_ms`).
  </ResponseField>

  ### `input_audio_buffer.speech_stopped`

  Server VAD detected the end of user speech; a response follows automatically.

  <ResponseField name="item_id" type="string">
    Id of the user item.
  </ResponseField>

  <ResponseField name="audio_end_ms" type="integer">
    Position in the input audio stream, in milliseconds, where speech ends.
  </ResponseField>

  ### `input_audio_buffer.committed`

  The input buffer was committed as a user item — after a client `input_audio_buffer.commit`.

  <ResponseField name="item_id" type="string">
    Id of the user item the audio was committed to.
  </ResponseField>

  <ResponseField name="previous_item_id" type="string | null">
    Id of the item before it, or `null`.
  </ResponseField>

  ### `input_audio_buffer.cleared`

  Acknowledges `input_audio_buffer.clear`. No fields beyond `event_id` and `type`.

  ### `conversation.item.input_audio_transcription.completed`

  Final transcript of a user audio turn. Only emitted when `audio.input.transcription.model` is configured (`higgs-stt-3.1`); when unset, no transcription events are emitted.

  <ResponseField name="item_id" type="string">
    Id of the user item the transcript belongs to.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the audio content part that was transcribed.
  </ResponseField>

  <ResponseField name="transcript" type="string">
    The transcript text.
  </ResponseField>

  ## Response lifecycle

  ### `response.created`

  Response generation started.

  <ResponseField name="response" type="object">
    The [response object](#response-object) with `status: "in_progress"`. Its `metadata` echoes the `metadata` from your `response.create`, letting you correlate this response with the request that triggered it (`null` when none was sent, e.g. VAD-triggered responses).
  </ResponseField>

  ### `response.output_item.added`

  An output item (assistant message or tool call) was added to the response.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="item" type="object">
    The [conversation item](#conversation-items).
  </ResponseField>

  ### `response.output_item.done`

  An output item finished streaming. Fields as in `response.output_item.added`, with the completed item.

  ### `response.content_part.added`

  A content part started streaming within an output item.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the output item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the part within the item's content.
  </ResponseField>

  <ResponseField name="part" type="object">
    Content part: `type` (`"text"` | `"audio"`), `audio` (string, base64, or null), `transcript` (string or null).
  </ResponseField>

  ### `response.content_part.done`

  A content part finished streaming. Fields as in `response.content_part.added`, with the completed part.

  ### `response.output_audio.delta`

  A chunk of output audio, encoded in the configured `audio.output.format`.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the output item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the audio content part.
  </ResponseField>

  <ResponseField name="delta" type="string">
    Base64-encoded audio chunk.
  </ResponseField>

  ### `response.output_audio.done`

  The audio stream for a content part completed. Same fields as `response.output_audio.delta`, without `delta`.

  ### `response.output_audio_transcript.delta`

  Streaming transcript of the audio the assistant is speaking.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the output item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the content part.
  </ResponseField>

  <ResponseField name="delta" type="string">
    Transcript text fragment.
  </ResponseField>

  ### `response.output_audio_transcript.length`

  A transcript fragment annotated with the duration of its corresponding audio — useful for aligning captions with playback. Extension; not part of the OpenAI schema.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the output item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the content part.
  </ResponseField>

  <ResponseField name="delta" type="string">
    Transcript text fragment.
  </ResponseField>

  <ResponseField name="length_ms" type="integer">
    Duration in milliseconds of the audio corresponding to `delta`.
  </ResponseField>

  ### `response.output_audio_transcript.done`

  The spoken transcript for a content part is complete.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the output item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the content part.
  </ResponseField>

  <ResponseField name="transcript" type="string">
    The full transcript of the spoken audio.
  </ResponseField>

  ### `response.output_text.delta`

  A fragment of streamed text output. Emitted instead of audio events when `output_modalities` is `["text"]`.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the output item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the content part.
  </ResponseField>

  <ResponseField name="delta" type="string">
    Text fragment.
  </ResponseField>

  ### `response.output_text.done`

  The text output for a content part is complete. Note this event carries no `item_id` — correlate via `response.output_item.done`.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="content_index" type="integer">
    Index of the content part.
  </ResponseField>

  <ResponseField name="text" type="string">
    The full text output.
  </ResponseField>

  ### `response.function_call_arguments.delta`

  Streaming fragment of a tool call's arguments.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the `function_call` item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="call_id" type="string">
    Id of the tool call; echo it in `function_call_output`.
  </ResponseField>

  <ResponseField name="delta" type="string">
    JSON arguments fragment.
  </ResponseField>

  ### `response.function_call_arguments.done`

  A tool call's arguments are complete. Execute the function and return the result via `conversation.item.create` (`function_call_output`), then send `response.create`.

  <ResponseField name="response_id" type="string">
    Id of the response.
  </ResponseField>

  <ResponseField name="item_id" type="string">
    Id of the `function_call` item.
  </ResponseField>

  <ResponseField name="output_index" type="integer">
    Index of the item in the response output.
  </ResponseField>

  <ResponseField name="name" type="string">
    Name of the function to call.
  </ResponseField>

  <ResponseField name="call_id" type="string">
    Id of the tool call; echo it in `function_call_output`.
  </ResponseField>

  <ResponseField name="arguments" type="string">
    Complete JSON-encoded arguments.
  </ResponseField>

  ### `response.done`

  The response finished. Emitted exactly once per `response_id`. A response that ends in a tool call carries the completed `function_call` item in `response.output`.

  <ResponseField name="response" type="object">
    The [response object](#response-object). `status` is `completed` or `cancelled` (interrupted / `response.cancel`). The schema also defines `incomplete` and `failed`, but the server does not currently emit them.
  </ResponseField>

  ## Session control and status

  ### `error`

  Something went wrong. Billing refusals use `error.type: "insufficient_quota"` and precede WebSocket close code `4429`.

  <ResponseField name="error" type="object">
    `type` (string, error category), `code` (string or null), `message` (string, human-readable), `param` (string or null).
  </ResponseField>

  ### `session.idle_timeout`

  No user speech for the idle window (5 minutes). The session closes after this event.

  <ResponseField name="seconds_idle" type="integer">
    Seconds without detected user speech.
  </ResponseField>

  ### `session.max_duration_reached`

  The session reached its server-enforced wall-clock cap. The session closes after this event.

  <ResponseField name="max_duration_sec" type="integer">
    The enforced maximum session duration, in seconds.
  </ResponseField>

  ***

  ## Data types

  ### Conversation items

  All items have `id`, `object: "realtime.item"`, and a `type`:

  | Type                         | Fields                                                            | Notes                                                                                                                       |
  | ---------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
  | `message` (role `user`)      | `content[]` of `input_text` / `input_audio`, `status`             | Client-created messages carry `input_text` content; spoken turns carry audio with the transcript filled in as it completes. |
  | `message` (role `assistant`) | `content[]` of `text` / `audio` (with `transcript`), `status`     |                                                                                                                             |
  | `function_call`              | `call_id`, `name`, `arguments`, `status`, `executor` (`"client"`) | A tool call for your client to execute.                                                                                     |
  | `function_call_output`       | `call_id`, `output`, `status`                                     | Sent by the client with the tool's result.                                                                                  |

  ### Response object

  ```json theme={null}
  {
    "id": "resp_...",
    "object": "realtime.response",
    "status": "completed",
    "status_details": null,
    "output": [],
    "usage": null,
    "metadata": null
  }
  ```

  * `status` is `in_progress` (on `response.created`), then `completed` or `cancelled` (on `response.done`).
  * `status_details` is defined in the schema (`{"type": "cancelled", "reason": "turn_detected" | "client_cancelled"}`, `{"type": "incomplete", "reason": "max_output_tokens" | "content_filter"}`, `{"type": "failed", "error": {"code", "message"}}`) but is currently always sent as `null`.
  * `usage` (`{"total_tokens", "input_tokens", "output_tokens"}`) is currently always sent as `null`.
  * `metadata` is echoed on `response.created` only; `response.done` carries `metadata: null`.

  ## Related

  <CardGroup cols={2}>
    <Card title="Client events" icon="arrow-up-right-from-square" href="/api-reference/realtime/client-events">
      The events you send that trigger these.
    </Card>

    <Card title="Audio and voices" icon="volume-high" href="/models/higgs-realtime/guides/audio-and-voices">
      Decode `response.output_audio.delta` in the format you configured.
    </Card>

    <Card title="Turn detection and interruptions" icon="waveform" href="/models/higgs-realtime/guides/turn-detection-and-interruptions">
      Handling `speech_started` as the barge-in signal.
    </Card>

    <Card title="Tool use" icon="wrench" href="/models/higgs-realtime/guides/tool-calling">
      Acting on `response.function_call_arguments.done`.
    </Card>
  </CardGroup>
</div>

***
