# Budgets and limits

https://modelportal.ai/docs/budgets

Four layers control spend and call rate, from the account down to a single request:

| Layer | Control | When exceeded |
| --- | --- | --- |
| Account | Prepaid balance | 402 `insufficient_balance` |
| Key | Daily and monthly spend limits | 402 `budget_exceeded` |
| Account and key | Requests per minute and concurrent requests | 429 `rate_limited` with `Retry-After` |
| Single request | `provider.max_price` price caps | Endpoints above a cap are excluded; 422 `no_eligible_endpoint` if all are |

## Balance

Before each call, the platform estimates the maximum cost from the input estimate plus the allowed maximum output, and rejects the call if your available balance cannot cover it. If you leave the maximum output unset, the platform trims it to what your balance can pay for. See [Billing](/docs/billing).

## Key spend limits

Set daily and monthly limits per key on the Keys page of the console; days and months roll over in UTC. The check uses the estimated cost before the call, so one call may push actual spend slightly past the limit, after which calls are rejected. See [API keys](/docs/api-keys).

## Rate limits

There are three limits: account requests per minute, per-key requests per minute, and concurrent requests. Defaults rise with the account's total top-ups; the tier table is in [Common errors](/docs/errors#rate-limits).

## Price caps

```json
{"provider": {"max_price": {"prompt": 1, "completion": 4}}}
```

`prompt` and `completion` are in USD per million tokens, `request` in USD per request and `image` in USD per image, written as non-negative JSON numbers (not strings) without an exponent. Endpoints above the cap in any dimension sit out the request.
