/api/chat2 / 10s burst · 100 / day per IPStreamed chat with tool-calling loop
Request
{
"session_id": "user-abc-123",
"message": "What time is it in Tokyo?",
"options": {
"temperature": 0.9,
"maxTokens": 8192
}
}Response
Content-Type: text/event-stream
data: {"type":"start_process","content":""}
data: {"type":"start_think","content":"User wants Tokyo time."}
data: {"type":"think","content":"Calling get_time tool."}
data: {"type":"end_think","content":""}
data: {"type":"tool_start","tool":"get_time","args":{"timezone":"Asia/Tokyo"},"iteration":1}
data: {"type":"tool_result","tool":"get_time","result":{"time":"2026-07-21 22:14 JST"},"success":true}
data: {"type":"end_tool","content":"tool executed successfully"}
data: {"type":"start_text","content":"It's "}
data: {"type":"text","content":"22:14 JST in Tokyo."}
data: {"type":"end_text","content":""}
data: {"type":"end_process","content":"done, hitIterationLimit: false, toolCalls: 1"}