# Limits

CapVM's limits: a 2-hour maximum per machine, 5 GB of outbound data per machine, blocked mail ports, and conservative concurrency for new accounts.

The wording in this section is quoted from the Acceptable Use Policy ("Technical limits (beta)"), which is part of the Terms of Service (Terms §9):

- Each machine stops at the end of its time limit, at most 2 hours (7200 s) in the beta.
- Each machine may send at most 5 GB of outbound data.
- Outgoing mail ports 25, 465 and 587 are blocked.
- New accounts may run at most 1 GPU and 3 machines at a time.
- These limits may change; the limits enforced by the API at the time are the ones that apply.

From the Terms of Service §5.2: **All data on a machine is permanently deleted when the machine is destroyed.** You are responsible for copying out anything you need. CapVM provides no backups.

## How these map to the API

| Limit | API behaviour |
|---|---|
| Time limit | `ttl_seconds` is required, from 60 to 7200. Outside that range → `400 ttl_out_of_range`. At `expires_at`, CapVM stops the machine. |
| Outbound data | CapVM checks each machine's outbound traffic and stops it at the cap (5 GiB, 5,368,709,120 bytes). |
| Mail ports | Outbound TCP 25, 465 and 587 are blocked at the network level. |
| New accounts | Over the limit → `403 account_limit_reached`. The limit is lifted once the organization is marked trusted. |
| Open payment dispute | No new machines while any card dispute is open → `403 account_suspended` `New machines are suspended while a payment dispute is open.` Running machines are stopped and destroyed within seconds (no grace period; usage up to the stop is billed), and the account gets one email listing them, the reason and the balance. Top-ups, keys and other routes aren't affected. Lifted when every dispute has closed; stopped machines aren't restarted. See [Billing → Refunds and disputes](billing-and-caps.md#refunds-and-disputes). |
| Per-key concurrency | Set per key → `409 concurrency_limit_exceeded` |
| API rate | 120 requests / 60 s per key → `429 rate_limited` with `Retry-After` (the seconds left before a request frees up) |
| `exec` | `command` up to 8192 characters, `timeout_seconds` from 1 to 300 (default 30), `working_directory` up to 256 characters, `stdout` and `stderr` capped at 256 KiB each (`truncated: true`). Past the timeout → `408 command_timeout` (CapVM waits at most `timeout_seconds` + 75 s). Not started by the machine within 30 s → cancelled with `409 machine_not_ready` (it didn't run, safe to retry). No exit code reported → `502 provider_error`. Command output is kept only until it's returned to you (at most 1 day). |
| Terms acceptance | No machines, keys or credits until a human accepts the current Terms (Terms §3.1) → `403 terms_not_accepted`. Signup links expire after 72 hours; the form token on the confirmation page after 15 minutes. Before the Terms take effect (effective date to be confirmed), signup is refused and these actions are refused for everyone. See [Signup](signup.md) |
| Signup rate | `POST /v1/signup`: 5 requests / hour per IP and 5 / hour per `accepted_by_email` (rolling window; retries count) → `429 rate_limited` with `Retry-After` set to the seconds left |
| Listings | `GET /v1/machines` and `GET /v1/usage` return the 100 most recent items |

## Machines

| SKU | Machine | Region | Root disk |
|---|---|---|---|
| `arm-small` | 2 vCPU, 4 GiB memory, Amazon Linux 2023 arm64 | `eu-central-2` (Zurich) | 20 GiB gp3, encrypted |
| `gpu-l4` | 1x NVIDIA L4 (24 GB) | `eu-central-2` (Zurich) | 20 GiB gp3, encrypted |

Every lease runs on its own VM, and the VM is terminated when the lease ends. There's no inbound access from the internet: SSH is open only to the CapVM control plane.
