---
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.

Tanso is open-source monetization infrastructure 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.

Deploy it beside your current stack or use it as the billing system. Stripe is
an optional payment adapter, not the source of truth. Tanso is self-hosted,
AGPL-3.0, and has no paid tier or per-event vendor fee.

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

## From AI request to invoice

1. **Define a plan:** configure plans, credits, prices, and credit weights.
2. **Check access:** allow, quote, or deny from the request path before AI
   work begins.
3. **Record usage:** save the model, provider, tokens, and cost on one idempotent
   event.
4. **Bill and measure:** generate the invoice and read margin from the same ledger.

## Every event knows what it cost and what it earned

Cost lands on the event, not on a provider invoice at month end. Attach a cost
rule to a feature and every metered event carries its cost next to what you
billed, so margin per customer, per feature, and per model comes from the same
ledger that bills. Attach the cost as you send the event and margin stops being
a quarter-end spreadsheet exercise.

## Model any price

- **Credits:** grants, expiry, rollover, priority drawdown, and top-ups.
- **Usage-based:** per-unit, volume, and graduated pricing.
- **Subscription plus usage:** base fees, included allowances, and overages.
- **Outcome-based:** bill the result while tracking the underlying AI cost.

## Reprice without a deploy

Change what an action costs in credits, or what a credit costs in dollars,
straight from the dashboard. No deploy. Weights and prices are versioned and
effective-dated; history is kept and past usage is never repriced. Full
walkthrough at https://tansohq.com/how-pricing-works

## One ledger, both directions

**Monetization — the AI you sell:** plans, entitlements, metering, credits,
subscriptions, invoices, and customer-level margin.

**Internal spend — the AI you buy:** Anthropic, OpenAI, Cursor, GitHub Copilot,
and LiteLLM usage pulled from vendor admin APIs, allocated to teams and
projects, capped, and reconciled to the invoice.

Feature P&L joins both halves: AI build cost, customer revenue, serving cost,
and net for the feature that shipped.

## Built for agent customers

Add an opt-in API lane beside human checkout. Customer agents can:

- read plans and prices from `pricing.json`;
- sign up and receive a customer-scoped key in one call;
- quote work and check entitlements before use;
- monitor credit burndown and buy under account spend caps.

Money-moving MCP tools require explicit confirmation.

## Open source and self-hosted

- **Tanso Core** (AGPL-3.0). The complete cost and pricing engine: plans,
  entitlements, metering, credits, billing, internal spend, and margin.
- **Credit Estimator** (MIT). Embeddable burndown and purchase-planning
  components. Works with or without Tanso Core; feed it your own usage data.
  Live demo at https://tansohq.com/credit-estimator

There is no paid tier. If you want us to run Tanso for you, managed
deployment is available (your cloud or on-prem, same AGPL build), price on
request at https://cal.com/katrina-laszlo/30-minute-meeting

## MCP server

```
claude mcp add tanso --transport http \
  --header "X-API-Key: <your-api-key>" \
  https://your-tanso-host/mcp
```

Exposed at /mcp, authenticated with your API key via the X-API-Key header.
Off by default; the operator enables it.

## Self-host the whole thing

```
git clone https://github.com/tansohq/tanso-oss.git
cd tanso-oss/deploy
cp .env.example .env     # set JWT_SECRET
docker compose up -d --build
./setup.sh               # seeds a test account, prints credentials
```

AGPL-3.0 · Stripe optional · quickstart at https://tanso.mintlify.app/quickstart

## Free tools, no signup

- [AI Pricing Finder](https://tansohq.com/ai-pricing-finder): How 96 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)
