An open-source, faster Devin alternative
TypeScript
docs: rewrite reserved capacity for non-refundable + per-second model
Igor Zalutski4e73b8357495
diff --git a/docs/api-reference/capacity/cancel-block.mdx b/docs/api-reference/capacity/cancel-block.mdxdeleted file mode 100644index 3118e469..00000000--- a/docs/api-reference/capacity/cancel-block.mdx+++ /dev/null@@ -1,31 +0,0 @@-----title: 'Cancel Block'-api: 'DELETE /api/capacity/blocks/{blockId}'------<Info>- **Coming soon.** Reserved capacity is not yet available. See the- [Reserved Capacity overview](/reserved-capacity/overview).-</Info>--Cancel one capacity block by ID. Equivalent to a one-block-`POST /api/capacity/cancellations` call.--<ParamField path="blockId" type="string" required>- Block UUID. Must belong to the authenticated org and be currently cancellable.-</ParamField>--<ResponseExample>-```http 204-HTTP/1.1 204 No Content-```--```json 409 blocks_not_cancellable-{- "error": "blocks_not_cancellable",- "blocks": [- { "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562", "reason": "not_cancellable" }- ]-}-```-</ResponseExample>diff --git a/docs/api-reference/capacity/create-cancellations.mdx b/docs/api-reference/capacity/create-cancellations.mdxdeleted file mode 100644index 2d6e8954..00000000--- a/docs/api-reference/capacity/create-cancellations.mdx+++ /dev/null@@ -1,45 +0,0 @@-----title: 'Create Cancellations'-api: 'POST /api/capacity/cancellations'------<Info>- **Coming soon.** Reserved capacity is not yet available. See the- [Reserved Capacity overview](/reserved-capacity/overview).-</Info>--Cancel one or more capacity blocks by ID. Atomic all-or-nothing — if any-block in the request cannot be cancelled, none are cancelled. No-`skipIneligible` mode; retry with a refreshed ID list instead.--Send an `Idempotency-Key` header so retries return the original result.--<ParamField body="blockIds" type="string[]" required>- Block UUIDs to cancel. Must belong to the authenticated org and be- currently cancellable. Duplicates are de-duplicated server-side.-</ParamField>--<ResponseExample>-```json 200-{- "status": "cancelled",- "cancelledBlocks": 2,- "cancelledGb": 2,- "cancelledGbMinutes": 30,- "blocks": [- { "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562", "startsAt": "2026-04-25T09:00:00Z", "endsAt": "2026-04-25T09:15:00Z" },- { "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd", "startsAt": "2026-04-25T09:15:00Z", "endsAt": "2026-04-25T09:30:00Z" }- ]-}-```--```json 409 blocks_not_cancellable-{- "error": "blocks_not_cancellable",- "blocks": [- { "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562", "reason": "not_cancellable" },- { "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd", "reason": "already_started" }- ]-}-```-</ResponseExample>diff --git a/docs/api-reference/capacity/create-reservations.mdx b/docs/api-reference/capacity/create-reservations.mdxindex e4528fa3..984855a7 100644--- a/docs/api-reference/capacity/create-reservations.mdx+++ b/docs/api-reference/capacity/create-reservations.mdx@@ -1,5 +1,5 @@----title: 'Create Reservations'+title: 'Create Reservation'api: 'POST /api/capacity/reservations'---@@ -8,13 +8,17 @@ api: 'POST /api/capacity/reservations'[Reserved Capacity overview](/reserved-capacity/overview).</Info>-Reserve capacity across one or more 15-minute UTC intervals. Atomic across-the request — either every interval is booked or nothing is. See-[Reserving and cancelling](/reserved-capacity/reserving-and-cancelling) for-the full write contract.+Commit capacity across one or more 15-minute UTC intervals in a single+atomic write. The result is one reservation event with a server-generated+`reservationId` covering all intervals in the request. See+[Reserving capacity](/reserved-capacity/reserving) for the full write+contract.-Send an `Idempotency-Key` header so retries return the original result. Same-key with a different body returns `idempotency_key_conflict`.+Send an `Idempotency-Key` header so retries return the original result.+Same key with a different body returns `idempotency_key_conflict`.++Reservations are non-refundable — there is no cancellation, modification,+or transfer.<ParamField body="intervals" type="array" required>One entry per 15-minute interval to reserve.@@ -29,31 +33,24 @@ key with a different body returns `idempotency_key_conflict`.</ParamField><ParamField body="intervals[].capacityGb" type="integer" required>- Positive integer. Number of 1 GB blocks to create for this interval.+ Positive integer. GB to add to this interval's reserved capacity.</ParamField><ResponseExample>```json 200{- "status": "applied",- "blockDuration": "PT15M",- "reservedBlocks": 2,- "cancellableBlocks": 1,- "nonCancellableBlocks": 1,- "blocks": [+ "reservationId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",+ "createdAt": "2026-04-28T18:00:05Z",+ "intervals": [{- "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": false,- "cancellableUntil": null+ "startsAt": "2026-04-29T02:00:00Z",+ "endsAt": "2026-04-29T02:15:00Z",+ "capacityGb": 16},{- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T15:00:00Z"+ "startsAt": "2026-04-29T02:15:00Z",+ "endsAt": "2026-04-29T02:30:00Z",+ "capacityGb": 16}]}@@ -64,7 +61,7 @@ key with a different body returns `idempotency_key_conflict`."error": "capacity_not_available","intervals": [{- "startsAt": "2026-04-25T09:00:00Z",+ "startsAt": "2026-04-29T02:00:00Z","requestedGb": 80,"reservableGb": 30,"reason": "insufficient_capacity"diff --git a/docs/api-reference/capacity/get-block.mdx b/docs/api-reference/capacity/get-block.mdxdeleted file mode 100644index 1530330a..00000000--- a/docs/api-reference/capacity/get-block.mdx+++ /dev/null@@ -1,28 +0,0 @@-----title: 'Get Block'-api: 'GET /api/capacity/blocks/{blockId}'------<Info>- **Coming soon.** Reserved capacity is not yet available. See the- [Reserved Capacity overview](/reserved-capacity/overview).-</Info>--Read one capacity block by ID. Block identity is scoped by org — the same-UUID in another org is a different block and is invisible to this caller.--<ParamField path="blockId" type="string" required>- Block UUID.-</ParamField>--<ResponseExample>-```json 200-{- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T15:00:00Z"-}-```-</ResponseExample>diff --git a/docs/api-reference/capacity/get-calendar.mdx b/docs/api-reference/capacity/get-calendar.mdxindex 90484cc8..238d734d 100644--- a/docs/api-reference/capacity/get-calendar.mdx+++ b/docs/api-reference/capacity/get-calendar.mdx@@ -9,8 +9,9 @@ api: 'GET /api/capacity/calendar'</Info>Return a planning snapshot of 15-minute UTC intervals in the requested window.-One row per interval, with reservable, already-reserved, and policy fields.-See [Reading the calendar](/reserved-capacity/calendar) for field semantics.+One row per interval with current `reservedGb`, `reservableGb`, and the+per-org `reservationLimitGb`. See+[Reading the calendar](/reserved-capacity/calendar) for field semantics.<ParamField query="from" type="string" required>Window start. RFC 3339, aligned to 15 minutes, UTC.@@ -23,22 +24,18 @@ See [Reading the calendar](/reserved-capacity/calendar) for field semantics.<ResponseExample>```json 200{- "generatedAt": "2026-04-24T12:00:00Z",- "staleAt": "2026-04-24T12:00:10Z",- "blockDuration": "PT15M",+ "generatedAt": "2026-04-28T18:00:00Z",+ "staleAt": "2026-04-28T18:00:10Z",+ "intervalDuration": "PT15M","timezone": "UTC",- "earliestReservableStart": "2026-04-24T12:30:00Z",+ "earliestReservableStart": "2026-04-28T18:30:00Z","intervals": [{- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",+ "startsAt": "2026-04-29T02:00:00Z",+ "endsAt": "2026-04-29T02:15:00Z","reservationLimitGb": 300,"reservedGb": 80,- "reservableGb": 220,- "newReservationNonCancellableRatio": "0.25",- "cancellableGb": 55,- "nonCancellableGb": 25,- "usableGb": 120+ "reservableGb": 220}]}diff --git a/docs/api-reference/capacity/list-blocks.mdx b/docs/api-reference/capacity/list-blocks.mdxdeleted file mode 100644index 9b0d872c..00000000--- a/docs/api-reference/capacity/list-blocks.mdx+++ /dev/null@@ -1,57 +0,0 @@-----title: 'List Blocks'-api: 'GET /api/capacity/blocks'------<Info>- **Coming soon.** Reserved capacity is not yet available. See the- [Reserved Capacity overview](/reserved-capacity/overview).-</Info>--List capacity blocks held by the authenticated org, filtered by time window-and optionally by cancellability.--<ParamField query="from" type="string">- Return blocks whose `startsAt` is at or after this timestamp. RFC 3339, UTC.-</ParamField>--<ParamField query="to" type="string">- Return blocks whose `startsAt` is strictly before this timestamp. RFC 3339, UTC.-</ParamField>--<ParamField query="isCancellable" type="boolean">- When `true`, return only currently-cancellable blocks. When `false`, only- non-cancellable blocks. Omit for both.-</ParamField>--<ParamField query="cursor" type="string">- Pagination cursor from a previous response's `nextCursor`.-</ParamField>--<ParamField query="limit" type="integer">- Maximum blocks per page. Server-defined ceiling applies.-</ParamField>--<ResponseExample>-```json 200-{- "blocks": [- {- "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": false,- "cancellableUntil": null- },- {- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T15:00:00Z"- }- ],- "nextCursor": null-}-```-</ResponseExample>diff --git a/docs/api-reference/capacity/list-reservations.mdx b/docs/api-reference/capacity/list-reservations.mdxnew file mode 100644index 00000000..3c4ea73c--- /dev/null+++ b/docs/api-reference/capacity/list-reservations.mdx@@ -0,0 +1,56 @@+---+title: 'List Reservations'+api: 'GET /api/capacity/reservations'+---++<Info>+ **Coming soon.** Reserved capacity is not yet available. See the+ [Reserved Capacity overview](/reserved-capacity/overview).+</Info>++Return reservation events made by the authenticated org, in+reverse-chronological order by `createdAt`. Each reservation row includes+all the intervals it committed to. Useful for end-of-month reconciliation+and audit.++<ParamField query="from" type="string">+ Return reservations whose `createdAt >= from`. RFC 3339, UTC.+</ParamField>++<ParamField query="to" type="string">+ Return reservations whose `createdAt < to`. RFC 3339, UTC.+</ParamField>++<ParamField query="cursor" type="string">+ Pagination cursor from a previous response's `nextCursor`.+</ParamField>++<ParamField query="limit" type="integer">+ Maximum reservations per page. Server-defined ceiling applies.+</ParamField>++<ResponseExample>+```json 200+{+ "reservations": [+ {+ "reservationId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",+ "createdAt": "2026-04-28T18:00:05Z",+ "intervals": [+ {+ "startsAt": "2026-04-29T02:00:00Z",+ "endsAt": "2026-04-29T02:15:00Z",+ "capacityGb": 16+ },+ {+ "startsAt": "2026-04-29T02:15:00Z",+ "endsAt": "2026-04-29T02:30:00Z",+ "capacityGb": 16+ }+ ]+ }+ ],+ "nextCursor": null+}+```+</ResponseExample>diff --git a/docs/api-reference/capacity/reserve-block.mdx b/docs/api-reference/capacity/reserve-block.mdxdeleted file mode 100644index ef2b4fd8..00000000--- a/docs/api-reference/capacity/reserve-block.mdx+++ /dev/null@@ -1,57 +0,0 @@-----title: 'Reserve Block'-api: 'PUT /api/capacity/blocks/{blockId}'------<Info>- **Coming soon.** Reserved capacity is not yet available. See the- [Reserved Capacity overview](/reserved-capacity/overview).-</Info>--Reserve exactly one 1 GB block with a caller-chosen UUID. Equivalent to a-one-block `POST /api/capacity/reservations` call. Because the ID is-caller-supplied, replaying the same request body is naturally idempotent.--Block IDs are never recycled: once a block is cancelled or settled, its ID-cannot be reused.--<ParamField path="blockId" type="string" required>- Caller-generated UUID. Must be a valid v4 UUID. Org-scoped — the same- UUID used by another org is a different block.-</ParamField>--<ParamField body="startsAt" type="string" required>- Interval start. RFC 3339, UTC, aligned to 15 minutes.-</ParamField>--<ParamField body="endsAt" type="string" required>- Must equal `startsAt + 15 minutes`.-</ParamField>--<ResponseExample>-```json 200-{- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T15:00:00Z"-}-```--```json 409 block_id_conflict-{- "error": "block_id_conflict",- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "reason": "existing_block_has_different_interval"-}-```--```json 409 block_id_not_reusable-{- "error": "block_id_not_reusable",- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "reason": "previously_cancelled"-}-```-</ResponseExample>diff --git a/docs/docs.json b/docs/docs.jsonindex 81767353..2b8bbf5c 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -54,7 +54,7 @@"reserved-capacity/overview","reserved-capacity/concepts","reserved-capacity/calendar",- "reserved-capacity/reserving-and-cancelling",+ "reserved-capacity/reserving","reserved-capacity/usage-and-overage"]},@@ -226,11 +226,7 @@"pages": ["api-reference/capacity/get-calendar","api-reference/capacity/create-reservations",- "api-reference/capacity/create-cancellations",- "api-reference/capacity/list-blocks",- "api-reference/capacity/get-block",- "api-reference/capacity/reserve-block",- "api-reference/capacity/cancel-block"+ "api-reference/capacity/list-reservations"]},{diff --git a/docs/reserved-capacity/calendar.mdx b/docs/reserved-capacity/calendar.mdxindex aac546fd..bd9513b6 100644--- a/docs/reserved-capacity/calendar.mdx+++ b/docs/reserved-capacity/calendar.mdx@@ -1,6 +1,6 @@---title: "Reading the Calendar"-description: "Preview reservable capacity, planned terms, and what you already hold"+description: "Preview reservable capacity and existing commitments per 15-minute interval"---<Info>@@ -8,21 +8,19 @@ description: "Preview reservable capacity, planned terms, and what you already hmay change before launch.</Info>-The calendar is how you plan. It answers three questions at once, per-15-minute interval:+The calendar is how you plan. It answers, per 15-minute interval:1. How much GB can I still reserve here?-2. If I reserved right now, how much of that new reservation would lock- immediately?-3. How much do I already hold here, and how much of it can I still cancel?+2. How much do I already hold here?+3. What's the policy cap I'm working under?-The calendar never holds capacity. It's a snapshot read; write validation is+The calendar never holds capacity — it's a snapshot. Write validation isalways authoritative.## Request```bash curl-curl "https://app.opencomputer.dev/api/capacity/calendar?from=2026-04-25T09:00:00Z&to=2026-04-25T12:00:00Z" \+curl "https://app.opencomputer.dev/api/capacity/calendar?from=2026-04-29T02:00:00Z&to=2026-04-29T04:00:00Z" \-H "X-API-Key: $OPENCOMPUTER_API_KEY"```@@ -35,22 +33,18 @@ curl "https://app.opencomputer.dev/api/capacity/calendar?from=2026-04-25T09:00:0```json{- "generatedAt": "2026-04-24T12:00:00Z",- "staleAt": "2026-04-24T12:00:10Z",- "blockDuration": "PT15M",+ "generatedAt": "2026-04-28T18:00:00Z",+ "staleAt": "2026-04-28T18:00:10Z",+ "intervalDuration": "PT15M","timezone": "UTC",- "earliestReservableStart": "2026-04-24T12:30:00Z",+ "earliestReservableStart": "2026-04-28T18:30:00Z","intervals": [{- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",+ "startsAt": "2026-04-29T02:00:00Z",+ "endsAt": "2026-04-29T02:15:00Z","reservationLimitGb": 300,"reservedGb": 80,- "reservableGb": 220,- "newReservationNonCancellableRatio": "0.25",- "cancellableGb": 55,- "nonCancellableGb": 25,- "usableGb": 120+ "reservableGb": 220}]}@@ -62,64 +56,39 @@ curl "https://app.opencomputer.dev/api/capacity/calendar?from=2026-04-25T09:00:0| --- | --- || `generatedAt` | When the server computed this snapshot. || `staleAt` | After this, refresh before using the snapshot for planning. |-| `blockDuration` | Always `PT15M` in v1. |+| `intervalDuration` | Always `PT15M` in v1. || `timezone` | Always `UTC` in v1. |-| `earliestReservableStart` | First interval currently eligible for new reservations. Reservations before this time are rejected. |+| `earliestReservableStart` | First interval currently eligible for new reservations. The server enforces a minimum lead time between `now` and a bookable `startsAt`. |### Per-interval fields| Field | Meaning || --- | --- || `startsAt`, `endsAt` | The 15-minute UTC interval. |-| `reservationLimitGb` | Maximum GB this org may hold in this interval under policy. |+| `reservationLimitGb` | Maximum GB this org may commit in this interval (your `max_memory_gb`). || `reservedGb` | Total GB this org already has reserved in this interval. || `reservableGb` | Additional GB the server would currently accept. **This is the number to plan against.** |-| `newReservationNonCancellableRatio` | Decimal string in `[0, 1]`: fraction of a *new* reservation that would lock immediately. |-| `cancellableGb` | Already-reserved GB this org can still cancel at `generatedAt`. |-| `nonCancellableGb` | Already-reserved GB this org can no longer cancel at `generatedAt`. |-| `usableGb` | Reserved capacity available for actual usage in this interval. |--Invariant: `reservedGb == cancellableGb + nonCancellableGb`.## `reservableGb` is the planning field-Everything you need to decide "can I reserve 50 GB at 9am?" is in+Everything you need to decide "can I reserve 50 GB at 02:00?" is in`reservableGb`. The other fields are context:-- `reservationLimitGb` explains the policy cap behind `reservableGb`.-- `reservedGb` tells you how much you already have.-- The limit minus `reservedGb` gives your remaining headroom under the- policy cap. The server may still reduce `reservableGb` below that headroom- because of platform capacity.--## `newReservationNonCancellableRatio` is planning-only--This field describes what would happen if you made a new reservation against-this snapshot right now. It is not a property of any individual block.--The cancellable portion is `1 - newReservationNonCancellableRatio`.--Example: you reserve 80 GB at `09:00` with ratio `0.25`:--```text-20 GB locked immediately (cancellableUntil = null)-60 GB cancellable until assigned expiries-```--The exact `cancellableUntil` on each of those 60 GB comes from the policy-ladder applied at booking time. You can read the assigned values per block-via [`GET /api/capacity/blocks`](/api-reference/capacity/list-blocks).+- `reservationLimitGb` minus `reservedGb` is your remaining headroom under+ your org's per-interval cap. The server may still reduce `reservableGb`+ below that headroom because of platform-level capacity.+- `reservedGb` lets you confirm what you already hold without a separate+ call to `GET /api/capacity/reservations`.## `staleAt` is a freshness marker, not a hold-The calendar snapshot is cheap and immediate. `staleAt` tells clients when to-refresh before planning again, but capacity can change at any moment — another-tenant (or you, in another tab) may reserve or cancel between-`generatedAt` and your write.+The calendar snapshot is cheap and immediate. `staleAt` tells you when to+refresh, but capacity can change at any moment — another tenant (or you,+in another tab) may reserve between `generatedAt` and your write.-This is fine. Writes are atomic and validation is authoritative: if capacity-moved out from under you, the write returns `capacity_not_available` and you-re-read and retry.+This is fine. Writes are atomic and validation is authoritative: if+capacity moved, the write returns `capacity_not_available` and you read+again.## Race patterns@@ -140,7 +109,7 @@ POST /api/capacity/reservations capacityGb: 80 → rejected with reservableGbOn rejection, read the calendar again and either:- Re-submit with the actual current `reservableGb`, or-- Accept the smaller amount via multiple writes at different intervals, or+- Accept a smaller amount via multiple writes at different intervals, or- Bail out — not all demand fits.V1 does not accept a "reserve up to N, at least M" shape. Keep retries@@ -151,42 +120,43 @@ explicit in client code.```textPOST /api/capacity/reservationsintervals: [- 09:00 → 09:15, 80 GB- 09:15 → 09:30, 80 GB # only 30 available+ 02:00 → 02:15, 80 GB+ 02:15 → 02:30, 80 GB # only 30 available]-→ rejected; no blocks created+→ rejected; nothing reserved```-Multi-interval writes are atomic. If any interval fails, none are booked.-Split your request if you want partial success.+Multi-interval writes are atomic. If any interval fails, none are+reserved. Split your request if you want partial success.## Choosing the window-The calendar supports arbitrary `from`–`to` ranges aligned to the 15-minute+The calendar accepts arbitrary `from`–`to` ranges aligned to the 15-minutegrid. Practical guidance:- For interactive planning UIs, pull a day or a week at a time; render aheatmap of `reservableGb`.- For scheduled reservation scripts, query just the intervals you're aboutto write — don't pull a week if you only need two hours.-- For large time ranges, expect the response to scale linearly (`4 × hours`- rows). Paginate or chunk your own queries if you need months.+- For large time ranges, expect the response to scale linearly (`4 ×+ hours` rows). Chunk your queries if you need months.## What the calendar does *not* tell you-- Exact `cancellableUntil` per block. Those are assigned at booking time- from the policy ladder. Read blocks after you reserve.-- What other customers hold. Numbers are org-scoped.-- Future policy changes. Terms you book under are frozen on your blocks.+- **Past reservation events.** Use `GET /api/capacity/reservations` for+ the audit log.+- **Other customers' commitments.** Numbers are org-scoped.+- **Future limit changes.** Your `reservationLimitGb` reflects current+ policy.## Where to go next<CardGroup cols={2}>- <Card title="Reserving and cancelling" icon="lock" href="/reserved-capacity/reserving-and-cancelling">- The write flows, idempotency, atomicity.+ <Card title="Reserving capacity" icon="lock" href="/reserved-capacity/reserving">+ The write flow, idempotency, atomicity.</Card><Card title="Concepts" icon="shapes" href="/reserved-capacity/concepts">- Vocabulary: blocks, intervals, ladder.+ Vocabulary: intervals, reservations, the log.</Card><Card title="Get calendar endpoint" icon="code" href="/api-reference/capacity/get-calendar">Full request/response reference.diff --git a/docs/reserved-capacity/concepts.mdx b/docs/reserved-capacity/concepts.mdxindex 3a3367ed..ed8d76ea 100644--- a/docs/reserved-capacity/concepts.mdx+++ b/docs/reserved-capacity/concepts.mdx@@ -1,6 +1,6 @@---title: "Concepts"-description: "Blocks, intervals, the calendar, and the cancellability ladder"+description: "Intervals, reservations, the reservation log, and the per-org cap"---<Info>@@ -8,33 +8,11 @@ description: "Blocks, intervals, the calendar, and the cancellability ladder"may change before launch.</Info>-A small vocabulary carries the whole API. Learn these five terms and the rest-reads itself.--## Block--A **block** is one GB of reserved memory for one 15-minute UTC interval. It is-the atomic unit: there is no "half-block," no "multi-hour block," no "flexible-block." Every reservation is a whole number of blocks.--Each block is a first-class resource with its own UUID:--```json-{- "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T21:00:00Z"-}-```--You can read, cancel, and reserve individual blocks by ID. A bigger-reservation is just more blocks.+A small vocabulary. Learn these and the rest of the API reads itself.## Interval-An **interval** is a 15-minute window on the UTC quarter-hour grid.+A 15-minute window on the UTC quarter-hour grid.| Field | Meaning || --- | --- |@@ -42,124 +20,122 @@ An **interval** is a 15-minute window on the UTC quarter-hour grid.| `endsAt` | Exclusive end. Always `startsAt + 15 minutes`. |Half-open intervals (`[startsAt, endsAt)`) mean two adjacent reservations-never overlap and never leave gaps:+never overlap and never leave gaps.```text-09:00 ────────────── 09:15 ────────────── 09:30+02:00 ────────────── 02:15 ────────────── 02:30interval A interval B- startsAt: 09:00 startsAt: 09:15- endsAt: 09:15 endsAt: 09:30```A reservation that spans multiple intervals is a list of adjacent interval-entries, not a single range. The API accepts this explicitly:+entries, not a single range:++```json+{+ "intervals": [+ { "startsAt": "2026-04-29T02:00:00Z", "endsAt": "2026-04-29T02:15:00Z", "capacityGb": 16 },+ { "startsAt": "2026-04-29T02:15:00Z", "endsAt": "2026-04-29T02:30:00Z", "capacityGb": 16 }+ ]+}+```++## Reservation++A commitment event. Each `POST /api/capacity/reservations` creates one+reservation: a server-generated UUID, a `createdAt` timestamp, and one or+more `(interval, capacityGb)` line items.```json{+ "reservationId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",+ "createdAt": "2026-04-28T18:00:05Z","intervals": [- { "startsAt": "2026-04-25T09:00:00Z", "endsAt": "2026-04-25T09:15:00Z", "capacityGb": 4 },- { "startsAt": "2026-04-25T09:15:00Z", "endsAt": "2026-04-25T09:30:00Z", "capacityGb": 4 },- { "startsAt": "2026-04-25T09:30:00Z", "endsAt": "2026-04-25T09:45:00Z", "capacityGb": 4 }+ { "startsAt": "2026-04-29T02:00:00Z", "endsAt": "2026-04-29T02:15:00Z", "capacityGb": 16 }]}```+Reservations are **append-only**. Once created, a reservation cannot be+cancelled, modified, or transferred. To add more capacity to an interval,+post another reservation; the totals add up at the interval level.++## The reservation log++The list of all your reservations is the durable, auditable record of your+commitments over time. `GET /api/capacity/reservations` returns it in+reverse-chronological order.++This is also how the calendar is computed internally: at any moment,+`reservedGb` for an interval is just the sum of `capacityGb` across all+your reservations covering that interval.+## Calendar-The **calendar** is the planning read model. Given a time range, it returns-one row per 15-minute interval with the numbers you need to decide what to-reserve:+The planning read model. Given a time range, returns one row per interval+with the numbers you need to plan:| Field | Meaning || --- | --- |-| `reservableGb` | GB you could add to this interval right now. |-| `reservationLimitGb` | The policy cap on how much you can hold in this interval. |-| `reservedGb` | What you already hold in this interval. |-| `cancellableGb` | Of `reservedGb`, how much you can still cancel now. |-| `nonCancellableGb` | Of `reservedGb`, how much is already locked. |-| `newReservationNonCancellableRatio` | Fraction of a new reservation that would lock immediately. |-| `usableGb` | Reserved capacity available for usage in this interval. |--The calendar does not hold capacity — it's a snapshot. See-[Reading the calendar](/reserved-capacity/calendar) for the full shape and-planning patterns.--## Cancellability ladder--**Cancellability** is assigned at booking time, per block, from a policy-ladder. It looks roughly like this:--| Lead time | Fraction of new reservation locked | Fraction cancellable |-| --- | --- | --- |-| ≥ 24h before `startsAt` | 0% | 100% |-| 12h – 24h | 25% | 75% |-| 6h – 12h | 50% | 50% |-| < 6h | 100% | 0% |--The exact numbers are a server-side policy and may evolve. What's invariant:--1. Every block gets a `cancellableUntil` timestamp when it's created. It- never changes afterwards.-2. A later policy change **does not** mutate existing blocks. The terms you- booked under are the terms you keep.-3. The ratio is computed per interval at reservation time — closer- intervals produce stricter terms automatically.--The calendar shows the *aggregate* ratio for a new reservation. To see the-exact per-block `cancellableUntil` values after booking, read the blocks:--```bash curl-curl https://app.opencomputer.dev/api/capacity/blocks?from=...&to=... \- -H "X-API-Key: $OPENCOMPUTER_API_KEY"-```+| `reservableGb` | Additional GB you could add to this interval right now. |+| `reservationLimitGb` | The policy cap on how much you can hold in this interval (your org's `max_memory_gb`). |+| `reservedGb` | What you already hold in this interval (sum of all your reservations covering it). |-## Reservation and cancellation (operations, not objects)+The calendar **previews availability** but never holds capacity. Capacity+can change between when you read the calendar and when you submit a+reservation; if it does, the write returns `capacity_not_available` and you+re-read.-There is no public "reservation" or "cancellation" object. Those are-*operations* that create or retire blocks.+See [Reading the calendar](/reserved-capacity/calendar) for the full shape.-```text-POST /api/capacity/reservations → creates N blocks-POST /api/capacity/cancellations → retires N blocks-```+## Per-org capacity cap-This means:+Your org has a single configured ceiling: `max_memory_gb`. It applies in+two places:-- There's no `reservationId` to look up later.-- There's no "edit this reservation" endpoint — cancel the specific blocks- you want to remove.-- There's no "cancel a whole reservation" endpoint — you cancel by block ID.+| Where | What it limits |+| --- | --- |+| Reservations | Across any single interval, your `reservedGb` cannot exceed `max_memory_gb`. |+| Runtime | Your concurrent running memory across all sandboxes cannot exceed `max_memory_gb` either. |-If you need to track that a group of blocks came from one write, store the-block IDs client-side. The server does not keep that grouping.+Same number, two enforcement points. The mental model: "I can have up to+N GB of memory in flight at once, whether reserved or running." If you+need to reserve more than your current limit allows, ask to have the+limit raised.-## Usage allocation+This appears as `reservationLimitGb` in calendar interval rows.-Reserved capacity is **pooled** by `(org, memory resource, 15-minute-interval)`. In each interval:+## Usage and overage-```text-overageGb = max(usedGb - reservedGb, 0)-```+Starting and stopping sandboxes is independent of reserving capacity.+Reservations don't pre-warm or pre-allocate compute; they're an+accounting commitment.++For each 15-minute interval, at every instant:++- If your concurrent memory ≤ `reservedGb` → you're inside your reserved+ capacity. That portion of the interval is billed at the reserved rate.+- If your concurrent memory > `reservedGb` → the excess is overage,+ billed at the on-demand rate.-There is no per-sandbox attribution. If two sandboxes run together and-consume 14 GB against 10 reserved, 10 GB count as reserved and 4 GB as-overage — it doesn't matter which sandbox "used" which.+Reserved capacity is a flat ceiling at any instant, not a GB-second budget+that averages out over the interval. A brief spike above the ceiling+produces overage during those seconds, even if your average usage was+below it.-Unused reserved capacity inside its interval is not refunded. Cancel blocks-*before* their `cancellableUntil` expires if you decide you don't need them.+You also pay for the **full reservation** regardless of actual usage.+That's the commitment; it's why reserved rates are lower.## Where to go next<CardGroup cols={2}><Card title="Reading the calendar" icon="calendar" href="/reserved-capacity/calendar">- How to plan reservations before you write.+ Plan reservations before you commit.</Card>- <Card title="Reserving and cancelling" icon="lock" href="/reserved-capacity/reserving-and-cancelling">- Write flows, idempotency, atomicity.+ <Card title="Reserving capacity" icon="lock" href="/reserved-capacity/reserving">+ The write flow, idempotency, atomicity.</Card><Card title="Usage and overage" icon="gauge" href="/reserved-capacity/usage-and-overage">- How reserved capacity consumes actual usage.+ How reserved capacity is consumed.</Card><Card title="API reference" icon="code" href="/api-reference/capacity/get-calendar">Every endpoint with full request/response shapes.diff --git a/docs/reserved-capacity/overview.mdx b/docs/reserved-capacity/overview.mdxindex 85b06600..ad5bb9b3 100644--- a/docs/reserved-capacity/overview.mdx+++ b/docs/reserved-capacity/overview.mdx@@ -1,6 +1,6 @@---title: "Reserved Capacity"-description: "Commit to future compute capacity in 15-minute blocks and pay less for what you run inside them"+description: "Commit memory capacity to future 15-minute intervals at a discounted rate"---<Info>@@ -10,145 +10,108 @@ description: "Commit to future compute capacity in 15-minute blocks and pay lesswhen it ships or to influence the design.</Info>-Reserved capacity lets you pre-commit to compute you will use later, so-OpenComputer can plan for it instead of holding a margin against uncertain-demand. In exchange for telling us what you need and when, you get lower-effective pricing on that usage and a predictable ceiling on what you can run.+Reserved capacity lets you pre-commit to memory you'll use later. OpenComputer+plans for it instead of holding margin against uncertain demand; you get a+lower effective rate on the committed usage. Pure on-demand still works for+everything else.-Pure on-demand usage is still fine — reserve only what you already know you-need. Reservations are additive to on-demand: reserved capacity is consumed-first, and any usage above it falls back to on-demand rates.+## Reservations are non-refundable-## The unit is one GB for fifteen minutes+Once you commit to capacity for an interval, that's a permanent commitment.+There is no cancellation, no transfer, no partial refund. The commitment is+the whole reason the rate is lower — any carve-out re-introduces the demand+risk reserved capacity exists to remove.-Everything in the API is built from a single atomic unit:+The hedge is to **book conservatively**: reserve only what you're confident+you'll run, and let on-demand absorb everything else.-```text-1 block = 1 GB of memory for one 15-minute UTC interval-```+## The unit is 1 GB for 15 UTC minutes-Intervals start on the quarter-hour in UTC: `:00`, `:15`, `:30`, `:45`. A-two-hour, 16 GB reservation is `2 × 4 × 16 = 128` blocks. You don't address-that as one multi-hour object — it's 128 concrete, individually-cancellable-blocks.+Reservations are made against 15-minute UTC intervals on the quarter-hour+grid: `:00`, `:15`, `:30`, `:45`. Within each interval, you commit an+integer number of GB. A two-hour reservation of 16 GB is 8 intervals × 16 GB.-This looks like a lot of rows for a small reservation, and that's-intentional: every block has its own identity, its own cancellation deadline,-and its own lifecycle. There are no hidden compound objects.+You don't book individual blocks or get block IDs back. You just tell the+API "for this interval, add this many GB to my reserved capacity," and the+calendar shows you the new total.## A small example-Reserve 2 GB from 9:00 to 9:15 UTC tomorrow:+Reserve 16 GB for the 02:00–02:15 UTC slot tomorrow:```bash curlcurl -X POST https://app.opencomputer.dev/api/capacity/reservations \-H "X-API-Key: $OPENCOMPUTER_API_KEY" \- -H "Idempotency-Key: demo-reservation-1" \+ -H "Idempotency-Key: demo-1" \-H "Content-Type: application/json" \-d '{"intervals": [{- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "capacityGb": 2+ "startsAt": "2026-04-29T02:00:00Z",+ "endsAt": "2026-04-29T02:15:00Z",+ "capacityGb": 16}]}'```-The response is two block rows, each with its own `blockId` and its own-`cancellableUntil` deadline:+Response:```json{- "status": "applied",- "reservedBlocks": 2,- "blocks": [- {- "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T21:00:00Z"- },+ "reservationId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",+ "createdAt": "2026-04-28T18:00:05Z",+ "intervals": [{- "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": true,- "cancellableUntil": "2026-04-24T15:00:00Z"+ "startsAt": "2026-04-29T02:00:00Z",+ "endsAt": "2026-04-29T02:15:00Z",+ "capacityGb": 16}]}```-Cancel one of them later:--```bash curl-curl -X DELETE \- https://app.opencomputer.dev/api/capacity/blocks/9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562 \- -H "X-API-Key: $OPENCOMPUTER_API_KEY"-```--That's the whole model. Everything else in these pages is detail on *when*-you can cancel, *how* you preview available capacity, and *how* usage is-allocated against the blocks you hold.+That's it. Run sandboxes normally during 02:00–02:15; they'll be allocated+against your reserved capacity automatically. Anything over 16 GB during+that interval falls back to on-demand rates.## Why reserve instead of running on-demand?-Reservations and on-demand capacity solve different problems:-| | On-demand | Reserved || --- | --- | --- |-| Cost per GB-minute | Higher (includes reserve-margin premium) | Lower |-| Commitment | None | Progressive — closer to the interval, less cancellable |+| Cost per GB-second | Higher (includes reserve-margin premium) | Lower |+| Commitment | None | Full — you pay regardless of usage || Availability | Subject to platform headroom | Guaranteed for the interval you booked || Best for | Unpredictable or bursty workloads | Nightly batch jobs, scheduled runs, known traffic patterns |-If you already know you will run 50 GB of agents at 3am every night, tell us-the day before, and you get better pricing plus a guarantee the capacity is-there. If your workload is "whatever users ask for," stay on-demand.--## Cancellation gets stricter as the interval approaches--Each block has a `cancellableUntil` timestamp, set at the moment you reserve.-As the reservation window gets closer, a larger fraction of any *new*-reservation becomes non-cancellable immediately. Policy details:--| Lead time from reservation to `startsAt` | Portion of a new reservation locked immediately |-| --- | --- |-| ≥ 24 hours | Small (e.g. 0%) |-| 12–24 hours | Moderate (e.g. 25%) |-| 6–12 hours | Larger (e.g. 50%) |-| < 6 hours | Full — entire reservation locked immediately |--The exact ladder is a policy, not an API shape. Read the calendar to see what-fraction of a new reservation would lock right now.+If you already know you'll run 50 GB of agents at 3am every night, reserve+the day before, get the lower rate, get the guarantee. If your workload is+"whatever users ask for," stay on-demand.## Where to go next<CardGroup cols={2}><Card title="Concepts" icon="shapes" href="/reserved-capacity/concepts">- The vocabulary: blocks, intervals, calendar, policy ladder.+ The vocabulary: intervals, reservations, the reservation log.</Card><Card title="Reading the calendar" icon="calendar" href="/reserved-capacity/calendar">- Plan reservations before you write.+ Plan reservations before you commit.</Card>- <Card title="Reserving and cancelling" icon="lock" href="/reserved-capacity/reserving-and-cancelling">- The write flows, idempotency, atomicity, retries.+ <Card title="Reserving capacity" icon="lock" href="/reserved-capacity/reserving">+ The write flow, idempotency, atomicity.</Card><Card title="Usage and overage" icon="gauge" href="/reserved-capacity/usage-and-overage">- How reserved capacity consumes actual sandbox usage.+ How reserved capacity is consumed and how overage is billed.</Card></CardGroup><Tip>Full endpoint reference: [`/api/capacity/*`](/api-reference/capacity/get-calendar).- Design doc: [`001-reserved-capacity-squares.md`](https://github.com/diggerhq/ws-pricing/blob/main/design/001-reserved-capacity-squares.md).</Tip><Note>**Pricing is intentionally out of scope here.** This API manages capacity- rights only. Prices, invoices, and recurring discounts will be announced- separately before launch.+ rights only. Reserved usage is billed at a discounted rate, overage at the+ on-demand rate. Specific dollar amounts will be announced separately before+ launch.</Note>diff --git a/docs/reserved-capacity/reserving-and-cancelling.mdx b/docs/reserved-capacity/reserving-and-cancelling.mdxdeleted file mode 100644index 9fe8dd40..00000000--- a/docs/reserved-capacity/reserving-and-cancelling.mdx+++ /dev/null@@ -1,259 +0,0 @@-----title: "Reserving and Cancelling"-description: "Write flows, idempotency, atomicity, and retry patterns"------<Info>- **Coming soon.** Reserved capacity is not yet available. The contract below- may change before launch.-</Info>--All write flows are direct: read the calendar, submit a write, handle-rejection. No intents, no quotes, no shopping cart, no confirmation step.--## Reserve a batch of intervals--One call creates blocks across one or more 15-minute intervals. Atomic across-the whole request — either everything is booked or nothing is.--```bash curl-curl -X POST https://app.opencomputer.dev/api/capacity/reservations \- -H "X-API-Key: $OPENCOMPUTER_API_KEY" \- -H "Idempotency-Key: nightly-agents-2026-04-25" \- -H "Content-Type: application/json" \- -d '{- "intervals": [- { "startsAt": "2026-04-25T09:00:00Z", "endsAt": "2026-04-25T09:15:00Z", "capacityGb": 16 },- { "startsAt": "2026-04-25T09:15:00Z", "endsAt": "2026-04-25T09:30:00Z", "capacityGb": 16 }- ]- }'-```--Response (success):--```json-{- "status": "applied",- "reservedBlocks": 32,- "cancellableBlocks": 24,- "nonCancellableBlocks": 8,- "blocks": [- {- "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z",- "isCancellable": false,- "cancellableUntil": null- }- // ... one entry per block- ]-}-```--### Validation rules--| Rule | Behavior |-| --- | --- |-| `startsAt` and `endsAt` are UTC and 15-minute aligned | Reject misaligned intervals. |-| `endsAt == startsAt + 15 minutes` | Reject multi-interval spans; enumerate them instead. |-| `capacityGb` is a positive integer | Reject zero, negative, or fractional. |-| `startsAt >= earliestReservableStart` | Reject intervals that are too soon to reserve. |-| Requested capacity fits current `reservableGb` | Reject instead of overbooking. |-| `Idempotency-Key` is stable for retries | Replaying returns the original result. |--### Rejected write--```json-{- "error": "capacity_not_available",- "intervals": [- {- "startsAt": "2026-04-25T09:00:00Z",- "requestedGb": 80,- "reservableGb": 30,- "reason": "insufficient_capacity"- },- {- "startsAt": "2026-04-25T09:15:00Z",- "requestedGb": 80,- "reservableGb": 0,- "reason": "too_soon"- }- ]-}-```--The response lists every problematic interval, so the client can retry with-adjusted numbers in a single round-trip.--Common rejection reasons:--| `reason` | Meaning |-| --- | --- |-| `insufficient_capacity` | Request exceeds current `reservableGb`. |-| `too_soon` | `startsAt` is before `earliestReservableStart`. |-| `misaligned` | `startsAt`/`endsAt` not on the 15-minute grid. |-| `reservation_limit_exceeded` | Exceeds the org's `reservationLimitGb` for the interval. |--## Reserve exactly one block with a caller-chosen ID--For single-block reservations where you want idempotency keyed to a UUID you-generate client-side:--```bash curl-curl -X PUT \- https://app.opencomputer.dev/api/capacity/blocks/3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd \- -H "X-API-Key: $OPENCOMPUTER_API_KEY" \- -H "Content-Type: application/json" \- -d '{- "startsAt": "2026-04-25T09:00:00Z",- "endsAt": "2026-04-25T09:15:00Z"- }'-```--This is equivalent to reserving `capacityGb: 1` for that interval. Because-you chose the ID, replaying the same `PUT` with the same body is naturally-idempotent — the same key always names the same block.--| Case | Behavior |-| --- | --- |-| No block exists for `(org, blockId)` | Validate capacity and create the block. |-| Existing live block with same `startsAt`/`endsAt` | Return the existing block; no new GB reserved. |-| Existing live block with different `startsAt`/`endsAt` | Reject `block_id_conflict`. |-| Block was cancelled or settled | Reject `block_id_not_reusable`. IDs are never recycled. |-| Same UUID exists in another org | Ignored. Block identity is scoped by org — same UUID in two orgs means two different blocks. |--## Idempotency keys--Both `POST /reservations` and `POST /cancellations` accept an-`Idempotency-Key` header. The server stores the key with the request body-hash and the response. Retries with the same key and body return the cached-response — even if the original write succeeded, the retry is safe.--| Behavior | Response |-| --- | --- |-| Same key, same body | Cached response from first call. |-| Same key, different body | `idempotency_key_conflict`. |-| No key | Request is processed normally; retries are the client's problem. |--Always send a stable `Idempotency-Key` for reservation and cancellation-writes. Build it from a deterministic name for the operation, e.g.-`reserve-nightly-agents-2026-04-25`, so your retry loop sends the same key.--## Cancel blocks by ID--Cancellation targets specific block IDs. It never targets a time range or a-GB amount. Atomic all-or-nothing: if any block in the request is not-cancellable, none are cancelled.--```bash curl-curl -X POST https://app.opencomputer.dev/api/capacity/cancellations \- -H "X-API-Key: $OPENCOMPUTER_API_KEY" \- -H "Idempotency-Key: cancel-nightly-2026-04-25" \- -H "Content-Type: application/json" \- -d '{- "blockIds": [- "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",- "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd"- ]- }'-```--Response (success):--```json-{- "status": "cancelled",- "cancelledBlocks": 2,- "cancelledGb": 2,- "cancelledGbMinutes": 30,- "blocks": [- { "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562", "startsAt": "2026-04-25T09:00:00Z", "endsAt": "2026-04-25T09:15:00Z" },- { "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd", "startsAt": "2026-04-25T09:15:00Z", "endsAt": "2026-04-25T09:30:00Z" }- ]-}-```--Response (rejection):--```json-{- "error": "blocks_not_cancellable",- "blocks": [- { "blockId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562", "reason": "not_cancellable" },- { "blockId": "3a94b5e6-2e4f-4a2b-b58a-53c41d61d9bd", "reason": "already_started" }- ]-}-```--Common rejection reasons:--| `reason` | Meaning |-| --- | --- |-| `not_cancellable` | `cancellableUntil` has already passed. |-| `already_started` | The interval has begun; reservation is settled. |-| `already_cancelled` | A previous cancel retired this block. |-| `not_found` | Block does not exist, or belongs to another org. |--## Cancelling a single block--For one-block cancellation, `DELETE` is a shortcut:--```bash curl-curl -X DELETE \- https://app.opencomputer.dev/api/capacity/blocks/9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562 \- -H "X-API-Key: $OPENCOMPUTER_API_KEY"-```--`204 No Content` on success. On failure, the response body matches the-`blocks_not_cancellable` shape with a single entry.--## Retry pattern: "cancel everything cancellable"--The atomic all-or-nothing rule makes "cancel everything that's still-cancellable" a deliberate loop, not a single call:--```bash-# 1. List currently cancellable blocks in the window-curl "https://app.opencomputer.dev/api/capacity/blocks?from=...&to=...&isCancellable=true" \- -H "X-API-Key: $OPENCOMPUTER_API_KEY"--# 2. POST those IDs to /cancellations--# 3. If the server returns blocks_not_cancellable, refresh the list and retry-# with the remaining IDs.-```--Blocks race into non-cancellable state as their `cancellableUntil` passes.-Between the list and the cancel call, a block may mature. The rejection-response names every blocking ID, so refresh is cheap.--V1 does not accept a `skipIneligible` flag. Strict all-or-nothing is the-only mode — it keeps retries explicit and cancellation behavior predictable.--## Concurrency and atomicity summary--| Operation | Atomic across | On failure |-| --- | --- | --- |-| `POST /reservations` | All intervals in the request | No blocks created. |-| `POST /cancellations` | All blocks in the request | No blocks cancelled. |-| `PUT /blocks/{id}` | One block | No block created. |-| `DELETE /blocks/{id}` | One block | No block cancelled. |--Parallel writes to the same interval from the same org serialize server-side.-Whichever write commits first wins the remaining capacity; later writes see-the updated `reservableGb` in their validation error.--## Where to go next--<CardGroup cols={2}>- <Card title="Usage and overage" icon="gauge" href="/reserved-capacity/usage-and-overage">- How reserved capacity consumes actual usage.- </Card>- <Card title="Reading the calendar" icon="calendar" href="/reserved-capacity/calendar">- Plan before you write.- </Card>- <Card title="API reference" icon="code" href="/api-reference/capacity/create-reservations">- Every endpoint with full request/response shapes.- </Card>-</CardGroup>diff --git a/docs/reserved-capacity/reserving.mdx b/docs/reserved-capacity/reserving.mdxnew file mode 100644index 00000000..4d7a335a--- /dev/null+++ b/docs/reserved-capacity/reserving.mdx@@ -0,0 +1,168 @@+---+title: "Reserving Capacity"+description: "Write flow, idempotency, atomicity, and the audit list"+---++<Info>+ **Coming soon.** Reserved capacity is not yet available. The contract below+ may change before launch.+</Info>++There are two write-side endpoints: `POST` to commit, `GET` to audit. Both+work in terms of intervals and integer GB; there are no individual blocks+or unit IDs.++## Make a reservation++One call commits capacity to one or more 15-minute intervals. Atomic across+the whole request — either every interval is reserved, or nothing is.++```bash curl+curl -X POST https://app.opencomputer.dev/api/capacity/reservations \+ -H "X-API-Key: $OPENCOMPUTER_API_KEY" \+ -H "Idempotency-Key: nightly-batch-2026-04-29" \+ -H "Content-Type: application/json" \+ -d '{+ "intervals": [+ { "startsAt": "2026-04-29T02:00:00Z", "endsAt": "2026-04-29T02:15:00Z", "capacityGb": 16 },+ { "startsAt": "2026-04-29T02:15:00Z", "endsAt": "2026-04-29T02:30:00Z", "capacityGb": 16 }+ ]+ }'+```++Response (success):++```json+{+ "reservationId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",+ "createdAt": "2026-04-28T18:00:05Z",+ "intervals": [+ { "startsAt": "2026-04-29T02:00:00Z", "endsAt": "2026-04-29T02:15:00Z", "capacityGb": 16 },+ { "startsAt": "2026-04-29T02:15:00Z", "endsAt": "2026-04-29T02:30:00Z", "capacityGb": 16 }+ ]+}+```++### Validation++| Rule | Behavior |+| --- | --- |+| `startsAt` and `endsAt` UTC and 15-minute aligned | Reject misaligned. |+| `endsAt == startsAt + 15 minutes` | Reject longer spans; enumerate intervals. |+| `capacityGb` positive integer | Reject zero, negative, or fractional. |+| `startsAt >= earliestReservableStart` | Reject intervals too soon. |+| Requested capacity fits current `reservableGb` | Reject instead of overbooking. |+| `Idempotency-Key` stable on retry | Replaying same key + body returns original result. |++### Rejected write++```json+{+ "error": "capacity_not_available",+ "intervals": [+ {+ "startsAt": "2026-04-29T02:00:00Z",+ "requestedGb": 80,+ "reservableGb": 30,+ "reason": "insufficient_capacity"+ }+ ]+}+```++The response lists every problematic interval, so the client can retry+with adjusted numbers in a single round-trip.++| `reason` | Meaning |+| --- | --- |+| `insufficient_capacity` | Request exceeds current `reservableGb` (platform-side). |+| `reservation_limit_exceeded` | Would exceed your org's `max_memory_gb` for the interval. |+| `too_soon` | `startsAt` is before `earliestReservableStart`. |+| `misaligned` | `startsAt`/`endsAt` not on the 15-minute grid. |++## Idempotency++Both reservation writes accept an `Idempotency-Key` header. The server+stores the key with a hash of the request body and the response. Retries+return the cached response, even if the original write succeeded.++| Behavior | Response |+| --- | --- |+| Same key, same body | Cached response from the first call. |+| Same key, different body | `409 idempotency_key_conflict`. |+| No key | Request processed normally; retries are the client's problem. |++Build keys from a deterministic name for the operation, e.g.+`reserve-nightly-2026-04-29`, so a client retry sends the same key.++## Cancellation does not exist++Reservations are non-refundable. Once committed, capacity is permanent for+that interval. There is no `DELETE`, no cancel endpoint, no transfer to a+different interval.++The hedge: book conservatively, only what you're confident you'll run, and+let on-demand absorb the variability above.++## List your reservations++The audit list. Returns every reservation event you've made in the time+window, in reverse-chronological order.++```bash curl+curl "https://app.opencomputer.dev/api/capacity/reservations?from=2026-04-01T00:00:00Z&to=2026-05-01T00:00:00Z" \+ -H "X-API-Key: $OPENCOMPUTER_API_KEY"+```++Response:++```json+{+ "reservations": [+ {+ "reservationId": "9f67b8f7-7b91-4d2d-b1cb-19d0d0a14562",+ "createdAt": "2026-04-28T18:00:05Z",+ "intervals": [+ { "startsAt": "2026-04-29T02:00:00Z", "endsAt": "2026-04-29T02:15:00Z", "capacityGb": 16 },+ { "startsAt": "2026-04-29T02:15:00Z", "endsAt": "2026-04-29T02:30:00Z", "capacityGb": 16 }+ ]+ }+ ],+ "nextCursor": null+}+```++| Query param | Meaning |+| --- | --- |+| `from` | Return reservations whose `createdAt >= from`. |+| `to` | Return reservations whose `createdAt < to`. |+| `cursor` | Pagination cursor from a previous response. |+| `limit` | Max reservations per page. |++For end-of-month reconciliation, list reservations and group totals by+interval. The calendar gives you the current per-interval state; the list+gives you the history of how it got there.++## Concurrency and atomicity++| Operation | Atomic across | On failure |+| --- | --- | --- |+| `POST /reservations` | All intervals in the request | Nothing reserved. |++Parallel writes to the same interval from the same org serialize on the+server. Whichever request commits first claims the remaining capacity;+later requests see the updated `reservableGb` in their validation error.++## Where to go next++<CardGroup cols={2}>+ <Card title="Usage and overage" icon="gauge" href="/reserved-capacity/usage-and-overage">+ How reserved capacity consumes actual usage.+ </Card>+ <Card title="Reading the calendar" icon="calendar" href="/reserved-capacity/calendar">+ Plan before you commit.+ </Card>+ <Card title="API reference" icon="code" href="/api-reference/capacity/create-reservations">+ Every endpoint with full request/response shapes.+ </Card>+</CardGroup>diff --git a/docs/reserved-capacity/usage-and-overage.mdx b/docs/reserved-capacity/usage-and-overage.mdxindex 1bf65a1c..53fc2ce1 100644--- a/docs/reserved-capacity/usage-and-overage.mdx+++ b/docs/reserved-capacity/usage-and-overage.mdx@@ -1,6 +1,6 @@---title: "Usage and Overage"-description: "How reserved capacity consumes actual sandbox usage, and what counts as overage"+description: "How reserved capacity is consumed, how overage is calculated, and why a flat ceiling at every instant is the entire model"---<Info>@@ -8,149 +8,291 @@ description: "How reserved capacity consumes actual sandbox usage, and what counmay change before launch.</Info>-Reserved capacity and actual sandbox execution are independent flows.-Reserving blocks does not start sandboxes. Starting sandboxes does not-reserve blocks. At the end of each 15-minute interval, the server reconciles-what was used against what was reserved and computes overage.+This page explains exactly how your bill is computed when you have reserved+capacity. Read it once carefully — there are very few surprises, but the+ones that exist are worth understanding before you commit dollars.-## The allocation identity+## The one rule-For each 15-minute interval, per `(org, memory resource)`:+> **At every instant within an interval, your reserved capacity acts as a+> flat ceiling. Memory at or below the ceiling is covered by your+> reservation. Memory above the ceiling is overage.**-```text-overageGb = max(usedGb - reservedGb, 0)-```+That's the entire model. Everything else on this page is restating, working+through examples, and pointing out the edge cases.-That's it. Three numbers and a `max`. No per-sandbox attribution, no-proration beyond the 15-minute boundary, no priority rules.+## Said three ways-| Variable | Source |-| --- | --- |-| `usedGb` | Sum of actual sandbox memory tiers over this interval, weighted by seconds, divided by 900. |-| `reservedGb` | Sum of live, non-cancelled blocks this org holds in this interval. |-| `overageGb` | Whatever `usedGb` exceeds `reservedGb` by. |+Three different framings of the same rule. Pick whichever clicks for you.-Unused reserved capacity (`reservedGb > usedGb`) is still committed — you-booked it and it was held for you. Cancel blocks before their-`cancellableUntil` if you decide you don't need them.+**Framing 1 — Ceiling.** Imagine a horizontal line drawn at your+`reservedGb` level on a chart of your concurrent memory over time. Anything+the chart pokes above that line is overage; anything below is covered.-## Reserved capacity is pooled, not assigned to specific sandboxes+**Framing 2 — Per-second.** At every second `t` within an interval:+- if `usage(t) ≤ reservedGb`: that second is covered by your reservation+- if `usage(t) > reservedGb`: the difference contributes to overage for+ that second-If you reserve 10 GB at `09:00` and run two sandboxes in that interval-(say, 6 GB each), the math runs at the pool level:+**Framing 3 — Formula.** For each 15-minute interval, per `(org, resource)`:```text-reservedGb = 10-usedGb = 12-overageGb = max(12 - 10, 0) = 2+reservedBilled = reservedGb × 900 sec (full commitment)+overageBilled = ∑_t max(usage(t) − reservedGb, 0) (per-second integration)```-It doesn't matter which sandbox "used the reserved capacity" — they both-ran, the sum was 12, the overage was 2. You can't (and don't need to) tag-sandboxes as "reserved" vs "on-demand."+## Visualizing it-## Starting and stopping sandboxes is unaffected+Below is your concurrent memory across one 15-minute interval, with a+reservation of `16 GB`. The dashed line is the reserved-capacity ceiling.+Everything above the dashed line is overage; everything below it is+covered by your reservation.-Reserved capacity is not a gate. Having a reservation does not:+```text+ GB+ 30 │ ┌─────┐ ← spike: 30 GB for ~60s+ │ │ XXX │+ 25 │ │ XXX │+ │ │ XXX │ ← X = overage+ 20 │ │ XXX │+ │ │ XXX │+ 16 ╞═════════════╪═════╪═══════════════════ reserved ceiling = 16 GB+ │ │ RRR │ ← R = covered by reservation+ 10 │ ┌───────────┘ RRR │+ │ │ R R R R R R RRR │+ 8 │ │ R R R R R R RRR │+ │ │ R R R R R R RRR │+ 0 │─┴─R─R─R─R─R─R─RRR─┴────────────────── (zero usage at the end)+ 02:00 02:11 02:15+ │ │ │ │+ │ │ 60s spike │+ │ │ │+ └──── 600s @ 8 GB ───┘ └─ 240s @ 0 GB ─┘+```-- Change how you start sandboxes — same `POST /api/sandboxes` flow.-- Pre-warm or pre-allocate compute — blocks are an accounting construct, not- a physical resource.-- Hold capacity open across restarts — capacity is tied to wall-clock- intervals, not sandbox lifecycles.+Reading the chart:+- For 600 seconds, usage = 8 GB, all below the ceiling — fully covered.+- For 60 seconds, usage = 30 GB. The first 16 GB is covered (R); the+ remaining 14 GB is overage (X).+- For 240 seconds, usage = 0 — nothing happens.-Conversely, not having a reservation does not block you — on-demand capacity-continues to be available, subject to platform admission limits.+The exact GB-second numbers are below.-## Overage falls back to on-demand terms+## A complete worked example-Usage above `reservedGb` in an interval is treated as on-demand. It is-subject to the same admission controls, limits, and pricing as any other-on-demand usage.+You reserve `16 GB` for the interval `02:00–02:15` (900 seconds). During+the interval your sandboxes use:-<Note>- **Pricing is intentionally out of scope for this API.** The on-demand fallback- is an accounting statement ("overage counts as on-demand usage"), not a- pricing statement. Dollar amounts for both reserved and on-demand usage will- be announced separately before launch.-</Note>+| Phase | Duration | Concurrent memory |+| ---: | ---: | ---: |+| 1 | 600 s | 8 GB |+| 2 | 60 s | 30 GB |+| 3 | 240 s | 0 GB |-## Cancellation before interval start releases the block+### Step 1 — split each phase into reserved vs overage-If you cancel a block before `cancellableUntil` and before `startsAt`, it-disappears from the allocation math for that interval. The capacity returns-to `reservableGb` for the platform and for other orgs.+For each phase, apply the rule "min for reserved, max-minus-reserved for+overage."-If you cancel between `cancellableUntil` and `startsAt`, the block is-already locked — cancellation is rejected.+| Phase | Memory | Reserved component (per second) | Overage component (per second) |+| ---: | ---: | --- | --- |+| 1 | 8 GB | `min(8, 16) = 8 GB` | `max(8 − 16, 0) = 0 GB` |+| 2 | 30 GB | `min(30, 16) = 16 GB` | `max(30 − 16, 0) = 14 GB` |+| 3 | 0 GB | `min(0, 16) = 0 GB` | `max(0 − 16, 0) = 0 GB` |-Once `startsAt` passes, the block is settled. Whether usage consumed it or-not is recorded in the allocation output, but the block itself is no longer-cancellable.+### Step 2 — multiply by duration to get GB-seconds-## Intervals settle after they end+| Phase | Reserved (GB · s) | Overage (GB · s) |+| ---: | ---: | ---: |+| 1 | 8 × 600 = **4 800** | 0 × 600 = **0** |+| 2 | 16 × 60 = **960** | 14 × 60 = **840** |+| 3 | 0 × 240 = **0** | 0 × 240 = **0** |+| **Sum** | **5 760 GB-s actual reserved consumption** | **840 GB-s overage** |-Allocation is computed after an interval closes. Sandbox scale events-settle eventually-consistently across workers, so a brief delay is normal.-The server waits until usage data for the interval is stable before writing-the final allocation record.+Notice: of the 14 400 GB-seconds you reserved (16 × 900), you actually+*used* 5 760 GB-seconds of it. The remaining 8 640 GB-seconds went unused.-Practical implication: don't expect an allocation number the instant-`09:15` ticks over. Expect it a few minutes later.+### Step 3 — bill the commitment, not the consumption-## Visual model+Here's the critical point. Reserved capacity is billed in full,+regardless of how much of it you actually consumed. Your overage is+billed separately.-Blocks are squares on a grid; rows are GB, columns are 15-minute intervals.-Actual usage is a line drawn over the grid.+| Charge | GB-seconds | Rate |+| --- | ---: | --- |+| Reserved (commitment, always full) | 16 × 900 = **14 400** | reserved-tier rate |+| Overage (per-second spike) | **840** | overage-tier rate |-```text-GB- │- │ ███▒▒▒▒▒▒- │ ███████▒▒▒▒▒▒ ← reserved blocks (▒ cancellable, █ locked)- │ ███████████████▒▒- │ ─── usage ────- │- └─────────────────────── time (15-min intervals)-- overage when the usage line is above the block stack for an interval-```+You pay for the **full 14 400 GB-seconds** at the reserved rate, plus+**840 GB-seconds** at the overage rate. The 8 640 unused GB-seconds are+still billed — that's what "commitment" means.++## Three more examples to nail it down++The model deserves repetition.++### Example A — usage stays below reserved the whole time++You reserve 16 GB, average usage is 4 GB the whole interval.++| | Reserved (GB · s) | Overage (GB · s) |+| --- | ---: | ---: |+| Per second | min(4, 16) = 4 | max(4 − 16, 0) = 0 |+| Over 900 s | 3 600 actual consumption | **0 overage** |++Bill:+- Reserved (commitment): **16 × 900 = 14 400 GB-s** at reserved rate.+- Overage: **0**.++You paid for 14 400 GB-seconds of reservation. You only used 3 600. No+overage because you stayed below the ceiling. The unused 10 800 is the+cost of the commitment.++### Example B — usage stays above reserved the whole time++You reserve 16 GB, sandbox runs at 24 GB the whole interval.++| | Reserved (GB · s) | Overage (GB · s) |+| --- | ---: | ---: |+| Per second | min(24, 16) = 16 | max(24 − 16, 0) = 8 |+| Over 900 s | 14 400 covered | **7 200 overage** |++Bill:+- Reserved (commitment): **14 400 GB-s** at reserved rate.+- Overage: **7 200 GB-s** at overage rate.++The reservation absorbed 16 GB at every instant. The 8 GB above the+ceiling at every instant became overage. You ran 24 × 900 = 21 600 GB-s+of compute total; 14 400 is covered, 7 200 is overage.++### Example C — usage averages below reserved but briefly spikes above++You reserve 16 GB. Usage is 4 GB for 800 seconds, then 25 GB for 100+seconds.++| Phase | Memory | Reserved per second | Overage per second |+| ---: | ---: | ---: | ---: |+| 800 s | 4 GB | 4 | 0 |+| 100 s | 25 GB | 16 | 9 |++Aggregated:-The squares are the reserved capacity you hold. The line is what you-actually ran. Overage is where the line pokes above the squares.+| | Reserved (GB · s) | Overage (GB · s) |+| ---: | ---: | ---: |+| First 800 s | 3 200 | 0 |+| Last 100 s | 1 600 | **900** |+| **Sum** | **4 800 actual consumption** | **900 overage** |-## Reading past allocation+Bill:+- Reserved (commitment): **14 400 GB-s** at reserved rate.+- Overage: **900 GB-s** at overage rate.-Per-interval allocation is computed server-side and will be readable through-a billing/usage endpoint — the shape of that endpoint is part of a separate-billing surface design, not part of this API.+**This is the crucial counterintuitive case.** Your average usage was+`(4 × 800 + 25 × 100) / 900 ≈ 6.8 GB` — well under your 16 GB reservation.+You might think "I didn't use up my reservation, so there should be no+overage." That's wrong.-For now, the visible surface is:+The reservation is a flat ceiling **at every instant**, not a budget+averaged over the interval. The 100-second spike above the ceiling+produces 900 GB-seconds of overage during those 100 seconds, regardless+of what happened in the other 800 seconds.-- The calendar, which shows `reservedGb` and `usableGb` for any interval in- its window.-- Block reads, which show what you hold and whether it's still cancellable.-- The existing [`/api/usage`](/api-reference/usage/get-usage) endpoint for- actual sandbox usage quantities.+If this matters to you, the lever is to reserve enough to cover your+peaks, not your average.-When reserved-capacity billing ships, the allocation read model will be-documented alongside it.+## The two charges are independent-## Edge cases+It bears emphasizing again because it's where most confusion comes from.++| Question | Answer |+| --- | --- |+| Does my reservation amount affect my reserved bill? | Yes. Reserved bill = `reservedGb × 900` per interval, always. |+| Does my actual usage affect my reserved bill? | **No.** You pay the full reservation regardless. |+| Does my reservation amount affect my overage bill? | Yes. Higher reserved ceiling = less spike sticking out above it = less overage. |+| Does my actual usage affect my overage bill? | Yes. Overage = sum of seconds where usage exceeded the ceiling. |+| If I use less than my reservation, do I get a credit? | **No.** Unused reserved capacity is the cost of commitment. |+| If I use exactly my reservation, do I pay overage? | No. At every instant, usage is at-or-below the ceiling. |++The reserved charge is the price of optionality you gave up. The overage+charge is the price of optionality you kept (the spikes above your+ceiling).++## Common misconceptions, explicitly addressed++We're going to walk through phrases you might think to yourself or hear+from a teammate. For each, the answer.++> **"I have 16 GB reserved. I'll only get charged overage if my total+> usage in this interval exceeds 16 × 900 = 14 400 GB-seconds."**++No. Reserved capacity is not a GB-second budget. It is a flat ceiling at+every instant. A 60-second spike to 30 GB produces overage during those+60 seconds, even if your average is below the ceiling.++> **"I averaged 8 GB across the interval, my reservation is 16 GB, so+> there can't be any overage."**++Wrong if you ever spiked above 16 GB. The averaging argument doesn't+apply — every second is settled independently against the ceiling.++> **"I never used my reservation; surely I shouldn't pay for it."**++You pay for it because that's what reserving means. The discount on the+reserved rate exists *because* you committed unconditionally. If+unused-but-paid behavior bothers you, reserve less and let on-demand+absorb the variability.++> **"My reservation should auto-resize to cover spikes."**++It doesn't. The reservation is whatever you committed to. Spikes above+the ceiling become overage. If you want spikes covered, reserve a higher+amount.++> **"If I cancel a sandbox in the middle of the interval, my unused+> reservation should roll over to the next interval."**++It doesn't. Reservations are per-interval; unused capacity in one+interval doesn't flow to the next.++> **"Reserved capacity makes the platform run my sandboxes faster /+> guarantee they start."**++Reserved capacity doesn't change runtime behavior. It guarantees the+platform has set aside capacity for you in that interval, so you won't+be admission-blocked. The sandboxes themselves run the same way.++## Edge cases at a glance| Case | Behavior || --- | --- |-| You hold reservations but run nothing | Reserved capacity is still committed for the interval. No overage. |-| You run workloads but have no reservations | `reservedGb = 0`, so `overageGb = usedGb`. All usage is on-demand. |-| You hold reservations in one interval and run in another | No carryover. Allocation is strictly per interval. |-| You cancel a block mid-interval | Cannot — `cancellableUntil` always precedes `startsAt`. Once the interval begins, blocks are settled. |-| A sandbox crashes and hibernates inside an interval | Usage before the crash counts; usage after hibernation does not. Standard scale-event math. |+| You hold reservations but run nothing | Reserved capacity billed in full (commitment). No overage. |+| You run workloads but have no reservations | `reservedGb = 0`, so the ceiling is at zero. **Every second of usage is overage.** Same as today's pure on-demand bill. |+| You hold reservations in one interval and run in a different one | No carryover. Allocation is strictly per interval. |+| You run multiple sandboxes whose memory sums above your reservation | Their concurrent memory is summed, then the ceiling rule applies. No per-sandbox attribution — the platform doesn't decide which sandbox is "the reserved one." |+| Your reservation matches your spike but not your average | You pay the full reservation (committed at the spike size); spikes are covered; below-spike time is below the ceiling and consumed at the reserved rate. Sometimes the right shape — covers worst-case at the lower rate. |+| A sandbox crashes mid-interval | Memory drops as soon as the scale event closes. The per-second integration sees the new lower memory immediately for subsequent seconds. |+| You make a reservation mid-interval | Not possible — reservations must be made before the interval starts (`earliestReservableStart` enforces a lead time). The interval you're already in is on-demand only. |++## Why per-second instead of aggregate?++It's simpler and matches the "capacity available" intuition.++If we used a GB-second budget — "you have 14 400 GB-seconds budgeted+for this interval, you only pay overage when you exceed that total" —+then a brief spike of arbitrary magnitude could be free as long as it's+balanced by quiet time. That makes reservations behave like burstable+budgets, which is harder to reason about and creates incentives for+adversarial spike patterns.++Per-second settlement is honest: at every moment, your committed+capacity is what you committed to. Above it is overage. Below it is+covered. No gaming, no averaging, no edge cases.## Where to go next<CardGroup cols={2}>- <Card title="Reserving and cancelling" icon="lock" href="/reserved-capacity/reserving-and-cancelling">- How blocks are created and retired.+ <Card title="Reserving capacity" icon="lock" href="/reserved-capacity/reserving">+ How to commit to capacity in advance.</Card><Card title="Reading the calendar" icon="calendar" href="/reserved-capacity/calendar">Plan capacity you'll actually use.