---
title: Tanso — billing and margin for AI products
description: Define plans and credits, check access before each AI request, and bill usage. Tanso records provider cost and customer revenue together, so you can see margin by customer, feature, and model.
date: 2026-08-28
---

# Bill AI usage. Know your margin.

Stripe shows revenue. Your model provider shows cost. Nothing connects them
per customer.

Tanso is open-source billing for B2B AI products. Define plans and credits,
check access before each request, and bill usage. Tanso records provider cost
and customer revenue together, so you can see margin by customer, feature,
and model.

Run it locally:

```
git clone https://github.com/tansohq/tanso-oss.git
cd tanso-oss/deploy
cp .env.example .env
docker compose up -d --build
./setup.sh
```

Then open the console URL setup.sh prints. Source at
https://github.com/tansohq/tanso-oss, quickstart at
https://tanso.mintlify.app/quickstart

AGPL-3.0 · self-hosted · Stripe optional · no per-event fee

Verify us directly: `curl https://tansohq.com/pricing.json` returns $0 with
the license, install command, and quickstart URL in machine-readable form.

## Billing tools don't know your costs. Cost tools don't bill.

Tanso records both on the same event, so two customers on the same plan with
opposite margins stop looking identical.

## From AI request to invoice, in four steps

Tanso checks what a customer can use before work runs, then records usage,
cost, revenue, and credit balance in one ledger.

1. **Define a plan:** configure what customers get and what they pay.
2. **Check access:** allow, quote, or deny before AI work begins.
3. **Record usage:** record the model, tokens, and cost on one event.
4. **Bill and measure:** bill the customer and read margin from the same ledger.

## See margin by customer, feature, and model

Each usage event records what the AI cost you and what the customer paid.
Tanso rolls those events up automatically, so you do not have to rebuild
margin in a spreadsheet.

- Idempotent usage events with cost attached
- Margin per customer, feature, and model
- One event stream for limits, invoices, and analytics

More at https://tansohq.com/product#monetization

## Revenue on one side, your own AI bills on the other

Bring customer revenue and vendor spend into one ledger, then see the full
economics of each AI feature.

**AI you sell:** plans, entitlements, metering, credits, subscriptions, and
invoices for the AI your customers use. Runtime entitlement checks, credits
and usage billing, customer-level margin.
https://tansohq.com/product#monetization

**AI your team buys:** Anthropic, OpenAI, Cursor, Copilot, and LiteLLM usage
pulled from their admin APIs and reconciled to the invoice. Vendor-native
usage reports, team and project allocation, budgets and invoice
reconciliation. https://tansohq.com/product/internal-spend

Feature P&L puts build cost, serving cost, and revenue for one feature in one
row.

## Use the pricing model your customers expect

Sell credits, usage, subscriptions with overages, or outcomes. Keep the
customer price separate from the provider cost.

- **Credits:** grants, expiry, rollover, top-ups.
- **Usage-based:** per unit, volume, graduated.
- **Subscription + usage:** base fee, allowance, overage.
- **Outcome-based:** bill the result, retain cost detail.

### Change credit costs and credit prices from the dashboard. No deploy.

Weights map usage to credits. The price book maps credits to money. Both are
effective-dated, and past usage is never repriced. Full walkthrough at
https://tansohq.com/how-pricing-works

## Also in the box

- **API for agents:** machine-readable pricing, one-call signup, and spend
  caps for customer agents. https://tansohq.com/product#agent-serve
- **MCP server:** operate Tanso from Claude or Cursor. Off by default.
  https://tansohq.com/product#mcp
- **Gateway enforcement:** Block budgets pushed to LiteLLM.
  https://tansohq.com/product/internal-spend#gateway

## FAQ

See https://tansohq.com/faq

## Run it yourself

```
git clone https://github.com/tansohq/tanso-oss.git
cd tanso-oss/deploy
cp .env.example .env
docker compose up -d --build
./setup.sh
```

## Have us run it

Same AGPL build, deployed in your cloud or on-prem, upgrades and backups
handled. Talk to the founders at
https://cal.com/katrina-laszlo/30-minute-meeting

## Free tools, no signup

- [AI Pricing Finder](https://tansohq.com/ai-pricing-finder): How 97 AI
  companies price, filterable side by side.
- [Margin Analyzer](https://tansohq.com/margin-analyzer): Find which
  customers are profitable. CSV processed in your browser.

## Links

- [Source (AGPL-3.0)](https://github.com/tansohq/tanso-oss)
- [Documentation](https://tanso.mintlify.app)
- [Pricing](https://tansohq.com/pricing)
- [How pricing works](https://tansohq.com/how-pricing-works)
- [Compare](https://tansohq.com/compare)
- [FAQ](https://tansohq.com/faq)
- [Agent guide](https://tansohq.com/AGENTS.md)
- [LLM context](https://tansohq.com/llms.txt)
- [Book a demo](https://cal.com/katrina-laszlo/30-minute-meeting)
