# Auto-refill — Dizo API

`PUT https://api.dizo.ai/v1/billing/auto-refill`

When balance falls below a threshold, automatically buy a fixed dollar amount of credits.

Refills are priced at the tier for `amount_usd` and never exceed the monthly cap.

**Cost:** Free. Charged: never.

## Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| `enabled` | boolean | yes | Turn refill on or off. |
| `threshold_credits` | integer |  | Refill when balance drops below this. |
| `amount_usd` | number |  | Amount to charge per refill (min 10). |

## Example request
```json
{
  "enabled": true,
  "threshold_credits": 5000,
  "amount_usd": 500
}
```

## Example response
```json
{
  "auto_refill": {
    "enabled": true,
    "threshold_credits": 5000,
    "amount_usd": 500,
    "rate_usd": 0.021
  }
}
```

## cURL
```bash
curl -X PUT https://api.dizo.ai/v1/billing/auto-refill \
  -H "Authorization: Bearer $DIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"threshold_credits":5000,"amount_usd":500}'
```
