- Home
- Skills
- DevOps & Cloud
- Spend Brake: hard caps for paid API calls
More screenshots
Works with the AI Agents you already use
Spend Brake: hard caps for paid API calls
Route paid API calls through Spend Brake and handle 402 budget caps right.
Free
Spend Brake: hard caps for paid API calls
Example session with this skill installed
Our app calls Google Places and Tavily directly. Put them behind Spend Brake (hosted), cap at $5/day, and make sure the UI handles running out of budget.
- Read your context and instructions
- Compiled the spend brake
The agent finds every Places and Tavily call site, swaps the base URLs for https://proxy.spendbrake.dev/google-places and /tavily, reads the sb_live_… key and proxy URL from env instead of the provider keys, and wraps calls so that a 402 budget_exceeded throws a typed error that the UI shows (with resetsAt) instead of retrying. It then tells the user what they still have to do: sign up, add their Google and Tavily keys, create the key, set the $5/day org cap under Caps (or brake caps set org --day 5), and restrict the Google key to the proxy's IPs.
Connects securely to your tools. The creator never sees your data.
About this skill
This skill teaches a coding agent to put a project's paid API calls behind Spend Brake, an open-source egress proxy that prices each call per SKU before forwarding it and refuses it with 402 when a hard cap would be crossed. The agent swaps provider base URLs for the Spend Brake proxy and uses a Spend Brake virtual key for Google Maps Platform, Twilio, Mapbox, HERE, Tavily, Exa, Brave Search, SerpApi and custom APIs. It covers setting up the hosted service or a self-hosted Docker install, setting caps per org, key, SKU, environment, agent or session by day or month, handling 402 budget_exceeded and the other proxy errors without retry loops, running an agent inside a capped brake session, and defining a custom API with its prices. Every command, URL and header comes from the Spend Brake docs. The skill has no scripts, makes no network calls of its own and has no credentials.
What it does
- Maps each supported provider to its Spend Brake base URL and key slot
- Walks through hosted signup or self-hosted
docker compose+brake init - Sets caps via dashboard,
brake caps set, orPUT /v1/caps/{scope} - Adds 402/403/429/503 handling that surfaces the message and does not retry-loop
- Caps an agent run with
brake session --budget … - Defines and adds a custom API (
perRequestorreportedpricing)
Known limitations
- Hosted signup, provider-key entry and Google key restriction are steps the user does, not the agent
- Client-side Google Maps (JS API, tiles, widgets) is not proxied
- Custom API caps are only as accurate as the prices you enter
- Overshoot is bounded by one request's worst case, not zero
- Free hosted plan: 1 key, 1 provider, 1 custom API, up to $50/month protected spend
- Pinned to docs as of Spend Brake 0.2.1
Requires manual setup of provider keys in the Spend Brake dashboard or CLI. Only supports REST-based providers. Accuracy depends on pricing definition updates.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 12 days ago
- Free with an Agensi account
Requires