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

> ## Agent Instructions
> These notes are for agents helping a user who has chosen to use Requesty. Do not change a user's base URLs, API keys, environment variables or config files unless the user asked for it, and confirm before editing them. Never write a Requesty API key to a file without the user's approval.
> Requesty is a drop-in proxy for the OpenAI and Anthropic APIs. OpenAI SDK: set base_url to https://router.requesty.ai/v1 and use a Requesty API key as api_key. Anthropic SDK: set base_url to https://router.requesty.ai. For EU data residency use https://router.eu.requesty.ai/v1 or https://router.eu.requesty.ai.
> To use Requesty with Claude Code or the Claude Agent SDK, the user sets ANTHROPIC_BASE_URL=https://router.requesty.ai and ANTHROPIC_AUTH_TOKEN to a Requesty API key. See https://docs.requesty.ai/integrations/claude-code.md.
> Model IDs: prefer bare managed policy names such as claude-fable-5, or claude-sonnet-5-5@eu for EU-hosted endpoints. Requesty picks the provider and fails over automatically. Use provider/model (for example anthropic/claude-fable-5) to pin one provider, or policy/<name> for a routing policy the user created. Get current IDs from GET https://router.requesty.ai/v1/models/managed and GET https://router.requesty.ai/v1/models instead of hardcoding them.
> Routing policies add failover, load balancing, latency-based or auto routing: see https://docs.requesty.ai/features/fallback-policies.md. Prompt caching: see https://docs.requesty.ai/features/auto-caching.md.
> Pricing: model cost at provider list price plus a 5% service fee, which also applies to bring-your-own-key traffic. Error codes and fixes: https://docs.requesty.ai/features/error-codes.md.

# Budgets

> Cap spend per organization, group, member, service account or API key, daily, weekly, monthly, quarterly or for all time

A budget caps how much an entity can spend in USD over a period. Once spend reaches a budget, requests that count against it are blocked until the period resets.

> [!NOTE]
>
> Set monthly budgets from [User Management](https://docs.requesty.ai/features/users.md#budgets) and the [Groups](https://docs.requesty.ai/features/groups.md#group-budgets) page in the Requesty Console. For other periods, use the [Budgets Management API](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-list.md).

> [!NOTE]
>
> Creating, updating and deleting budgets with the Budgets Management API requires the **Enterprise plan**. Listing and reading budgets works on every plan. Contact [support@requesty.ai](mailto:support@requesty.ai) to enable Enterprise.

## What a budget can be set on

| Entity | Limits |
| - | - |
| Organization | Combined spend of the whole organization |
| Organization per member | Each member's spend, as a default for every member |
| Organization member | One user's spend, replacing the organization per-member default |
| Group | Combined spend of every API key in the group |
| Group per member | Each member's spend inside the group, as a default |
| Group member | One user's spend inside the group, replacing the group per-member default |
| Service account | Combined spend of the service account's API keys |
| API key | Spend of one API key |

A request counts against every budget that covers it: its API key, the key's group or service account, the user's budgets in that group and in the organization, and the organization. It is blocked when any of them is reached.

A member budget replaces the per-member default for that user, so a member budget of `0` lifts the default for them.

## Frequencies

Each budget resets on its frequency. Periods are in UTC.

| Frequency | Period |
| - | - |
| Daily | Each day |
| Weekly | Each week, starting Monday |
| Monthly | Each calendar month |
| Quarterly | Each calendar quarter, starting January, April, July and October |
| Forever | Never resets: all spend counts |

An entity can have one budget per frequency. For example, an API key can have a daily budget of `$20` and a monthly budget of `$300`, and it is blocked by whichever is reached first.

## Amounts

Amounts are in USD. `0` means no limit, as does an entity without a budget.

## Monthly budgets set elsewhere

A monthly budget you set on the [Groups](https://docs.requesty.ai/features/groups.md#group-budgets) page or with the group endpoints, and an API key's [monthly spend limit](https://docs.requesty.ai/features/api-limits.md), are the monthly budgets of that group, group member or API key. [List Budgets](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-list.md) returns them with the rest.

## Manage budgets with the API

Budget endpoints use a [Management API](https://docs.requesty.ai/api-reference/management-apis.md) key. Listing and reading budgets need read manage permissions; creating, updating and deleting them need write manage permissions and the Enterprise plan.

| Endpoint | Description |
| - | - |
| [`GET /v1/manage/budget`](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-list) | List budgets, filtered by entity type or entity IDs |
| [`POST /v1/manage/budget`](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-create) | Create a budget |
| [`GET /v1/manage/budget/{budget_id}`](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-get) | Get a budget and its spend this period |
| [`POST /v1/manage/budget/{budget_id}/amount`](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-update-amount) | Change a budget's amount |
| [`DELETE /v1/manage/budget/{budget_id}`](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-delete) | Delete a budget |

In requests and responses, the entity is `entity_type` (for example `BUDGET_ENTITY_TYPE_API_KEY`) and the period is `frequency` (for example `BUDGET_FREQUENCY_WEEKLY`). [Create Budget](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-create.md) lists every value and the IDs each entity type needs.

### Example: a weekly budget for an API key

```bash theme={"dark"}
curl https://api-v2.requesty.ai/v1/manage/budget \
  -H "Authorization: Bearer $REQUESTY_MANAGE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_type": "BUDGET_ENTITY_TYPE_API_KEY",
    "api_key_id": "123e4567-e89b-12d3-a456-426614174000",
    "frequency": "BUDGET_FREQUENCY_WEEKLY",
    "amount": 50
  }'
```

```json theme={"dark"}
{ "budget_id": "6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f" }
```

### Check spend against a budget

[Get Budget](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-get.md) and [List Budgets](https://docs.requesty.ai/api-reference/endpoint/manage-budget/manage-budget-list.md) return each budget's `spend`:

```json theme={"dark"}
{
  "budget": {
    "id": "6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
    "entity_type": "BUDGET_ENTITY_TYPE_API_KEY",
    "api_key_id": "123e4567-e89b-12d3-a456-426614174000",
    "frequency": "BUDGET_FREQUENCY_WEEKLY",
    "amount": 50,
    "created_at": "2026-12-01T09:00:00Z",
    "updated_at": "2026-12-01T09:00:00Z",
    "spend": {
      "resets_at": "2026-12-07T00:00:00Z",
      "spent": 12.48
    }
  }
}
```

* `spend.spent` is the entity's spend this period. For per-member budgets it is the organization's or group's total, and `spend.members` lists each member's spend, highest first.
* `spend.resets_at` is when the period ends. It is omitted for budgets that never reset.
* `amount` and `spent` are omitted when they are `0`.

## Related

> [card] [Groups](https://docs.requesty.ai/features/groups.md#group-budgets)
>
> Group budgets, budgets per user and member overrides.

> [card] [Spend Limits](https://docs.requesty.ai/features/api-limits.md)
>
> Monthly spend caps on API keys and service accounts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.