---
title: Billing & Budgets
description: "Understand pricing, set budget guards, and manage costs."
---

# Billing & Budgets

Caged charges for two things: **compute time** and **LLM tokens** (when using Caged-provided models).

## Pricing

### Compute

| Resource | Rate |
|----------|------|
| vCPU | $0.01/hour per core |
| Memory | $0.005/hour per GB |
| Disk | $0.001/hour per GB |
| Network egress | $0.01/GB |

Paused sandboxes incur **no compute charges**.

### Plans

| Plan | Monthly | Included Compute | Concurrent Sandboxes |
|------|---------|-------------------|---------------------|
| Free | $0 | 10 hours | 2 |
| Pro | $29 | 100 hours | 10 |
| Team | $99 | 500 hours | 50 |
| Enterprise | Custom | Custom | Unlimited |

Overages beyond included compute are billed at the standard rates.

## Budget Guards

Set a maximum dollar amount per sandbox. When the budget is reached, the sandbox is automatically destroyed.

### Via CLI

```bash
caged up --budget 5.00
```

### Via Config

```yaml
# .caged.yaml
budget: 5.00
```

### Via API

```bash
curl -X POST https://api.caged.dev/v1/sandboxes \
  -H "Authorization: Bearer caged_sk_..." \
  -d '{"template": "node-20", "budget": 5.00}'
```

## Budget Alerts

Automatic alerts fire at budget thresholds:

| Threshold | Alert Type | Action |
|-----------|-----------|--------|
| 80% | `budget_warning` | Notification sent |
| 95% | `budget_critical` | Urgent notification |
| 100% | `budget_exceeded` | Sandbox destroyed |

Customize thresholds in **Dashboard → Settings → Alert Rules**.

## Monitoring Spend

### Real-Time

```bash
caged status cage-a1b2c3d4
# Shows current cost, budget remaining, burn rate
```

### Dashboard

The dashboard shows:
- Per-sandbox cost breakdown
- Daily/weekly/monthly spend charts
- Cost by agent type
- Projected monthly spend

### API

```bash
curl https://api.caged.dev/v1/billing/subscription \
  -H "Authorization: Bearer caged_sk_..."
```

## Cost Optimization Tips

1. **Use idle timeouts** — Auto-pause inactive sandboxes to stop compute charges
2. **Set budgets** — Always set a budget guard to prevent runaway costs
3. **Right-size resources** — Use 1 vCPU / 512MB for simple tasks
4. **Use snapshots** — Pause and snapshot instead of keeping sandboxes running
5. **Clean up** — Destroy sandboxes you're done with

