# Limit spending by API key

Source: https://cicora.ai/en/docs/spend-limits

Use a separate API key and USD limit for each project, agent, or team member whose usage must be controlled independently.

## Set the limit in the cabinet

1. Open [API keys](https://app.cicora.ai/api-keys) in the workspace that owns the key.
2. Create a separate key or find an existing one.
3. Open its limit settings.
4. Choose unlimited use or one of the displayed periods: `DAY`, `WEEK`, or `MONTH`.
5. Enter the USD amount and save.

The key row shows how much of the configured amount has been spent. The same page also shows recent model usage for that key.

*A project key has a USD spending window checked before a new request starts.*

*Give each project its own key and current spending limit.*

## Understand the calendar windows

| Period  | Window in `Europe/Moscow`                               |
| ------- | ------------------------------------------------------- |
| `DAY`   | Starts at local midnight.                               |
| `WEEK`  | Starts Monday at local midnight.                        |
| `MONTH` | Starts on the first day of the month at local midnight. |

Use the returned `resetAt` value when handling a blocked request. Do not calculate the reset from the client's timezone.

## Know what the limit checks

Before a request starts, the service adds current captured spend, active reservations, and the new estimated reservation. If the total would exceed the key's limit, model execution does not start and the API returns HTTP `429` with `API_KEY_SPEND_LIMIT_EXCEEDED`.

The response identifies the period, limit, spent and reserved amounts, required estimate, currency, and `resetAt`. The reservation is still an estimate: a completed request is charged for full confirmed usage even if its final cost exceeds the amount reserved, and later requests can then be blocked.

## Use the supported management workflow

Create, change, or remove spend limits in the cabinet UI. There is currently no documented public automation contract for managing these limits. Do not copy requests from browser developer tools or treat cabinet traffic as a platform-key API.

## Respond to a blocked request

For `API_KEY_SPEND_LIMIT_EXCEEDED`, either wait until the response's `resetAt` or change the key's limit in [API keys](https://app.cicora.ai/api-keys). Generic retry backoff does not create more budget. If the code is a different kind of `429`, follow the action for that public error instead.

## Troubleshooting


**HTTP 429 blocks the request**


Read the public code first. `API_KEY_SPEND_LIMIT_EXCEEDED` is a budget decision: inspect `period`, `spentAmount`, `reservedAmount`, and `resetAt`. A different `429` needs its own retry guidance rather than a limit change.


**The same limit error remains after resetAt**


Refresh the key, confirm the active workspace, key name, and visible masked key prefix, then compare the response's `resetAt` with Moscow time. If it is still stale, preserve the exact response and request time for support.


**Captured spend crossed the configured amount**


Compare the request's reserved estimate with its captured total in Usage. One in-flight request can settle above its estimate; the limit records that full total and blocks later requests. This is different from several concurrent reservations consuming the remaining budget.

## FAQ

### What is cicora.ai?

cicora.ai is a multi-model AI workspace and compatible API for chat, text, images, video, coding tools, and teams. Start with the [overview](/en.md), [documentation](/en/docs.md), or [model catalog](/en/models.md).

### How is usage billed?

Confirmed usage is charged in USD from the active workspace's prepaid balance. Use the live catalog for current model prices and the [usage guide](/en/docs/usage-costs.md) for settlement details.

### Which protocols and integrations are available?

Documentation covers OpenAI-compatible Chat Completions and Responses, Anthropic Messages, image interfaces, Claude Code, OpenCode, and Codex CLI. Compatibility does not imply support for every upstream parameter.

### Which sources are authoritative and current?

For model IDs, availability, capabilities, limits, and prices, use the [live catalog](/en/models.md). For API behavior, use the matching [documentation page](/en/docs.md). Never include API keys, private workspace data, or preview URLs in public documents.
