# Limits

## Early access

raw.computer is in early access. Accounts, the console, API keys, members, the wallet, budgets, usage and the API work
today. **No [cell](/docs/concepts#cells) (a group of our hosts that runs sandboxes) is open to customers yet**, so every `POST /v1/sandboxes` answers
`503` [`capacity_unavailable`](/docs/errors#capacity_unavailable), whatever `on_full` says. Nothing is queued for
capacity that does not exist, and nothing is billed. Creates open when the first cell does; the same request will then
start a sandbox or queue it with an ETA. Limits on concurrent sandboxes, the trial and spending are published here
before cells open.

## Sizes

| Size | vCPU | Memory | Disk included while running | `std` | `perf` |
| --- | --- | --- | --- | --- | --- |
| `2x4` | 2 | 4 GiB | 20 GiB | yes | yes |
| `2x8` | 2 | 8 GiB | 20 GiB | yes | — |
| `4x8` | 4 | 8 GiB | 40 GiB | yes | yes |
| `4x16` | 4 | 16 GiB | 40 GiB | yes | — |
| `8x16` | 8 | 16 GiB | 80 GiB | yes | yes |
| `8x32` | 8 | 32 GiB | 80 GiB | yes | — |
| `16x32` | 16 | 32 GiB | 160 GiB | yes | yes |
| `16x64` | 16 | 64 GiB | 160 GiB | yes | — |
| `32x64` | 32 | 64 GiB | 320 GiB | yes | yes |
| `32x128` | 32 | 128 GiB | 320 GiB | yes | — |

## Requests

| What                | Limit                                                                               |
| ------------------- | ----------------------------------------------------------------------------------- |
| `Idempotency-Key`   | 1 to 255 characters, remembered for 24 hours per API key; only 2xx answers are kept |
| `GET /v1/sandboxes` | `limit` 1 to 200, 50 by default                                                     |
| `GET /v1/wallet`    | `limit` 1 to 100, 20 by default                                                     |
| `GET /v1/usage`     | `from` to `to` at most 366 days apart; the last 30 days by default                  |
| Sandbox `name`      | 1 to 200 characters                                                                 |
| API key `name`      | 1 to 100 characters                                                                 |
| Workspace `name`    | 1 to 100 characters                                                                 |
| An invitation       | valid for 7 days; accepted by the person it was mailed to, signed in                |
| Rate limits         | [below](#rate-limits)                                                               |

## Rate limits

| What | Counted per | Limit |
| --- | --- | --- |
| Every `/v1` request | API key | 200 requests in 10 seconds |
| Signing up | IP address | 10 attempts in 60 seconds |
| Signing in | IP address | 10 attempts in 60 seconds |
| A password reset (asking and setting) | IP address | 10 attempts in 60 seconds |
| A new verification link | IP address | 10 attempts in 60 seconds |
| Starting a sign-in of the CLI (`POST /v1/device/code`) | IP address | 10 attempts in 60 seconds |
| Polling a sign-in of the CLI (`POST /v1/device/token`) | IP address | 200 requests in 10 seconds |
| Sending an invitation (`POST /v1/invitations` and the console's **Members** page together) | workspace | 10 invitations in 60 seconds |

A request over a limit answers `429` [`rate_limited`](/docs/errors#rate_limited) in the one error shape, with a
`Retry-After` header (seconds) and `error.retry_at` (the same moment, RFC 3339). Wait that long and send the same
request again; an `Idempotency-Key` holds nothing for a `429`, so the same key is right. The limits are generous on
purpose: an agent that polls a sandbox every second, or runs a few hundred calls in a burst, never meets them. The one
that is tight is the invitations', because each one mails a person who did not ask for it: an agent that invites a team
sends as many as the limit allows, waits `Retry-After`, and goes on.

The counts are kept by each Cloudflare location on its own and are approximate: a key used from two places at once is
counted twice as loosely, and a count may run a little past its limit before it answers `429`. They are a ceiling
against floods, not a meter to plan against. Need more? Use several keys, or tell us.

## Budgets

An org can set a monthly cap, and each workspace one of its own, with alerts at shares of it. A start that the wallet or
a cap cannot pay for answers [`insufficient_funds`](/docs/errors#insufficient_funds); any key reads where its workspace
stands with `GET /v1/workspaces/{id}/budget`.
