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

# Server Events

> Events 60db sends over the Realtime WebSocket, grouped by session, audio, transcript, response and errors

The server sends these JSON events as text frames on the [Realtime WebSocket](https://docs.60db.ai/realtime/api-reference/websocket.md). Each event has a `type` field. Event names follow the OpenAI Realtime GA protocol.

## Session

| Type | When | Key fields |
| - | - | - |
| `session.created` | Socket is ready | `session` |
| `session.updated` | A `session.update` was applied | `session` |

## Input audio

| Type | When | Key fields |
| - | - | - |
| `input_audio_buffer.speech_started` | Speech detected. Stop local playback here (barge-in) | `audio_start_ms`, `item_id` |
| `input_audio_buffer.speech_stopped` | Speech ended | `audio_end_ms`, `item_id` |
| `input_audio_buffer.committed` | The user turn was committed | `item_id` |
| `input_audio_buffer.cleared` | The input buffer was cleared | |

## Conversation items

| Type | When | Key fields |
| - | - | - |
| `conversation.item.added` | An item joined the history | `item` |
| `conversation.item.done` | An item finished | `item` |
| `conversation.item.input_audio_transcription.delta` | Partial user transcript | `item_id`, `delta` |
| `conversation.item.input_audio_transcription.completed` | Final user transcript | `item_id`, `transcript` |

## Responses

| Type | When | Key fields |
| - | - | - |
| `response.created` | A reply started | `response` |
| `response.output_item.added` | An output item started | `response_id`, `item` |
| `response.output_item.done` | An output item finished | `response_id`, `item` |
| `response.content_part.added` | A content part started | `item_id`, `part` |
| `response.content_part.done` | A content part finished | `item_id`, `part` |
| `response.done` | The reply finished. Carries usage | `response` (`status`, `usage`) |

## Audio output

| Type | When | Key fields |
| - | - | - |
| `response.output_audio.delta` | A chunk of reply audio | `response_id`, `item_id`, `delta` (base64) |
| `response.output_audio.done` | Reply audio finished | `response_id`, `item_id` |
| `response.output_audio_transcript.delta` | A chunk of reply transcript | `response_id`, `item_id`, `delta` |
| `response.output_audio_transcript.done` | Reply transcript finished | `response_id`, `item_id`, `transcript` |
| `output_audio_buffer.started` | Output audio playback started | |
| `output_audio_buffer.stopped` | Output audio playback stopped | |
| `output_audio_buffer.cleared` | Output audio buffer cleared, for example after barge-in | |

Decode each `delta` from base64 and play the chunks in order at the configured output rate. The default is PCM16 at 24 kHz, mono.

## Text output

| Type | When | Key fields |
| - | - | - |
| `response.output_text.delta` | A chunk of reply text | `response_id`, `item_id`, `delta` |
| `response.output_text.done` | Reply text finished | `response_id`, `item_id`, `text` |

## Function calls

| Type | When | Key fields |
| - | - | - |
| `response.function_call_arguments.delta` | Streaming tool arguments | `call_id`, `delta` |
| `response.function_call_arguments.done` | Tool arguments complete | `call_id`, `name`, `arguments` |

See [Function tools](https://docs.60db.ai/realtime/function-tools.md) for the reply loop.

## Errors

| Type | When | Key fields |
| - | - | - |
| `error` | A request or session failed | `event_id`, `error` (`type`, `code`, `message`, `param`) |

## Examples

```json theme={null}
{
  "type": "response.done",
  "response": {
    "status": "completed",
    "usage": {
      "total_tokens": 96,
      "input_tokens": 42,
      "output_tokens": 54
    }
  }
}
```

```json theme={null}
{
  "type": "error",
  "event_id": "event_...",
  "error": { "type": "invalid_request_error", "code": "invalid_value", "message": "...", "param": "session.audio.output.voice" }
}
```

## Related

* [Client events](https://docs.60db.ai/realtime/api-reference/client-events.md)
* [WebSocket connection and close codes](https://docs.60db.ai/realtime/api-reference/websocket.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.