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

# Check AI Budget

> Verify a user has sufficient credits before an AI action.

Verify that a user has enough credits and budget for an AI action before executing it.

## Endpoint

```
POST /functions/v1/check-ai-budget
```

## Request body

| Parameter        | Type   | Description                                 |
| ---------------- | ------ | ------------------------------------------- |
| `action`         | string | The action to check (e.g., `generate_reel`) |
| `estimated_cost` | number | Estimated cost of the action                |

## Response

```json theme={null}
{
  "allowed": true,
  "remaining_budget": 4.85,
  "credits_balance": 45
}
```
