curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/chat/stream' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"execute_ready_actions": true,
"history": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"max_recursive_steps": 1,
"message": "Two-person tent, green — replacement for damaged pole set.",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
Chat stream handler
Accepts a chat message and returns an SSE stream that progressively emits symbolic analysis, grounding status, reply tokens, and the final response…
POST
/
api
/
v1
/
nsr
/
chat
/
stream
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/chat/stream' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"execute_ready_actions": true,
"history": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"max_recursive_steps": 1,
"message": "Two-person tent, green — replacement for damaged pole set.",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
Accepts a chat message and returns an SSE stream that progressively emits
symbolic analysis, grounding status, reply tokens, and the final response.
Required scope:
write
Request body
StreamChatRequest
string
Existing conversation ID. A new UUID is generated when absent.
boolean
Execute ready chat actions against KB adapters. Defaults to true.
ChatMessage[]
Conversation history for contextual follow-ups.
integer
Recursive completion passes (1..=4, default 4).
string
required
The customer message to analyze and respond to.
string
Optional server-side session for conversation continuity.
string
Optional workflow identifier for tracing.
Response
No response body. SSE stream of ChatStreamEvent.Status codes
| Code | Meaning |
|---|---|
200 | SSE stream of ChatStreamEvent |
400 | Invalid request |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
422 | Message too long |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/chat/stream' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"execute_ready_actions": true,
"history": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"max_recursive_steps": 1,
"message": "Two-person tent, green — replacement for damaged pole set.",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
Last modified on August 31, 2026