Most solopreneurs price AI features by gut: pick a number, ship it, check the margin column a month later. It works until it doesn't. The cleaner approach is to start from what you need the economics to look like, then work backward to the model your margin can actually support.
Three inputs are all you need:
- User-facing price per unit: monthly seat, per-document fee, per-request charge
- Target gross margin: what you keep after direct costs
- Other infra costs per unit: hosting, CDN, storage; everything except the LLM call
The ceiling for your LLM spend per request:
max_llm_spend = user_price x (1 - margin_target) - other_infra_costs
Divide that ceiling by your request volume to get a per-call budget. Hidden cost categories (thinking tokens, JSON retry loops, prompt bloat) can add 10–30% on top of the base model cost, so leave headroom for them when you set the number.
Example 1: SaaS chat assistant ($29/month, 1,000 messages)
You're charging $29/month. Power users send about 1,000 messages per month. Target gross margin: 35%. Server costs: $3 per active user per month.
max_llm_spend = $29 x 0.65 - $3 = $15.85/month
per-message budget = $15.85 / 1,000 = $0.016
A typical message: 800 input tokens (system prompt plus conversation history) and 600 output tokens.
| Model | Per message | Monthly (1,000 msgs) | Fits budget? |
|---|---|---|---|
| Claude Haiku 4.5 ($1/$5 per MTok) | $0.0038 | $3.80 | Yes |
| Claude Sonnet 4.6 ($3/$15 per MTok) | $0.0114 | $11.40 | Yes |
| Claude Opus 4.8 ($5/$25 per MTok) | $0.0190 | $19.00 | No ($3.15 over) |
| GPT-5.5 ($5/$30 per MTok) | $0.0230 | $23.00 | No ($7.15 over) |
Haiku lands at $3.80 and leaves nearly $12 of headroom. Sonnet clears at $11.40 and uses 72% of the budget. Opus and GPT-5.5 are structurally incompatible with this pricing: they'd require a higher subscription price or a lower message cap to stay green.
One thing to watch: if a user occasionally sends a 3,000-token message (long documents, dense context), the per-message cost for Sonnet nearly triples on that call. Budget against the distribution, not the average.
Example 2: AI writing tool ($9/seat/month, 200 drafts)
A lightweight writing tool. $9/seat. Active users produce 200 marketing drafts per month (product descriptions, email copy, social posts). Target margin: 50%. Infra: $1 per seat per month.
max_llm_spend = $9 x 0.50 - $1 = $3.50/month
per-draft budget = $3.50 / 200 = $0.0175
Writing tools almost always have a substantial system prompt: style guides, brand voice, tone constraints. Assume a 2,000-token system prompt, a 300-token user brief, and 1,000 output tokens per draft.
| Model | Per draft (uncached) | Monthly (200 drafts) | Fits budget? |
|---|---|---|---|
| Claude Haiku 4.5 | $0.0073 | $1.46 | Yes |
| Claude Sonnet 4.6 | $0.0219 | $4.38 | No ($0.88 over) |
Without caching, Sonnet doesn't work. The 2,000-token style guide is billed on every single draft.
Add prompt caching at a 90% hit rate. The 2,000-token prefix qualifies and costs $0.30 per million tokens to read versus $3 uncached, a 90% discount. The break-even is roughly 1.3 requests, so any active user blows past it in the first few drafts.
With caching on Sonnet 4.6:
- 20 cache writes: 2,000 tokens x $3.75/MTok x 20 = $0.15
- 180 cache reads: 2,000 tokens x $0.30/MTok x 180 = $0.11
- 200 user briefs (uncached): 300 tokens x $3/MTok x 200 = $0.18
- 200 outputs: 1,000 tokens x $15/MTok x 200 = $3.00
- Monthly total: $3.44
Just under the $3.50 budget. Haiku stays at $1.46 and is the safer pick for any user who might hit 220 drafts in a busy month. But if you need Sonnet's output quality, the fix is a single cache_control block on the system prompt, not a price increase.
Example 3: Document extraction API ($0.05/page)
You're selling a B2B document extraction API at $0.05 per page. Target margin: 60%. Infra: $0.003 per page (storage, parsing pipeline, egress).
max_llm_spend = $0.05 x 0.40 - $0.003 = $0.017 per page
A dense document page: 3,000 input tokens and 400 output tokens (extracted JSON).
| Model | Per page | Per 1,000 pages | Fits budget? |
|---|---|---|---|
| Claude Haiku 4.5 | $0.005 | $5.00 | Yes ($12 under cap) |
| Claude Sonnet 4.6 | $0.015 | $15.00 | Yes ($2 under cap) |
| Claude Opus 4.8 | $0.025 | $25.00 | No ($8 over) |
| GPT-5.5 | $0.027 | $27.00 | No ($10 over) |
Haiku gives you the full 60% margin with $12 of headroom per 1,000 pages. Sonnet scrapes under by $2 per 1,000 pages, which is fine on average but leaves no buffer if a document runs 4,000 tokens instead of 3,000.
One way to handle variable document length: tiered pricing. Charge $0.03/page for standard documents under 3,000 tokens and $0.08/page for complex documents above that threshold. The margin math on the complex tier opens up Sonnet or Opus without distorting the pricing for simple cases.
Subscription vs API
A point worth making explicit: subscriptions don't power your app's users. Claude Pro ($20/month) and ChatGPT Plus ($20/month) give you, the developer, personal access via claude.ai, Claude Code, or the ChatGPT interface. Your app's users each consume API tokens drawn from your LLMTest or direct-provider balance. The two budgets don't overlap.
Where subscriptions do matter for solopreneurs:
As a developer tool: Claude Pro ($20/mo) covers claude.ai access and Claude Code for your own coding. Claude Max ($100/mo or $200/mo) is for heavy Claude Code users. The break-even versus API-direct depends on how many agentic sessions you run each month. Max 5x ($100/mo) includes roughly 225 Sonnet-class messages per five-hour window, which at Sonnet 4.6 API rates would cost around $13 per window. If you're hitting that ceiling consistently, Max pays off.
For OpenAI: ChatGPT Plus ($20/mo) and Pro ($200/mo) cover personal access to GPT-5.5 and o3. GitHub Copilot ($10–19/mo) and Cursor Pro ($20/mo) sit on top of provider models for IDE use. None of these flow through to your product's users.
The short version: price your feature using API rates. Your personal subscription is a separate line item for your own dev workflow.
Before you set the price
Two steps that pay off before you lock in a number:
Count tokens with your actual prompts. Every example above uses estimated token counts. A system prompt that runs 4,000 tokens instead of 2,000 can flip a "fits" to a "doesn't fit" and force a model change. Use the Anthropic tokenizer or OpenAI's tiktoken library on your real inputs before finalizing the math.
Track per-call costs in production, not just the average. The LLMTest proxy logs cost and latency per request, which makes it straightforward to find the tail of expensive calls that a simple average hides. Once you know your 95th-percentile call cost, you know whether the margin holds on a bad day, not just a typical one.
To run your actual prompts through these models and see per-request costs before you commit to one, start with LLMTest.