Costbrake vs Langfuse
Costbrake vs Langfuse: traces or the bill?
Langfuse and Costbrake answer different questions: Langfuse records a trace of each LLM call with its prompt, output, usage and cost, while Costbrake reads what OpenAI, Anthropic and 33 other providers actually report and bill, and alerts within minutes. Langfuse Core is $29 a month and Costbrake Pro is $12 a month.
Langfuse tells engineers which prompt got expensive. Costbrake tells whoever owns the bill that spend just jumped, and gives an admin a brake. Most teams with real LLM spend want both.
Costbrake and Langfuse side by side
| Compared on | Langfuse | Costbrake |
|---|---|---|
| What it records | Traces: prompts, outputs, usage, cost and scores per call | Spend per provider, project, workspace or model |
| How it gets data | SDKs, integrations, OpenTelemetry or a gateway | Provider usage and billing APIs; no code changes |
| Where cost comes from | Sent with the trace, or inferred from model prices | The provider's usage data, then its billed dollars daily |
| Alerts | Cost and quality alerts to Slack, PagerDuty, GitHub Actions or webhooks | Spike, budget, forecast and new-charge alerts by email, Slack, Discord or webhook |
| Can it stop spend | No | Brakes on 18 providers, after an admin confirms |
| Open source | Yes, self-host with Docker | No |
| Price | Hobby free (50k units); Core $29 a month; Pro $199 a month | Free $0; Pro $12 a month; Team $39 a month |
What Langfuse does well
Langfuse is an LLM engineering tool. Its SDKs for Python and JS, 100+ integrations and OpenTelemetry support record each call as a trace, so you can see which prompt, user or feature drove cost, next to the output and its evaluation scores. It ships with prices for popular OpenAI, Anthropic and Google models and infers cost from usage when you don't send it.
It is open source and can be self-hosted with Docker, though some add-ons need a license key. Langfuse Cloud is free for 50k units a month on Hobby, where a unit is any trace, observation or score. Core is $29 a month and Pro is $199 a month, each with 100k units and then $8 per 100k. No billing API gives you this per-prompt view.
What Costbrake does that Langfuse can't
Langfuse only knows about calls you instrument. Costbrake reads the provider's own usage and billing data, so it counts every key on the account, including a script nobody traced or a key that leaked. It prices usage as it arrives and also reads the provider's billed dollars once a day, so its numbers track the invoice.
It is built to act fast on money. Pro checks every 5 minutes and alerts on an hour that runs over 3x the 7-day baseline and at least $5 above it, on budget thresholds at 50%, 80% and 100%, and on a month-end forecast. Brakes can freeze an OpenAI project, disable an Anthropic key or set an OpenRouter key's credit limit to $0, each one only after an admin clicks and confirms. It also covers your cloud bills, from AWS to Vercel. See pricing.
Why the numbers differ
Langfuse cost is token counts times a price table. When a provider changes prices, Langfuse applies new prices only to generations ingested after the update; older ones keep the cost from ingestion. Discounts, batch pricing and untraced calls can also make it drift from the invoice. That's fine for comparing prompts, but not for knowing what you owe.
Costbrake's numbers come from the provider, so they lag a little instead. OpenAI's Costs API returns daily buckets, and Anthropic says usage and cost data typically appears within 5 minutes. Costbrake can't tell you which prompt caused a spike, only that it happened and on which project, workspace or model.
Use both
Instrument your app with Langfuse for debugging and per-feature cost. Connect your provider accounts to Costbrake so a spike reaches you in minutes, with a brake one click away. When Costbrake alerts, open Langfuse to find the prompt or user behind it. For other options, see LLM cost tracking tools and AI API spend monitoring.
Questions and answers
Is Langfuse a cost tracking tool?
Partly. Langfuse is an LLM observability tool that records usage and cost on each traced call, so it shows cost by prompt, user or feature. It only sees calls you instrument, and it calculates cost from token counts and model prices rather than reading the provider's bill.
Can Langfuse stop LLM spend?
No. Langfuse alerts can watch cost and notify Slack, PagerDuty, GitHub Actions or a webhook, but they don't block requests. To stop spend, use the provider's hard limit or a brake such as freezing the OpenAI project, which Costbrake offers after an admin confirms.
Why doesn't my Langfuse cost match my OpenAI invoice?
Langfuse infers cost from usage and a model price table, so untraced calls, discounts and price changes make it drift. New prices only apply to generations ingested after the update. OpenAI's own Usage and Costs APIs, which Costbrake reads, report what OpenAI bills.
Do I need both Langfuse and Costbrake?
If you spend real money on LLMs, usually yes. Langfuse answers which prompt or feature is expensive. Costbrake answers whether spend just jumped across every key and provider, alerts in minutes, and offers a brake. They don't replace each other.
How do Langfuse and Costbrake prices compare?
Langfuse Hobby is free with 50k units a month, Core is $29 a month and Pro is $199 a month, and it can be self-hosted. Costbrake Free is $0 for 2 connections with hourly checks, Pro is $12 a month for 10 connections, and Team is $39 a month for 50, with a 14-day Pro trial and no card.
Sources
Updated