curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/validate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"include_neural_signals": false,
"inquiry": "Can I return my order?",
"max_ngram": 6,
"max_phrases": 2000,
"response": "Hi, I'm Dottie. You can return within 30 days."
}'
{
"escalations": [
"string"
],
"execution_time_ms": 250,
"missing_links": [
"string"
],
"neural": {
"confidence": 7.5,
"interpreted_confidence": 7.5,
"interpreted_output": {
"type": "null"
},
"output": {
"type": "null"
},
"symbols": [
1
]
},
"program_version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"response_invalid": true,
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"topics": [
"string"
],
"valid": true,
"violations": [
"string"
]
}
Validate a response using NSR-L rules + text signals.
Required scope: write
POST
/
api
/
v1
/
nsr
/
validate
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/validate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"include_neural_signals": false,
"inquiry": "Can I return my order?",
"max_ngram": 6,
"max_phrases": 2000,
"response": "Hi, I'm Dottie. You can return within 30 days."
}'
{
"escalations": [
"string"
],
"execution_time_ms": 250,
"missing_links": [
"string"
],
"neural": {
"confidence": 7.5,
"interpreted_confidence": 7.5,
"interpreted_output": {
"type": "null"
},
"output": {
"type": "null"
},
"symbols": [
1
]
},
"program_version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"response_invalid": true,
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"topics": [
"string"
],
"valid": true,
"violations": [
"string"
]
}
Required scope:
write
Request body
NSRValidateRequest
string
Optional validation case id (used when replaying test cases).
boolean
Include NSR Machine neural signals in the response.
string
required
Customer inquiry text.
integer
Max n-gram length used for contains_text assertions.
integer
Cap on total phrases asserted per text.
boolean
Persist this validation run for history/auditing.
string
required
Draft response to validate.
Response
NSRValidateResponse
string[]
required
Escalation topics detected.
integer (int64)
required
Execution time in milliseconds.
string[]
required
Missing required links.
object
string
Optional NSR-L program version id used for this validation.
boolean
required
Response is explicitly invalid (response_invalid/1).
string
Optional persisted run id when stored.
string[]
required
Topics detected in the inquiry.
boolean
required
Overall validity (no violations/missing links/escalations and not response_invalid).
string[]
required
Prohibited phrases detected.
Status codes
| Code | Meaning |
|---|---|
200 | Validation result |
400 | Invalid request |
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/api/v1/nsr/validate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"include_neural_signals": false,
"inquiry": "Can I return my order?",
"max_ngram": 6,
"max_phrases": 2000,
"response": "Hi, I'm Dottie. You can return within 30 days."
}'
{
"escalations": [
"string"
],
"execution_time_ms": 250,
"missing_links": [
"string"
],
"neural": {
"confidence": 7.5,
"interpreted_confidence": 7.5,
"interpreted_output": {
"type": "null"
},
"output": {
"type": "null"
},
"symbols": [
1
]
},
"program_version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"response_invalid": true,
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"topics": [
"string"
],
"valid": true,
"violations": [
"string"
]
}
Last modified on August 31, 2026