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

# Budget Limits

> Financial guardrails on AI spend, set per workspace on an Integration and cascading to every provider created from it.

**Budget Limits on Integrations** provide a simple way to manage your spending on AI providers (and LLMs) — giving you confidence and control over your application's costs. They act as financial guardrails, preventing unexpected AI costs across your organisation. These limits cascade down to all AI Providers created from this Integration.

## Setting Budget Limits

1. In your Integration settings, navigate to **Workspace Provisioning**
2. Select which workspaces should have access:
   * **All Workspaces**: Grants access to every workspace in your organisation
   * **Specific Workspaces**: Choose individual workspaces that need access
3. Click on the `Edit Budget & Rate Limits` <Icon icon="pen-to-square" size={24} /> icon to edit the budget limits for the selected workspace
4. Set your desired budget Limits
5. Optionally, Select the `Apply to every workspace where this integration is enabled` checkbox to apply the same budget limits to all workspaces where this integration is enabled

### Cost-Based Limits

Set a budget limit in USD that, once reached, will automatically expire the key to prevent further usage and overspending.

### Token-Based Limits

Set a maximum number of tokens that can be consumed, allowing you to control usage independent of cost fluctuations.

<Note>
  **Key Considerations for Budget Limits**

  * Budget limits can be set as either cost-based (USD) or token-based
  * The minimum cost limit you can set is **\$1**
  * The minimum token limit you can set is **100 tokens**
  * Budget limits apply until exhausted or reset
  * Budget limits are applied only to requests made after the limit is set; they do not apply retroactively
  * Once set, budget limits **cannot be edited** by any organisation member
  * Budget limits work for **all AI provider** created on the AI Gateway using the given **integration**
</Note>

## Alert Thresholds

Set alert thresholds to receive notifications before your budget limit is reached:

* For cost-based budgets, set thresholds in USD
* For token-based budgets, set thresholds in tokens
* Receive email notifications when usage reaches the threshold
* Continue using the key until the full budget limit is reached

## Periodic Reset Options

Configure budget limits to automatically reset at regular intervals:

**Reset Period Options:**

* **No Periodic Reset**: The budget limit applies until exhausted with no automatic renewal
* **Reset Weekly**: Budget limits automatically reset every week
* **Reset Monthly**: Budget limits automatically reset every month

**Reset Timing:**

* Weekly resets occur at the beginning of each week (Sunday at 12 AM UTC)
* Monthly resets occur on the **1st** calendar day of the month, at **12 AM UTC**, irrespective of when the budget limit was set prior

## Policy-Based Budgets

The limits above are set on an Integration and cascade to the AI Providers created from it. For finer control — budgets scoped by user, API key, model, provider, or config, and grouped by any of them — use a **usage limit policy** instead. Policies are defined through the Admin API and evaluated per request.

See [Usage & Rate Limit Policies](/docs/aigw/product/enterprise-offering/budget-policies) for the condition keys, parameters, and twenty worked examples.


## Related topics

- [Budget Limits](/docs/aigw/product/ai-gateway/virtual-keys/budget-limits.md)
- [Enforce Budget Limits and Rate Limits for Your API Keys](/docs/aigw/product/administration/enforce-budget-and-rate-limit.md)
- [Enforce Workspace Budget and Rate Limits](/docs/aigw/product/administration/enforce-workspace-budget-and-rate-limits.md)
- [Usage & Rate Limit Policies](/docs/aigw/product/enterprise-offering/budget-policies.md)
- [CrewAI](/docs/aigw/integrations/agents/crewai.md)
