curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/sandbox/execute' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"command": [
"string"
],
"env": {},
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeout_seconds": 250,
"working_dir": "string"
}'
Execute a command in an existing sandbox.
Required scope: sandbox:execute
POST
/
api
/
v1
/
sandbox
/
execute
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/sandbox/execute' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"command": [
"string"
],
"env": {},
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeout_seconds": 250,
"working_dir": "string"
}'
Required scope:
sandbox:execute
Request body
ExecuteRequest
string[]
required
Command to run (e.g., [‘python3’, ‘-c’, ‘print(‘hello’)’]).
object
Additional environment variables.
string
required
Sandbox ID to execute in.
integer (int32)
Execution timeout in seconds (default: 30).
string
Working directory inside the sandbox.
Response
No response body. Command executed.Status codes
| Code | Meaning |
|---|---|
200 | Command executed |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
503 | Sandbox infrastructure unavailable |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/sandbox/execute' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"command": [
"string"
],
"env": {},
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeout_seconds": 250,
"working_dir": "string"
}'
Last modified on August 31, 2026