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

# response.done

响应进入最终状态时发送。无论最终状态为何，该事件都会发送；如果响应进行了角色渲染，则该事件只会在 `response.render.stopped` 之后发送。响应中包含所有已生成的输出项，但不包含原始音频数据。

## 事件字段

**event\_id** `string` *required*

服务端事件的唯一 ID。

**type** `string` *required*

事件类型。必须为 `response.done`。

**response** `realtime_response` *required*

响应资源。

**response.id** `string`

响应的唯一 ID。

**response.status** `string`

响应的最终状态。客户端应检查此字段，其值可能为 `completed`、`cancelled`、`failed` 或 `incomplete`。

**response.status\_details** `object | null`

响应状态的附加详情。

**response.output** `conversation_item[]`

响应期间生成的所有输出对话项。原始音频和视频通过 RTC 媒体轨道传输，不包含在此字段中。

**response.max\_output\_tokens** `number | 'inf'`

响应允许生成的最大输出 token 数。

```json response.done theme={null}
{
  "type": "response.done",
  "event_id": "event_response_done_001",
  "response": {
    "id": "resp_done_001",
    "status": "completed",
    "status_details": null,
    "output": [
      {
        "id": "item_message_001",
        "type": "message",
        "status": "completed",
        "role": "assistant",
        "content": [
          {
            "type": "text",
            "text": "Loud and clear! I can hear you perfectly. How can I help you today?"
          }
        ]
      }
    ],
    "max_output_tokens": "inf"
  }
}
```


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