# Allowances

Allowances split an account into workspaces and give each one a spending limit in Australian dollars. A workspace can be a department, a project or, for an MSP, one client. Keys belong to a workspace, and any key can have its own limit as well.

Set them up in the [console](https://www.continuumlabs.ai/console) under Cost control, or from your own systems with the [management API](/docs/management-api).

## How a limit is enforced

Every request reserves its worst-case cost before it runs. The worst case is the prompt plus the longest reply its `max_tokens` allows. The reservation is checked in one database step against three limits:

1. The key's limit.
2. The workspace's allowance.
3. The account's credit.

If any of them can't cover it, the request is refused before it reaches the model. When the request finishes, the real cost is kept and the rest is returned. Requests sent at the same moment each need their own reservation, so an allowance can't be crossed, however many requests arrive at once.

A refusal looks like this:

```json
{"error": {"message": "This workspace's allowance for the period is used up. It resets at the start of the next period, or the account owner can raise it.", "type": "insufficient_quota", "code": "allowance_reached"}}
```

## What happens at the allowance

Each workspace chooses one of two actions:

| `at_limit` | What happens |
|---|---|
| `stop` | Requests are refused until the allowance resets. |
| `downshift` | From 90% of the allowance, requests run on a cheaper model you choose. At 100% they stop. |

With `downshift`, the response names the model that actually answered, and carries the header `x-continuum-downshifted: true`. You are charged that model's price.

Key limits always stop.

## Resets

Allowances and key limits reset `daily`, `weekly` (on Monday) or `monthly` (on the 1st), at midnight in Sydney.

## Alerts

Each workspace can send alerts at 50%, 80% and 100% of its allowance, once each per period:

- **By email**, to the address you set.
- **To Slack or Teams**, through an incoming webhook you paste in.

## Limits inside limits

A request is refused if any level on its path is out of room. A key's limit doesn't have to fit inside its workspace's allowance, but the smaller one always wins.

## Who can see what

The console shows every workspace, key and statement on the account to the account owner. Management keys can see and change workspaces and keys, and read statements. They can't call models. Ordinary keys can call models and nothing else.

## Next

- [Receipts](/docs/receipts): label requests so spend becomes cost per job.
- [Statements](/docs/statements): the monthly page and the FOCUS export.
- [Management API](/docs/management-api): workspaces and keys from your own systems.
