Traditional software has near-zero marginal cost: one more user barely changes your bill. AI products are different. Every request calls a model, and every model call costs money. Price an AI product like classic SaaS and your heaviest users can turn your best customers into your biggest losses.
Step 1: Know your cost per request
Model APIs typically bill per token — roughly a word fragment — with separate rates for input and output. Your real input includes far more than the user's message: the system prompt, conversation history, retrieved documents and tool results are all sent with every call. Measure actual token counts from logs rather than estimating from the visible text.
Step 2: Look at the distribution, not the average
AI usage is usually heavily skewed: a small share of users generates a large share of requests. Plot cost per user per month and look at the 90th and 99th percentiles. Your pricing must survive those users, not just the median one.
Step 3: Set a gross-margin target
Buyers and investors judge software businesses on gross margin. Many AI companies aim for 60–80% after model costs. Work backwards: if the 90th-percentile user costs $6 a month in API fees and you target 75% margin, that user's plan needs to be at least $24.
Step 4: Pick a pricing model
- Flat seat price with a fair-use cap. Simple for buyers. Add a soft limit and an overage or upgrade path for power users.
- Tiered plans by usage. Starter, Pro and Business tiers with increasing request or credit allowances.
- Credits. Users prepay for credits that map to your costs. Transparent and margin-safe, but adds friction.
- Usage-based (metered). Pay per request, per document or per minute. Fits APIs and developer tools.
- Outcome-based. Charge per resolved ticket, qualified lead or completed task. Captures value directly and is increasingly popular for AI agents.
Step 5: Engineer the cost down
- Route by difficulty: send simple tasks to a smaller, cheaper model.
- Cache: reuse long, repeated prompts; many providers discount cached input heavily.
- Trim context: summarise long histories instead of resending them.
- Cap output length: output tokens are typically the most expensive.
- Batch: non-urgent jobs can often run at a discount.
Worked example
An AI writing tool averages 1,500 input and 500 output tokens per request. At example mid-tier rates of $3 and $15 per million tokens, each request costs about $0.012. With 5,000 requests a day across 400 paying users, monthly API spend is roughly $1,820, or about $4.56 per user (before any caching discount). At an 80% margin target the plan needs to be about $23 — so a $24 or $29 plan works, a $9 plan doesn't. Plug your own numbers into the calculator to check.
Rule of thumb: cost sets your floor, value sets your ceiling, and usage limits protect the space between them.
🤖 Try it: AI API Cost & Pricing Calculator
Estimate LLM token costs per request, per user and per month — then get a price that protects your margin.
Open the calculator →This guide is educational and general in nature. It is not financial, tax or legal advice. Figures cited are illustrative; verify against your own data.