Marginal
See which customers and features drive your AI API costs
Working when we checked on .
What is Marginal?
Marginal is a cost observability tool that tracks the cost of every LLM API call and slices spend by any registered field such as customer, feature, or model. It is aimed at engineering teams running AI features in production who need to understand why their AI bill is high. Integration requires a single track() call per LLM request via a zero-dependency TypeScript or Python SDK, or a plain HTTP POST. Cost is computed server-side against a daily-synced model price catalog, with an Explorer dashboard that charts every dimension automatically and logs the outcome of each event.
Marginal pricing
Pricing model: Freemium
Free $0/mo; Starter $99/mo ($82.50/mo yearly); Pro $249/mo ($207.50/mo yearly); Advanced $449/mo ($374.17/mo yearly); Custom — contact/book a demo
Marginal pros
- One track() call per LLM request; usage in, dollars out
- Zero-dependency TypeScript and Python SDKs plus HTTP API for any language
- Daily-synced model price catalog with per-project price overrides
- Unpriced models are flagged rather than silently reported as $0
- Automatic insights charts for every model, provider, and registered field
- llms.txt provided so coding agents like Cursor can do the integration
Marginal cons
- Free plan limited to tracking $2K/month of AI spend with 30-day retention and 1 seat
- Higher tiers cap tracked spend at $10K–$50K/month; beyond that requires a custom plan
- Requires signing up for an account and API key to use
- Data retention is limited (30 days to 3 years) depending on plan
Frequently asked questions about Marginal
What does Marginal do?
Marginal tracks the cost of every LLM call and slices it by any field you define — customer, feature, or model. Costs are computed server-side from the call's usage data against a daily-synced price catalog.
Who is Marginal for?
It is built for engineering teams and companies running AI features in production who need to answer questions like why their AI bill is high, and attribute spend to specific customers, features, and models.
How do I integrate Marginal?
Install the TypeScript or Python SDK, or POST JSON to the HTTP API from any language. You make one track() call per LLM request, passing the provider, model, and the response's usage object as-is.
Do the SDKs block my application?
No. The SDKs are zero-dependency, buffered, and fire-and-forget: track() never throws and never blocks the request path. Events buffer locally, flush in batches, and retry on network failure before warning.
What happens if Marginal doesn't recognize a model?
The event still lands and is flagged as unpriced, visible in the dashboard and API response — never averaged away as a silent $0. You can set a custom price that applies at ingest.
How is cost calculated?
Marginal detects the usage shape from the provider's response and computes cost server-side against a daily-synced model price catalog. Prices are frozen at ingest, and per-project overrides are supported.
Can Marginal write the integration for me?
You can paste marginalhq.com/llms.txt into Claude Code, Cursor, or any coding assistant, and it has everything needed to wire up Marginal. Per-provider integration recipes are also available in the docs.
What does the free plan include?
The Free plan tracks up to $2K/month of AI spend, includes 30-day data retention, 1 seat, and 2 projects. It is free forever with no credit card required.
How long is data retained?
Retention depends on the plan: 30 days on Free, 1 year on Starter, and 3 years on Pro and Advanced. Custom plans offer custom data retention.
How quickly can I get started?
According to the site, you can go from zero to a live spend dashboard in five minutes: create a project, register your fields, and drop in one track() call.