curl --request POST \
--url 'https://api.nsr.stateset.com/v1/responses' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"input": "string",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"tools": [
{}
],
"tool_choice": "string",
"max_output_tokens": 1,
"response_format": {
"type": "standard",
"json_schema": {
"name": "Two-Person Tent",
"schema": {},
"strict": true
}
},
"text": {
"format": {}
},
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"goal": "string",
"target": "string",
"facts": [
{}
],
"rules": [
{}
],
"decompositions": [
{}
],
"hydrate_org_context": true,
"kb_limits": {},
"max_depth": 1,
"max_iterations": 8,
"confidence_threshold": 7.5,
"stream": true,
"stream_options": {
"include_usage": true
},
"previous_response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"store": true,
"metadata": {},
"include_nsr_metadata": true
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object": "string",
"created_at": 1,
"status": "pending",
"model": "string",
"output": [
{
"type": "standard",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"role": "string",
"content": [],
"call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"arguments": "string"
}
],
"output_text": "string",
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
},
"metadata": {},
"previous_response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"x_nsr": {}
}
Nsr responses handler
Required scope: write
POST
/
v1
/
responses
curl --request POST \
--url 'https://api.nsr.stateset.com/v1/responses' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"input": "string",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"tools": [
{}
],
"tool_choice": "string",
"max_output_tokens": 1,
"response_format": {
"type": "standard",
"json_schema": {
"name": "Two-Person Tent",
"schema": {},
"strict": true
}
},
"text": {
"format": {}
},
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"goal": "string",
"target": "string",
"facts": [
{}
],
"rules": [
{}
],
"decompositions": [
{}
],
"hydrate_org_context": true,
"kb_limits": {},
"max_depth": 1,
"max_iterations": 8,
"confidence_threshold": 7.5,
"stream": true,
"stream_options": {
"include_usage": true
},
"previous_response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"store": true,
"metadata": {},
"include_nsr_metadata": true
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object": "string",
"created_at": 1,
"status": "pending",
"model": "string",
"output": [
{
"type": "standard",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"role": "string",
"content": [],
"call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"arguments": "string"
}
],
"output_text": "string",
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
},
"metadata": {},
"previous_response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"x_nsr": {}
}
Required scope:
write
Request body
object
Tool selection mode (
auto, none, required) or a specific function as {'type': 'function', 'function': {'name': …}}.Response
object
Status codes
| Code | Meaning |
|---|---|
200 | OpenAI-compatible response object. With stream: true the body is a text/event-stream instead. |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/v1/responses' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"input": "string",
"instructions": "Two-person tent, green — replacement for damaged pole set.",
"tools": [
{}
],
"tool_choice": "string",
"max_output_tokens": 1,
"response_format": {
"type": "standard",
"json_schema": {
"name": "Two-Person Tent",
"schema": {},
"strict": true
}
},
"text": {
"format": {}
},
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"goal": "string",
"target": "string",
"facts": [
{}
],
"rules": [
{}
],
"decompositions": [
{}
],
"hydrate_org_context": true,
"kb_limits": {},
"max_depth": 1,
"max_iterations": 8,
"confidence_threshold": 7.5,
"stream": true,
"stream_options": {
"include_usage": true
},
"previous_response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"store": true,
"metadata": {},
"include_nsr_metadata": true
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object": "string",
"created_at": 1,
"status": "pending",
"model": "string",
"output": [
{
"type": "standard",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"role": "string",
"content": [],
"call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Two-Person Tent",
"arguments": "string"
}
],
"output_text": "string",
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
},
"metadata": {},
"previous_response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"x_nsr": {}
}
Last modified on August 31, 2026