> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an ephemeral sandbox pod.

> **Required scope:** sandbox:execute

**Required scope:** `sandbox:execute`

### Request body

`CreateSandboxRequest`

**env** `object`

Environment variables to inject.

**profile** `string`

Runtime profile (e.g., 'default', 'python', 'node').

**timeout\_seconds** `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 |

```bash cURL theme={null}
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
}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.