Real-time chat session
WebSocket API used in real-time conversations (e.g. those created with chat_realtime
).
{
"id": "<string>",
"payload": {
"type": "<string>"
}
}
{
"id": "<string>",
"payload": {
"type": "<string>",
"text": "<string>"
}
}
No examples found
{
"id": "<string>",
"payload": {
"type": "<string>"
}
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>"
},
"experimental": true
}
No examples found
No examples found
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"text_delta": "<string>",
"generation_id": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"text": "<string>",
"interrupted": true,
"has_tool_calls": true,
"generation_id": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>",
"result": "<string>",
"error": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"text": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"error": "<string>",
"source_event_id": "<string>"
},
"experimental": true
}
Unique identifier for the conversation, e.g. conv_8qm9JBCiTe7
.
Ephemeral token returned by the server when the conversation was created.
Start the conversation.
Send a message from the user to the agent.
Update the conversation context mid-session.
End the conversation.
Sent once the conversation has started.
Sent before a conversation starts. This can be used as webhook to preload data relevant to the conversation.
Indicates the context has been updated on the agent side.
Agent has sent a system-level notice (e.g. "This call may be recorded").
Streaming partial message content as it's being generated.
Sent when the agent finishes sending a message.
Sent when the agent triggers a tool call.
Sent when the tool call returns a result.
Acknowledgment that the user message was received.
Sent when the conversation has ended.
Emitted when a server-side error occurs during event handling.
{
"id": "<string>",
"payload": {
"type": "<string>"
}
}
{
"id": "<string>",
"payload": {
"type": "<string>",
"text": "<string>"
}
}
No examples found
{
"id": "<string>",
"payload": {
"type": "<string>"
}
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>"
},
"experimental": true
}
No examples found
No examples found
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"text_delta": "<string>",
"generation_id": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"text": "<string>",
"interrupted": true,
"has_tool_calls": true,
"generation_id": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>",
"result": "<string>",
"error": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"text": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>"
},
"experimental": true
}
{
"id": "<string>",
"created_at": "<string>",
"agent_id": "<string>",
"livemode": true,
"conversation_id": "<string>",
"payload": {
"type": "<string>",
"error": "<string>",
"source_event_id": "<string>"
},
"experimental": true
}