Spend limits
PUTapi.dizo.ai/v1/billing/limitsFree
Account-wide monthly cap in USD, alert thresholds and a lock.
Set monthly_cap_usd to null for no cap. With locked: true, no API key can change billing settings.
Cost: Free. Charged never.
Parameters
| Name | Type | Description |
|---|---|---|
| monthly_cap_usd | number | null | Hard monthly ceiling, refills included. |
| daily_cap_credits | integer | Account daily credit limit. |
| alerts_pct | integer[] | e.g. [50,80,100]. |
| alert_emails | string[] | Who gets alerts. |
| locked | boolean | Block API changes to billing. |
Example
{
"monthly_cap_usd": 2000,
"alerts_pct": [
50,
80,
100
],
"alert_emails": [
"finance@example.com"
],
"locked": false
}{
"limits": {
"monthly_cap_usd": 2000,
"alerts_pct": [
50,
80,
100
],
"locked": false
}
}curl -X PUT https://api.dizo.ai/v1/billing/limits \
-H "Authorization: Bearer $DIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"monthly_cap_usd":2000,"alerts_pct":[50,80,100],"alert_emails":["finance@example.com"],"locked":false}'import os, requests
r = requests.put(
"https://api.dizo.ai/v1/billing/limits",
headers={"Authorization": f"Bearer {os.environ['DIZO_API_KEY']}"},
json={"monthly_cap_usd":2000,"alerts_pct":[50,80,100],"alert_emails":["finance@example.com"],"locked":false},
)
print(r.json(), r.headers["x-dizo-credits-used"])const r = await fetch("https://api.dizo.ai/v1/billing/limits", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.DIZO_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"monthly_cap_usd":2000,"alerts_pct":[50,80,100],"alert_emails":["finance@example.com"],"locked":false}),
});
console.log(await r.json(), r.headers.get("x-dizo-credits-used"));Errors follow the standard error shape. Add "dry_run": true for a free quote and "max_credits" to cap spend. Agents: this page is also at /docs/billing-limits.md.