Concepts
Limits and billing
Requests are billed by the CPU time they use, and every program runs under limits on time, steps, memory and size.
How CPU is metered
- What's measured is the CPU time of your program's process, not wall-clock time. Waiting for a free slot isn't charged.
- Each request is charged
max(1, ceil(cpu_ms))milliseconds, so the smallest charge is 1 ms. - Failed programs (errors, timeouts, limits) are charged the CPU time they used. Requests turned away before running cost nothing.
- The app's playground and the try-it box on this site aren't metered.
Monthly allowance
Every account gets 600 CPU-seconds a month, reset at the start of each UTC month. On the free plan, once it's used up, API calls get 429 cpu_quota_exceeded until the reset. On pay as you go, usage past the allowance is billed, up to a hard cap of 10 CPU-hours a month. See pricing.
Before a program runs, its timeout is reserved against what's left of the allowance. Afterwards the reservation is settled to what it actually used.
Limits
| Limit | Free | Pay as you go | Playground | Try-it demo |
|---|---|---|---|---|
| Wall-clock timeout | 1 s default, 5 s max | 1 s default, 10 s max | 1 s | 500 ms |
| Steps | 60M | 120M | 2M | 1M |
| Memory | 64 MB | 128 MB | 32 MB | 16 MB |
| Integer size | 100k bits | 100k bits | 20k bits | 10k bits |
| Compound expressions | No cap | No cap | 200 | 50 |
| Source size | 64 KB | 64 KB | 16 KB | 4 KB |
| Output (stdout) | 64 KB | 64 KB | 16 KB | 4 KB |
| Printed value, per result | 16 KB | 16 KB | 8 KB | 2 KB |
| Rate limit | 60 / min per key | 300 / min per key | 20 runs / min | 10 / min, 100 / day per IP |
| Concurrent requests | 4 per account | 8 per account | – | – |
| Monthly CPU | 600 s | 600 s included, 10 h cap | Not metered | Not metered |
timeout_ms sets the wall-clock limit per request, up to your plan's maximum. Hitting a limit ends the program with status timeout or limit_exceeded; see program errors.
Rate limit headers
Evaluations carry the per-key rate limit in their headers. RateLimit-Reset is in seconds.
Where you stand
GET /v1/limits returns your plan and current usage, and doesn't count against the rate limit.
| Field | Description |
|---|---|
planstring · required | The account's plan. |
rate_limitobject · required | — |
in_flightobject · required | — |
cpuobject · required | — |
max_timeout_msinteger · required | — |
request_idstring · required | — |