Skip to content

Chat API

Send Message

POST /v1/chat
Content-Type: application/json
X-API-Key: your-api-key

Request

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-key

Same 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

EventDescription
deltaPartial content chunk
doneFinal summary (skills used, steps)
errorError occurred

© 2025 云鸢科技(青岛)有限公司 × Dream Lab