curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/sandbox/evaluate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"candidate": {
"action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"payload": null,
"raw_text": "string",
"route": "string",
"tool_name": "string"
},
"context": {
"active_repl_sessions": [
"string"
],
"allowed_egress_domains": [
"string"
],
"allowed_read_roots": [
"string"
],
"allowed_write_roots": [
"string"
],
"budget_available": true,
"enabled_mcp_servers": [
"string"
],
"gui_grounded": true,
"mounted_secrets": [
"YOUR_API_KEY"
],
"requested_runtime": "string",
"runtime_class": "string",
"sandbox_role": "string",
"sandbox_state": "string",
"workspace_root": "string"
},
"observed": {
"changed_paths": [
"string"
],
"contacted_domains": [
"string"
],
"exit_code": 1,
"output_truncated": true
},
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"phase": "admission",
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"evaluation": {
"canonical_action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"canonical_action_hash": "string",
"evidence": [
{
"key": null,
"value": null
}
],
"expected_effects": {
"egress_domains": [],
"may_execute_code": true,
"recommended_runtime": "string",
"requires_confirmation": true,
"touched_paths": []
},
"proof_trace": [
{
"detail": null,
"outcome": null,
"stage": null
}
],
"recommended_runtime": "string",
"rewritten_action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"rule_score": 8,
"rule_verdict": "allow",
"triggered_rules": [
{
"reason": null,
"rule_id": null,
"verdict": null,
"weight": null
}
]
},
"evidence_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"final_verdict": "allow",
"grounded_inputs": [
"string"
],
"machine_confidence": 7.5,
"machine_override": true,
"machine_proof": [
{
"input": "string",
"position": 1,
"symbol": "string",
"value": "49.00"
}
],
"machine_score": 8,
"machine_verdict": "allow",
"processing_time_ms": 250
}
SandboxPolicyEvaluate
Required scope: write
POST
/
api
/
v1
/
policy
/
sandbox
/
evaluate
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/sandbox/evaluate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"candidate": {
"action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"payload": null,
"raw_text": "string",
"route": "string",
"tool_name": "string"
},
"context": {
"active_repl_sessions": [
"string"
],
"allowed_egress_domains": [
"string"
],
"allowed_read_roots": [
"string"
],
"allowed_write_roots": [
"string"
],
"budget_available": true,
"enabled_mcp_servers": [
"string"
],
"gui_grounded": true,
"mounted_secrets": [
"YOUR_API_KEY"
],
"requested_runtime": "string",
"runtime_class": "string",
"sandbox_role": "string",
"sandbox_state": "string",
"workspace_root": "string"
},
"observed": {
"changed_paths": [
"string"
],
"contacted_domains": [
"string"
],
"exit_code": 1,
"output_truncated": true
},
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"phase": "admission",
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"evaluation": {
"canonical_action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"canonical_action_hash": "string",
"evidence": [
{
"key": null,
"value": null
}
],
"expected_effects": {
"egress_domains": [],
"may_execute_code": true,
"recommended_runtime": "string",
"requires_confirmation": true,
"touched_paths": []
},
"proof_trace": [
{
"detail": null,
"outcome": null,
"stage": null
}
],
"recommended_runtime": "string",
"rewritten_action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"rule_score": 8,
"rule_verdict": "allow",
"triggered_rules": [
{
"reason": null,
"rule_id": null,
"verdict": null,
"weight": null
}
]
},
"evidence_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"final_verdict": "allow",
"grounded_inputs": [
"string"
],
"machine_confidence": 7.5,
"machine_override": true,
"machine_proof": [
{
"input": "string",
"position": 1,
"symbol": "string",
"value": "49.00"
}
],
"machine_score": 8,
"machine_verdict": "allow",
"processing_time_ms": 250
}
Required scope:
write
Request body
SandboxPolicyRequest
Response
SandboxPolicyApiResponse
Show SandboxPolicyEvaluation
Show SandboxPolicyEvaluation
Status codes
| Code | Meaning |
|---|---|
200 | Sandbox policy evaluation 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 |
500 | Internal server error |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/sandbox/evaluate' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"candidate": {
"action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"payload": null,
"raw_text": "string",
"route": "string",
"tool_name": "string"
},
"context": {
"active_repl_sessions": [
"string"
],
"allowed_egress_domains": [
"string"
],
"allowed_read_roots": [
"string"
],
"allowed_write_roots": [
"string"
],
"budget_available": true,
"enabled_mcp_servers": [
"string"
],
"gui_grounded": true,
"mounted_secrets": [
"YOUR_API_KEY"
],
"requested_runtime": "string",
"runtime_class": "string",
"sandbox_role": "string",
"sandbox_state": "string",
"workspace_root": "string"
},
"observed": {
"changed_paths": [
"string"
],
"contacted_domains": [
"string"
],
"exit_code": 1,
"output_truncated": true
},
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"phase": "admission",
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"evaluation": {
"canonical_action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"canonical_action_hash": "string",
"evidence": [
{
"key": null,
"value": null
}
],
"expected_effects": {
"egress_domains": [],
"may_execute_code": true,
"recommended_runtime": "string",
"requires_confirmation": true,
"touched_paths": []
},
"proof_trace": [
{
"detail": null,
"outcome": null,
"stage": null
}
],
"recommended_runtime": "string",
"rewritten_action": {
"desktop_os": "string",
"image": "https://cdn.example.com/products/tent-2p.jpg",
"isolation": "string",
"timeout_seconds": 250,
"type": "create_sandbox"
},
"rule_score": 8,
"rule_verdict": "allow",
"triggered_rules": [
{
"reason": null,
"rule_id": null,
"verdict": null,
"weight": null
}
]
},
"evidence_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"final_verdict": "allow",
"grounded_inputs": [
"string"
],
"machine_confidence": 7.5,
"machine_override": true,
"machine_proof": [
{
"input": "string",
"position": 1,
"symbol": "string",
"value": "49.00"
}
],
"machine_score": 8,
"machine_verdict": "allow",
"processing_time_ms": 250
}
Last modified on August 31, 2026