curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/sandbox/create' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"env": {},
"profile": "string",
"timeout_seconds": 250
}'
Create an ephemeral sandbox pod.
Required scope: sandbox:execute
POST
/
api
/
v1
/
sandbox
/
create
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/sandbox/create' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"env": {},
"profile": "string",
"timeout_seconds": 250
}'
Required scope:
sandbox:execute
Request body
CreateSandboxRequest
object
Environment variables to inject.
string
Runtime profile (e.g., ‘default’, ‘python’, ‘node’).
integer (int32)
Maximum lifetime in seconds (default: 300).
Response
No response body. Sandbox created.Status codes
| Code | Meaning |
|---|---|
201 | Sandbox created |
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/create' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"env": {},
"profile": "string",
"timeout_seconds": 250
}'
Last modified on August 31, 2026