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

# Project Budgets

> Control LLM spending with monthly budgets and real-time alerts

## Overview

Dakora's budget feature helps you maintain control over LLM costs. Set spending limits at the project level, receive proactive alerts, and enforce budget caps to prevent overspending.

## Key Capabilities

<CardGroup cols={2}>
  <Card title="Monthly Budgets" icon="wallet">
    Set hard or soft spending limits per project
  </Card>

  <Card title="Real-time Alerts" icon="bell">
    Get notified before reaching budget thresholds
  </Card>

  <Card title="Flexible Enforcement" icon="shield">
    Choose between alert-only or hard budget blocks
  </Card>

  <Card title="Multi-Environment" icon="layer-group">
    Separate budgets for dev, staging, and production
  </Card>
</CardGroup>

## Setting Up Budgets

### Configure in Studio

1. Navigate to **Settings > Budget**
2. Set your monthly budget limit in USD
3. Configure alert thresholds (e.g., notify at 80%)
4. Choose enforcement mode: alert-only or hard limit

<Frame>
  <img src="https://mintcdn.com/dakora/mqF35kbrCE-AqvU1/assets/screenshots/budget-settings.png?fit=max&auto=format&n=mqF35kbrCE-AqvU1&q=85&s=1bafecad7189394c9a6b9842682704b7" alt="Budget Settings" width="1390" height="750" data-path="assets/screenshots/budget-settings.png" />
</Frame>

### Budget Configuration Options

| Setting          | Description                                        |
| ---------------- | -------------------------------------------------- |
| Monthly Budget   | Maximum USD spend per month                        |
| Alert Threshold  | Percentage at which to send alerts (e.g., 80%)     |
| Enforcement Mode | `alert` (notify only) or `block` (stop executions) |

## Budget Alerts & Enforcement

### Alert System

When spending approaches your configured threshold:

1. **Email notification** sent to project owners
2. **Dashboard warning** displayed in Studio
3. **API response** includes budget status in metadata

### Enforcement Modes

**Alert-only mode**: Continue executions but send notifications

**Block mode**: Reject new execution requests once budget is exceeded

```json theme={null}
{
  "error": "Budget exceeded",
  "details": {
    "budget_limit": 100.00,
    "current_spend": 102.45,
    "enforcement_mode": "block"
  }
}
```

## Best Practices

<AccordionGroup>
  <Accordion title="Start with Alert Mode">
    Begin with alert-only enforcement to understand your spending patterns
    before enabling hard limits that could disrupt service.
  </Accordion>

  <Accordion title="Set Multiple Thresholds">
    Configure alerts at 50% and 80% to give yourself adequate time to react
    before hitting the budget limit.
  </Accordion>

  <Accordion title="Use Environment-Specific Projects">
    Create separate projects for development, staging, and production
    with appropriate budget limits for each environment.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Observability" icon="chart-line" href="/features/observability">
    Track execution logs and traces
  </Card>

  <Card title="Templates" icon="file-code" href="/concepts/templates">
    Optimize your prompts for efficiency
  </Card>
</CardGroup>
