API Reference
Chat
Send messages and receive AI responses
POST
Request
Send a message to an agent and receive a streaming response.The ID of the agent to chat with
Array of message objects with
role and contentOptional conversation ID to continue an existing conversation
Message Object
user- Messages from the end userassistant- Previous AI responses (for context)
Response
The response is a Server-Sent Events (SSE) stream.Event Types
| Event | Description |
|---|---|
message_start | Start of assistant response |
content_block_start | Start of content block |
content_block_delta | Text chunk |
tool_use_start | Agent is calling a tool |
tool_result | Tool execution result |
content_block_stop | End of content block |
message_stop | End of message |