# Create a sandbox key

> Get a free sandbox key (`sk-orb-test-…`) with one request and no account, so an agent or script can try every endpoint end to end.

`POST https://api.openrobotics.dev/v1/sandbox/keys`

No key and no sign-up needed. Every call made with the key returns deterministic simulated output of the real shape, marked `"sandbox": true`; it is never billed and never runs on a GPU. World-model jobs ([`POST /predict`](https://www.openrobotics.dev/docs/api/predict)) have no simulated stand-in, so they need a real key. The key expires after 24 hours and makes at most 20 calls a minute. For real model output, create a key on the [API keys](https://www.openrobotics.dev/keys) page. See [Test keys](https://www.openrobotics.dev/docs/authentication#test-keys).

## Request body

JSON, with `Content-Type: application/json`.

- `name` (string): A name for the key, up to 64 characters. Default: `"Sandbox key"`.

## Response

- `key` (string): The key, shown only this once. Send it as `Authorization: Bearer <key>`.
- `data` (object): The key's details.
  - `label` (string): A shortened form of the key, safe to show.
  - `name` (string): Its name.
  - `sandbox` (boolean): Always `true`.
  - `expires_at` (integer): When it stops working, in Unix seconds (24 hours from now).
  - `limits` (object): Its rate limit.
    - `calls_per_minute` (integer): Calls it may make per minute.
- `note` (string): What the key can do, and where to get a real one.

## Errors

- `429`: This IP address (or IPv6 /64) already made 5 sandbox keys in the last hour; `Retry-After` says when it can make another (`rate_limit_error`)
- `503`: Too many sandbox keys are being created across everyone right now; retry after `Retry-After` (`rate_limit_error`)

Plus the errors every endpoint shares: see [Errors](https://www.openrobotics.dev/docs/errors).

## Example request

cURL:

```bash
curl -X POST https://api.openrobotics.dev/v1/sandbox/keys \
  -H "Content-Type: application/json" \
  -d '{"name": "my agent"}'
```

Python:

```python
import openrobotics  # pip install openrobotics-sdk

client = openrobotics.OpenRobotics.sandbox()  # or: openrobotics.sandbox_key()
print(client.act("physical-intelligence/pi0", instruction="pick up the cup", observation={})["sandbox"])
```

TypeScript:

```typescript
const { key } = await fetch("https://api.openrobotics.dev/v1/sandbox/keys", { method: "POST" }).then((r) => r.json());
// or, with the SDK: const client = await OpenRobotics.sandbox();
```

## Example response

```json
{
  "key": "sk-orb-test-5f0c…",
  "data": {
    "label": "sk-orb-test-5f0c...a91",
    "name": "my agent",
    "sandbox": true,
    "expires_at": 1796313600,
    "limits": { "calls_per_minute": 20 }
  },
  "note": "Free sandbox key: … For real model output, create a key at https://www.openrobotics.dev/keys"
}
```
