Chat API
Send Message
POST /v1/chat
Content-Type: application/json
X-API-Key: your-api-keyRequest
json
{
"messages": [
{ "role": "user", "content": "What is the capital of France?" }
],
"session_id": "s_12345"
}Response
json
{
"reply": "The capital of France is Paris.",
"skills_used": [],
"steps": 1,
"plan": [
{
"id": 1,
"action": "answer",
"skill": "direct",
"status": "done",
"result": "The capital of France is Paris."
}
]
}Stream Response (SSE)
POST /v1/chat/stream
Content-Type: application/json
X-API-Key: your-api-keySame request body as /v1/chat. Response is a Server-Sent Events stream:
event: delta
data: {"content": "The capital"}
event: delta
data: {"content": " of France"}
event: delta
data: {"content": " is Paris."}
event: done
data: {"skills_used": [], "steps": 1}
data: [DONE]Events
| Event | Description |
|---|---|
delta | Partial content chunk |
done | Final summary (skills used, steps) |
error | Error occurred |