opencheap.si
Credits

Set a daily spend limit on each API key your agents use

On OpenCheap, every API key can carry its own spend limit: daily, weekly, monthly or lifetime, in UTC windows. Set it to hard_stop and the key's requests are refused with a 402 once the limit is reached, so a coding agent left running overnight stops at the amount you chose instead of draining your balance. An email goes out at 80 % of the limit. One key covers every model, so the cap holds whichever model the agent switches to.

Get API key Updated November 14, 2026
4
windows: daily, weekly, monthly, lifetime
Per key
and one for the whole account
402
at the limit, until the window resets

Cap an agent in three steps

  1. 1
    Give the agent its own key
    One key per agent, project or customer, so each one's spend is counted and capped on its own.
  2. 2
    Set the limit
    In the console under API keys, by asking your agent over MCP, or with the Management API: daily, weekly, monthly and lifetime, at least one.
  3. 3
    Choose what happens at the limit
    hard_stop refuses the key's requests with a 402 until the window resets; alert_only only emails. Both email once per limit and window at alertPct (80 by default, 0 for none).

From code, or from your agent

# A daily cap of $5 and a monthly cap of $50 on one key, refusing requests at the limit
curl -s -X PUT https://app.opencheap.si/api/v1/keys/$KEY_ID/budget \
  -H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
  -d '{ "limits": { "daily": 5, "monthly": 50 }, "alertPct": 80, "mode": "hard_stop" }'

# → { "scope": "key", "limits": { "daily": 5, "weekly": null, "monthly": 50, "lifetime": null }, "status": "ok",
#     "windows": [ { "window": "daily", "limitUsd": 5, "spentUsd": 1.27, "resetsAt": "…T00:00:00Z" }, … ] }
You: Make a key for my coding agent with a $5 daily limit that stops at the limit.
Agent: create_key → set_key_budget { daily: 5, mode: "hard_stop" }
       Done: key "coding-agent", $5 a day, resets 00:00 UTC.

Every endpoint, including the account budget and GET /budgets with each limit's spend this window, is in the Management API docs; connecting an agent over MCP is in the MCP docs.

Spend limits elsewhere

From each one's own docs, as of November 14, 2026.

Per key?WindowsAt the limit
OpenCheapYes, and per accountDaily, weekly, monthly, lifetime402 (hard_stop), or an email only (alert_only)
OpenAINo: per organization and per projectMonthlyHard limits return 429, not instantly; alerts only notify
AnthropicNo: per organization and per workspaceMonthlyRequests are refused until the month resets or the limit is raised
LiteLLMYes: max_budget on a virtual keyAny budget_duration, such as 1d or 30dRequests rejected; you run the proxy and its Postgres database yourself

Questions, answered

How do I set a daily spend limit on an API key?

On OpenCheap, give the key a budget: in the console under API keys, from your agent over MCP, or with PUT https://app.opencheap.si/api/v1/keys/{id}/budget and { "limits": { "daily": 5 }, "mode": "hard_stop" }. At the limit the key's requests are refused with a 402 until the day resets at 00:00 UTC.

Can each key have its own limit?

Yes. Every key can carry its own daily, weekly, monthly and lifetime limits, and the whole account can have one too. Give each agent, project or customer its own key and its own cap.

Does the limit block requests or only send an alert?

Your choice per budget: hard_stop refuses the key's requests with a 402 at a limit, alert_only never blocks. Both send one email per limit and window when spending crosses the alert share, 80 % by default.

When do the limits reset?

In UTC windows: daily at 00:00 UTC, weekly on Monday, monthly on the first. A lifetime limit counts from when it was set and never resets.

Does OpenAI or Anthropic have per-key spend limits?

Not per key, from their docs as of November 14, 2026: OpenAI sets monthly limits per organization and per project, and Anthropic monthly limits per organization and per workspace. A key on OpenCheap carries its own daily limit, across every model it calls.

Does the limit cover every model?

Yes. A budget counts the key's spend at our price on every model it calls, Claude, GPT, Gemini and open models alike, so one cap covers an agent that switches models.

Every major model, one key.