Skip to content
HN On Hacker News ↗

LLMCap — Hard Dollar Caps on LLM API Calls

▲ 25 points 19 comments by cfaruk 5d ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully AI-generated

99 %

AI likelihood · overall

AI
0% human-written 100% AI-generated
SEGMENTS · HUMAN 0 of 2
SEGMENTS · AI 2 of 2
WORD COUNT 343
PEAK AI % 100% · §1
Analyzed
May 19
backend: pangram/v3.3
Segments scanned
2 windows
avg 172 words each
Distribution
0 / 100%
human / AI fraction
Verdict
AI
Pangram v3.3

Article text · 343 words · 2 segments analyzed

Human AI-generated
§1 AI · 100%

LLMCap5 providers · <35ms added latency · Hard enforcementHard dollar capson every LLM call.When you hit $50, it stops. Not an alert — it stops. One line of code change.No surprise bills. Ever.your_app.py client = Anthropic(api_key="sk-ant-...")

client = Anthropic( api_key="sk-ant-...", base_url="https://proxy.llmcap.io/anthropic" ) Works with every major providerAnthropicOpenAIGoogle GeminiMistralCohereSetup in 5 minutesHow LLMCap works0Providers supported0msAvg added latency18,742Requests blocked today0.9%UptimeAvailable everywhere you codeWorks in your workflow⬛MarketplaceVS Code ExtensionLive spend in your status bar. Click to see today's usage, burn rate, and blocked count — without leaving the editor.Install Extension>_PyPITerminal CLICheck spend, browse logs, and manage keys from the command line. Works on macOS, Linux, and Windows.pip install llmcapView on PyPI🪟DesktopWindows Tray AppSystem tray icon shows live spend. Right-click for stats and quick actions. Always visible, never intrusive.pip install "llmcap[tray]"Get Tray AppSimple pricingPick your plan3-day trial, no charge until it ends · Cancel anytimeStarter$19/moafter 3-day trial✓2 API keys✓All 5 providers✓Daily & monthly caps✓30-day audit log✓1 user✓Email supportStart 3-Day TrialCredit card required for trial. Cancel before day 3 and you won't be charged.QuestionsDoes LLMCap ever see or store my API keys?+No. Your provider API key (e.g. sk-ant-...) is passed through the proxy header on each request and immediately discarded. LLMCap only stores your LLMCap proxy key, hashed with bcrypt. We never log your provider keys.Does it work with streaming responses?+Yes — streaming is supported from day one. LLMCap passes SSE chunks through in real time. If the budget is exceeded mid-stream, the connection is closed and a final 429 event is sent. The token that triggered the cap is not charged.

§2 AI · 100%

What exactly happens when the cap is hit?+The next incoming request is rejected with HTTP 429 before it reaches the provider. The token is never consumed, so you are never billed for it. Your app receives the same 429 response structure providers use for rate limiting, so existing error handling works as-is.Can I self-host LLMCap?+Self-hosting is on the roadmap. The proxy is open source (FastAPI + Redis). For now, the managed service at proxy.llmcap.io is the recommended path — it's already deployed with <35ms latency worldwide.