Last updated:
Quick answer
Give each agent its own project or workspace with its own key, set a monthly spend limit below what you can afford to lose, and add an alert at half. Anthropic and OpenAI both let you set your own limits. Add a line to client contracts on who pays for runaway usage.
Free PDF
Get this setup as a PDF
Confirm your email and we'll open a print-ready copy of this setup you can save as a PDF. You also get the free starter pack and one setup a week. Unsubscribe anytime.
Already a subscriber? Unlock it on this device
At a glance
All outcome figures are estimates from cited sources, not independent verification by us.
- What it is allowed to do
- Read-only
Only reads, researches, or summarizes. It never drafts outbound content or changes anything.
- Time saved (estimate)
- About 30 minutes to set up.
- Difficulty
- Intermediate
- Tools needed
- Claude Console, OpenAI API platform
- Typical cost
- Spend limits are free to set. Prices: Not stated in sources.
Reviewed Nov 2, 2026
Basis (estimate): Estimate only: based on the steps above, not timed.
What does this setup do?
Set a monthly spend limit and an alert on every API account your agents use, with one key per agent, so a runaway task stops before it burns your budget.
Who is it for?
Owners and builders running agents on pay-as-you-go API keys, especially for clients.
How do you set it up?
Tools
- Claude Console and or OpenAI API platform
- One project or workspace per agent
- A note of what you can afford per month
Steps
- List every agent and which API key it uses. Shared keys make one runaway task hit everything.
- Create one project or workspace per agent and give each its own key.
- Set a monthly spend limit. Anthropic says you can set your own limit below your tier cap on the Billing page in the Claude Console; OpenAI documents per-project spend limits and notification thresholds.
- Set an alert at about half the limit so you hear before it stops.
- Use the prompt below to write a short clause for client work on usage limits and who pays for overruns.
- Check spend weekly for the first month and adjust.
Example output
Illustrative. Your results will differ.
- Lead agent: limit $40 a month, alert at $20
- Invoice agent: limit $15 a month, alert at $8
- Clause: The agent pauses at $40 of monthly usage. Usage above that needs written approval and is billed at cost.
Where to paste this prompt
Claude → Project knowledge & custom instructions
Copy-paste prompt
Adapt bracketed fields to your situation.
Write a short clause for my client agreement about AI usage costs. Plain English, under 120 words.
What I run for the client: [DESCRIPTION]
Monthly usage cap I set: [AMOUNT]
What happens at the cap: [e.g. the agent pauses and I notify the client]
Who pays above the cap, and only with written approval: [CLIENT OR ME]
Also list the 3 settings I should confirm before starting: spend limit, alert threshold, separate key. This is a draft for my lawyer to review, not legal advice.Newsletter
Get the free starter pack
Free starter pack with five beginner copy-paste prompts after you confirm, plus one researched setup in your inbox each week. Unsubscribe anytime.
What usually goes wrong?
Where agents tend to stall on this job. More patterns in Where AI gets stuck.
- Leaving keys in a default workspace that cannot have its own limit.
- Setting a limit higher than you can afford.
- Forgetting subscriptions and plan overages are billed separately from the API.
Which chat tools work with this prompt?
Paste the prompt into any of these assistants (free or paid tiers).
- Claude
- ChatGPT
- Grok Bot
Common questions
- How do I stop an AI agent from running up my API bill?
- Set a monthly spend limit and an alert on its own project or workspace, with its own key.
- What happens when the limit is reached?
- Requests stop until the limit is raised or the month resets, so the agent pauses instead of spending.
- What about client work?
- Agree a usage cap and who pays for overruns in writing before you start.
What tips make it smoother?
- One key per agent makes it obvious which one ran away.
- An alert without a hard limit only tells you after the money is gone.
- Retry loops are the usual culprit; limit retries in the agent too.
Where do the claims come from?
Summaries use public sources linked below, not independent verification. How setups are picked.
- Read Anthropic’s write-up (platform.claude.com)
Anthropic: Rate limits: set your own monthly spend limit below your tier cap on the Billing page in the Claude Console; requests stop when it is reached (read 2026-11-02 from a search result excerpt of the page)
- Read OpenAI’s write-up (help.openai.com)
OpenAI: Managing projects in the API platform: per-project limits, including a monthly spend limit and notification threshold (read 2026-11-02 from a search result excerpt that cites the page)
Related setups
- Rate your bot fleet and forecast usage
Watch a fleet of bots daily, spot the ones wasting usage, and pause or tighten them before the plan runs out.
- Set guardrails before an AI agent gets access
Write a one-page rulebook for an AI agent before it touches your accounts: what it can read, what it can only draft, what always needs your approval, and what it must never do.
- Track recurring software spend and idle charges
Scan renewal emails and receipts for SaaS and AI tools, flag overlaps, and draft refund or cancellation messages for charges you are not using.