> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sfcompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Limits

> Read the compute caps, resource limits, and credit line on your account, and your usage against them

> [!NOTE]
>
> This feature is in [public preview](https://docs.sfcompute.com/preview/roadmap.md#feature-states).

A limit caps how much compute time your account can hold at once, how many of a resource it can hold, or how large a credit line it has. This page covers the limits `sf limits` shows, the units they use, and how to request a higher one.

```bash theme={null}
sf limits
```

```text theme={null}
NAME                                    LIMIT      USED  SCOPE
compute_max_total_node_hours            5760       1200  account
compute_max_total_node_hours            720        720   sku_4UpxzQw7A8N
compute_node_hours_free_window_seconds  3600       —     account
max_instances                           64         12    account
credits_max_credit                      unlimited  —     account
```

Each row is one limit in effect on your account:

* **NAME**: the limit’s identifier, covered in the sections below
* **LIMIT**: the cap, or `unlimited` when your account has no cap for that name
* **USED**: your usage against the cap, printed as `—` when there is no figure to report, and in red once it reaches the cap
* **SCOPE**: what the cap covers, either your whole account or the `sku_…` ID of one [SKU](https://docs.sfcompute.com/preview/instance-skus.md)

A limit with no row is unset, and an unset limit refuses nothing.

A compute limit counts the node-hours you hold plus the unfilled node-hours of your open buy orders. Some open sell orders subtract from that total, as described in [Compute limits](#compute-limits).

SF Compute refuses a buy order that would put you over the cap. A [callable buy order](https://docs.sfcompute.com/preview/orders.md#callable-buy-orders) doesn't count. A compute limit never refuses a sell order, because a sell can't raise your usage. You can't cancel a sell order that lowered your usage if cancelling it would put you over the cap.

## Compute limits

`compute_max_total_node_hours` caps that total in node-hours across all pools, so a resting buy order counts against the cap before it fills. A node-hour is one node held for one hour, so the cap measures the area under the combined schedule. Buying further ahead spends it the same way a wider order does.

Pool: `node-hours held`

Placing a [standing sell order](https://docs.sfcompute.com/preview/orders.md#sell-orders) offsets your usage for this limit, but only if it allows partial fills (`--allow-partial`) and its price is below the offset price ceiling. SF Compute sets this ceiling and can change it. See the current one in the `COMPUTE LIMIT OFFSET PRICE CEILING` row of `sf platform-constants`.

The offset lasts only while the sell order stands. For example, with a cap of 200 node-hours:

* You reserve 200 node-hours. You are at the cap and cannot buy more.
* You place a standing sell order for 100 node-hours, allowing partial fills and priced below the ceiling. You can now reserve another 100 node-hours.
* You can repeat this as many times as you like, as long as you keep placing sell orders.
* You cannot cancel those sell orders while doing so would put you back over the cap.

A [callable buy order](https://docs.sfcompute.com/preview/orders.md#callable-buy-orders) gets the same offset at any price. SF Compute lists the compute the order buys as standing sell orders at a multiple of the order's max rate, so the order doesn't count toward your usage.

`compute_node_hours_free_window_seconds` sets how far ahead the cap starts counting, in seconds from now. An order that fits entirely inside the free window never counts. An order that starts inside the window counts from the edge of the window onward.

## Account-wide and per-SKU limits

A limit’s scope decides which part of your allocation it meters. A limit scoped to your account meters every pool you hold. A limit scoped to one SKU meters your allocation on that SKU alone. Both apply together rather than replacing each other, so an order for that SKU has to fit inside both. Resource limits are always account-wide.

## Resource limits

A resource limit caps how many of one kind of resource your account holds at once. **USED** is how many you hold now. SF Compute refuses a request that would create one more than the limit allows; delete one to make room.

| Name | Counts |
| - | - |
| `max_instances` | Instances that are not destroyed |
| `max_standing_orders` | Open orders: those on the book, plus any placed but not yet settled. An order placed without `--allow-standing` never rests, so this limit never refuses one. |
| `max_workspaces` | Workspaces, including your default workspace |
| `max_pools` | Pools |
| `max_images` | Images that are not deleted, including uploads still in progress and revoked images |
| `max_tokens` | API tokens that are neither deleted nor expired |
| `max_subnets` | Subnets that are not deleted |
| `max_infiniband_partitions` | InfiniBand partitions that are not deleted |

A request retried with the same `Idempotency-Key` as one that already created its order or pool isn't refused, because it creates nothing new.

## Credit line

`credits_max_credit` is the credit line on your account, in dollars. It comes from the same credit line as the overage limit in `sf billing balance`. It reads as `unlimited` for an account with no ceiling.

## Requesting a higher limit

SF Compute sets your limits. Verify your organization in the [SF Compute dashboard](https://sfcompute.com/dashboard/settings), then [contact us](https://sfcompute.com/contact) with the limit you need.
