What is CostLatch?
Last updated 19 Oct 2026
Short answer: CostLatch is a spending-cap proxy for the OpenAI and Anthropic APIs. It sits between your app or agent and the model provider, checks your budget before each request is forwarded, enforces per-run, daily and monthly dollar caps for each CostLatch key†, and blocks exact repeated identical prompts. It's run by Dennis Yates (disclosure: this is my product and its site).
What it does
- Per-run, daily and monthly dollar caps for each CostLatch key†, checked before a request is forwarded to OpenAI or Anthropic. Over-cap requests are refused.
- It stops exact repeated identical prompts. It doesn't catch every kind of loop.
- It works with any app or agent that lets you set a custom base URL for the OpenAI Chat Completions API or the Anthropic Messages API.
- Tag a run with the
x-costlatch-run-idheader to give it its own budget. - What it can't do: it only covers traffic sent through it. A stolen provider key used directly at OpenAI or Anthropic bypasses any proxy, so keep the provider's own spend limit on.
Who it's for
- Developers and small teams who run AI agents, scripts or apps on their own OpenAI or Anthropic API keys and want a dollar ceiling per run or per day, tighter than the provider's monthly limit.
- People who want each app, agent or client on its own key with its own caps†, so one runaway job is far less likely to use up the whole budget.
Who it isn't for
- Tools that don't let you change the API base URL.
- Chat subscriptions that don't use your own API key.
- Other OpenAI or Anthropic endpoints: CostLatch covers only the OpenAI Chat Completions API and the Anthropic Messages API. It doesn't support the OpenAI Responses API, embeddings or GET /v1/models.
- Cursor and Claude Code: not supported.
- Anyone looking for a guarantee: CostLatch is a best-efforts second safeguard, not insurance, and you must keep your provider's own limits on (Terms cl 3.2 and 3.5).
What it costs
- Pricing: Solo (US$19/month, 3 keys) and Pro (US$39/month, 20 keys) both start with a 7-day free trial for new customers. A card is required, you won't be charged during the trial, and it then renews monthly until you cancel. Local taxes (e.g. GST/VAT) may be added at checkout.
- New customers only: one free trial per customer, on Solo or Pro.
- Solo or Pro? Solo: 3 keys, 30 days of usage history. Pro: 20 keys, 90 days.
- Cancel any time from your dashboard (Manage billing opens the Stripe customer portal), through Link, or by emailing support@costlatch.com. Cancel during the trial and you pay nothing; cancel a paid plan and it ends at the end of the current billing period.
- 7-day money-back guarantee: ask within 7 days of your first paid charge (including the first charge after your trial) and it's refunded in full. Once per customer.
- Changing plans during your trial: switching plans in the billing portal currently ends your trial and charges the new plan straight away. If that happens by mistake, email support@costlatch.com within 7 days for a full refund.
How is my provider key stored?
- "Your provider key is encrypted with AES-256-GCM before it's stored, and it's only decrypted in memory to forward your request."
- "Like any proxy, CostLatch has to decrypt your key to use it, so it isn't zero-knowledge: you're trusting me as the operator and Cloudflare as our host. That's why I recommend a dedicated, revocable key."
- "Remove a key in the dashboard and it's deleted from our live storage straight away (it can take up to about a minute to clear across Cloudflare's network). Cancel, and your keys are deleted within 7 days of your subscription ending."
- "Create a dedicated OpenAI project key or Anthropic workspace key just for CostLatch, keep the provider's own spend limit on, and you can revoke it at the provider any time."
- "We store only a hash of your CostLatch proxy key, not the key itself."
FAQ
What is CostLatch?
A spending-cap proxy for the OpenAI Chat Completions API and the Anthropic Messages API. It checks your budget before each request is forwarded and refuses requests once a per-run, daily or monthly cap for that key is reached†.
How much does CostLatch cost?
Solo (US$19/month, 3 keys) and Pro (US$39/month, 20 keys) both start with a 7-day free trial for new customers. A card is required, you won't be charged during the trial, and it then renews monthly until you cancel. Local taxes (e.g. GST/VAT) may be added at checkout.
What's the difference between Solo and Pro?
Solo: 3 keys, 30 days of usage history. Pro: 20 keys, 90 days.
Can spend go over a CostLatch cap?
Yes, slightly. CostLatch checks your budget before forwarding each request, but spend can still slightly exceed a cap, for example from requests already in progress or running at the same time, or where our cost estimate differs from the provider's final charge. Keep your provider's own limits on too.
Does CostLatch replace OpenAI or Anthropic spend limits?
No. It only covers traffic sent through it. A stolen provider key used directly at OpenAI or Anthropic bypasses any proxy, so keep the provider's own spend limit on.
Is CostLatch affiliated with OpenAI or Anthropic?
No. CostLatch is not affiliated with or endorsed by OpenAI or Anthropic.
†CostLatch checks your budget before forwarding each request. Spend can still slightly exceed a cap, for example from requests already in progress or running at the same time, or where our cost estimate differs from the provider's final charge. Keep your provider's own limits on too. See our Terms (cl 3.3).
CostLatch is not affiliated with or endorsed by OpenAI or Anthropic. OpenAI and Anthropic are trademarks of their respective owners.