Add the customer, feature and workflow to each AI call with the Python SDK or REST API. Calls still go straight to your provider, and prompts are never sent.
Two lines of setup · No proxyAI metering, pricing and margins for AI-powered products
Price your AI product so every customer makes you money.
Your happiest customers may be your least profitable. Ganivra meters every AI call and shows AI cost and margin per customer, so you know who loses you money before the invoice arrives.
- For AI-native and AI-powered products
- Works with OpenAI, Claude, Gemini, open models and Stripe
- Subscriptions, credits and one-time payments
- No proxy, no prompts stored
No credit card · Python SDK or REST API from any language · From $29/month after the trial
Built for how AI products run
Every call priced. Every credit accounted for.
Credit-based pricing
Sell credits? See what each one costs to deliver.
Ganivra counts every credit at the price your customer paid for it, from a plan, pack or top-up, and puts the AI cost next to it.
New OpenTelemetry · No SDK
Claude Code and Copilot spend, by developer.
Already exporting OpenTelemetry? Point it at Ganivra. Model calls arrive priced, by developer, team and session.
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.ganivra.com/v1/otlp
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer gv_…Set it up in minutes Model comparison
Is your model costing more than it should?
Reprice the calls you already made on GPT, Claude and Gemini, and see what to test before you switch.
Supported models
Your models are already priced.
Cached, batch and long-context rates applied automatically, including open models on Together AI, Fireworks, DeepInfra and Baseten.
Free carbon calculator
How much CO₂ do your AI calls produce?
Per call, per task and per month for ChatGPT, Claude and Gemini. No signup.
Running your own models?
Self-hosted models get a cost per call too.
DeepSeek, Qwen or GLM on vLLM? Ganivra splits your GPU bill across the calls that used it, so self-hosted traffic shows up in customer margins next to your API spend.
See how GPU metering works- Split by measured GPU time from vLLM's traces, or by tokens.
- Idle cost and utilization from NVIDIA's GPU metrics, hour by hour.
- Own GPUs or API: which features would cost less on your GPUs, and whether new GPUs pay off.
A story you may recognize
Your favorite customer is losing you money.
In March, a team signed up for your $50 plan. They loved it, invited their colleagues and put it into every workflow.
By September their agent was running 40 steps on tasks that used to take 5. They were the happiest customer you had, and they cost you $80 a month to serve.
Nobody noticed. The invoice says what you spent, not who you spent it on.
One customer like that costs you $360 a year. Ten of them is $3,600 you’re giving away, before anyone checks.
Illustrative storySize it for your product
$3,600 a year you’re not charging for, across 10 heavy customers.
Your guesses, not your data. See where your own pricing loses money
How it works
How Ganivra calculates AI cost and margin per customer.
Ganivra prices each call at the model’s rate for input, cached and output tokens, from a catalog of 165 models, or at your negotiated rate.
See supported modelsAdd what customers pay from Stripe or your billing system. Ganivra shows margin after AI cost by customer and plan, alerts you when one drops below target, and shows what to reprice or which model to change.
Subscriptions, credits and one-time paymentsHow you make more money
Charge right, serve for less, and grow without losses.
See which plans and heavy accounts are priced below what they cost, and how much more usage each plan can absorb before it breaks your margin target.
Customer economics · Pricing headroomFind the agents, retries and model choices driving cost, and see what the same calls would have cost on GPT, Claude or Gemini.
Cost breakdowns · Model comparisonSee which customers will end the month below target before the invoice arrives, and grow ARR with margin numbers built the same way every month.
Margin outlook · Board updateWhy margins slip
Your AI bill grew 3× this year. Did your revenue?
The invoice doesn’t say who caused it.
Providers bill by model and month. You need cost by customer, feature and contract, so someone rebuilds that join in a spreadsheet, usually the night before a board meeting.
Cost moves while price stays fixed.
Longer conversations, agent loops, retries and new tools raise what each customer costs to serve. Their plan or contract price doesn’t change.
Usage, invoices and revenue live in three places.
Traces sit in your observability tool, invoices in someone’s inbox, revenue in Stripe or a contract. Margin by customer only exists after someone stitches them together, and it’s stale by the time it’s done.
Where Ganivra fits
Every AI dollar you spend is tracked. Nobody checks it against what each customer pays.
- RunModel providersOpenAIAnthropicGeminiWhat you spend
- WatchObservabilityLangfuseHeliconeDatadogWhat ran
- MarginThe gapSpreadsheetsGut feelGanivraWho costs more than they pay
- BillBillingStripeChargebeeOrbWhat you charge
- ReportFinanceQuickBooksXeroBoard deckWhat you report
Ganivra sits between these tools. It doesn’t replace your observability or billing, and it doesn’t charge your customers.
From the margin to the call behind it
When a number looks wrong, follow it down.
Engineering tags calls with customer, feature and workflow, and gives the steps of one request a shared execution ID. Ganivra joins them, so the founder sees the total and Engineering sees the cause.
How attribution works- Customer C$610recorded AI cost last month
- Research workflow$38062% of that customer’s cost
- One execution$0.212one customer request
- MCP search_accounts$0.002the tool call itself
- Summary + validation retry$0.170what the tool call triggered
What’s inside
AI cost, revenue and margin for every customer, in one place.
Revenue, AI cost and contribution for every customer, plan, workflow, feature and agent, with the least profitable first.
Dashboard · Customer economicsEvery model call, MCP tool call and retry behind one customer request, with what each step cost.
ExecutionsA month-end projection for each customer against your margin target, with the day they’re expected to cross it.
Margin outlookDefine plans as subscription, per execution, per token, credits or hybrid, or import confirmed payments. Revenue is calculated per execution.
Settings · Customer pricingVersioned model prices, your own contract rates that reprice history, unpriced usage flagged, and provider invoices reconciled.
Contract rates · ReconciliationCustomer margin review with saved evidence, a monthly AI spend close with sign-off, and a board update built the same way each month.
Margin review · Spend close · Board updateEvery day, not once a quarter
What Ganivra watches for you.
A customer, plan or workflow costs more than it earns, or drops below your margin target.
Loss and margin-target alertsMargin falls against last period after a model swap, a new agent step or a change in usage.
Margin erosion alerts · What changed costSpend by customer, workflow, model or provider crosses a warning or critical threshold, with a named owner.
Budgets with owners and thresholdsFor your engineering team
Two lines to start. One wrapper to see margins.
import ganivra
ganivra.init(api_key="your_key")
with ganivra.trace(customer_id=account.id, feature="research"):- No proxy. Calls go straight to your provider.
- Fail-open. If Ganivra is unreachable, your app keeps working.
- Metadata only. No prompts or responses stored; prompt IDs and versions are labels you supply.
- Works with how you bill today. Ganivra calculates revenue from your plans (subscription, per execution, per token, credits or hybrid) or imports confirmed payments. Stripe and your invoices keep charging customers.
- Beyond model calls. Send or import telephony, speech, OCR and retrieval costs, so a call or document carries its full recorded cost.
- Coverage. The Python SDK captures OpenAI Responses, OpenAI-compatible Chat Completions (including Together AI, Fireworks, DeepInfra and Baseten) and Claude Messages automatically. Gemini, Perplexity, MCP tools and non-Python services use the explicit client or REST. 165 models are priced automatically.
Not ready to connect anything? · About a minute
Get a free review of your pricing strategy.
Enter your website. We’ll show where your plans and usage allowances could win more customers, move them to bigger plans, and where they cost you money as usage grows.
What the numbers include
- Costs come from instrumented calls and imported bills. Usage without a known price stays visible as unpriced, never zero.
- Provider invoices are compared with usage, not added to it.
- Revenue can be reported, calculated from a pricing plan, or allocated. Missing revenue stays visible.
- Contribution is revenue minus included costs. It is not net profit or full gross margin.
- Telephony, OCR, retrieval and compute count only when instrumented or imported.
- Figures on this page are illustrative.
Frequently asked questions
What teams ask before getting started.
Straight answers about workflows, data and getting started.
01What is Ganivra?
Ganivra shows how much each of your customers costs you in AI, and whether they pay you more than that. It works for any product that runs on AI. It doesn't sit in front of your AI calls, store your prompts or bill your customers.
02How do I calculate AI cost per customer?
Add up the cost of every AI call made for that customer. Each call's cost is its tokens times the model's price. Ganivra does this for you: send the customer ID with each call, and Ganivra prices it using 165 models from OpenAI, Anthropic, Google, Perplexity and open-model providers.
03What is margin after AI cost?
It is what a customer paid you minus what their AI usage cost you. If a customer pays $50 a month and uses $80 of AI, you lose $30 on them. Ganivra calls this contribution. It is not your full profit, because hosting, support and other costs count only if you add them.
04How does Ganivra know what each customer pays?
You send it confirmed purchases, subscriptions, credit purchases and refunds from Stripe or your billing system, or you set up your pricing plans in Ganivra. A monthly subscription is spread across that month's usage. A credit pack counts as credits are used.
05Does Ganivra track credits?
Yes. Send the number of credits each action uses, and Ganivra counts them as revenue at the price the customer paid. Credits come from a plan's monthly allowance first, then from credit packs and top-ups, oldest first. You see what each credit earns and what it costs you in AI. Your app keeps the credit balance; Ganivra doesn't block usage.
06Does Ganivra proxy our AI traffic or store prompts?
No. Your AI calls go straight to your provider. Ganivra only receives details about each call afterwards, such as the model, token counts and customer. Prompt-level economics use customer-supplied prompt IDs and version labels. If Ganivra is down, your app keeps working.
07Does Ganivra replace our billing or accounting software?
No. Stripe or your billing system keeps charging your customers. Ganivra doesn't send invoices, take payments or post to your ledger. It reads what customers paid so it can compare that with what they cost.
08Can Ganivra stop a customer from going over budget?
No, Ganivra alerts you but does not block requests. You can set budgets by customer, workflow, model or provider, and the right person gets an alert when one is crossed. Blocking requests has to happen in your app, because Ganivra is not in the path of your AI calls.
09Which AI providers and models does Ganivra support?
Ganivra prices 165 models automatically from OpenAI, Anthropic, Google Gemini, Perplexity, Sarvam, Together AI, Fireworks, DeepInfra and Baseten. The Python SDK 0.6.3 records OpenAI and Claude calls on its own, including Claude Messages sync, async, and streaming. Other languages use the REST API. If a model has no price yet, its calls show as unpriced, never as free.
10Can Ganivra price self-hosted models on our own GPUs?
Yes. Add your GPUs and their hourly price, and Ganivra splits each day's GPU bill across the self-hosted calls that used it, by measured GPU time from vLLM's traces or by tokens. You also see idle cost, utilization and which API features would cost less on your GPUs. See the self-hosted LLM cost page for how it works.
11How is Ganivra different from LLM observability tools?
Observability tools show what ran: traces, speed and errors. Ganivra shows whether it made money: what each customer cost compared with what they paid. Many teams use both.
12How is Ganivra different from AI billing platforms?
AI billing platforms send invoices to your customers, so you have to move your billing onto them. Ganivra works with the billing you already have. It shows which customers and plans lose money without changing how you charge.
13Why track the cost of MCP tool calls?
Because one cheap tool call can trigger many expensive ones. A tool call might cost almost nothing, then cause extra model calls, searches and retries. Ganivra groups all the steps of one request, so you see the full cost each tool caused.
14How do I get started?
Start a free 14-day trial; no credit card needed. Add two lines of the Python SDK, tag one workflow with a customer ID, and send your payments or pricing plan. You'll see your first customer margins from real usage. Add provider invoices later if you want to run an AI spend close. Plans start at $29 a month.
Learn how to measure consumption in our AI metering guide, then compare token, credit, and outcome-based billing.
Start with one workflow
Find the margin you’re leaving on the table.
Add the SDK, wrap one real workflow with a customer and feature, and connect plan, contract or usage pricing. Your first margin view comes from real traffic, not estimates. Full 14-day trial, no credit card, no sales call.
import ganivra
ganivra.init(api_key="your_key")From first call to customer margin
Not ready? Reconcile an OpenAI invoice free · Sign in