How much does it cost to run an AI chatbot? Cost per message for 12 models
By VibeBoot ·
Short on time? The AI Chatbot Starter already has this wired up: $59 one-time, 14-day money-back guarantee.
Before you pick a Free plan cap or a Pro price for an AI chat app, you need one number: what a single message costs you at your model provider. Everything else, from your free-tier budget to your Pro margin, is that number multiplied by usage. This post works it out for 12 popular models using each vendor's official list prices (checked Oct 17, 2026), then shows the two mistakes that make chatbot bills bigger than founders expect.
If you'd rather plug in your own numbers, our free AI chatbot cost & pricing calculator does all of this math live and exports a plans.ts file.
The formula
Model APIs bill per token, with separate prices for input (what you send) and output (what the model writes back). Prices are quoted per 1 million tokens.
cost per message =
( input tokens × input price
+ output tokens × output price )
÷ 1,000,000The catch is the input side. A chat app doesn't just send the user's latest message. It sends your system prompt, plus the earlier conversation, every single turn. So "input tokens per message" is usually several times bigger than what the user typed.
Cost per message for 12 models
For the table below we assume a typical mid-conversation message: 1,500 input tokens (system prompt, some history, the new question) and 400 output tokens (a reply of roughly 300 words). These are example assumptions, not measurements from any specific app; your numbers will differ, which is why the calculator exists.
| Model | Vendor | $ / 1M in | $ / 1M out | Per message | Per 1,000 messages |
|---|---|---|---|---|---|
| gpt-6-luna | OpenAI | $0.10 | $0.50 | $0.00035 | $0.35 |
| Claude Haiku 5.5 | Anthropic | $0.10 | $0.50 | $0.00035 | $0.35 |
| deepseek-flash | DeepSeek | $0.30 | $1.20 | $0.00093 | $0.93 |
| gemini-3.5-flash-lite | $0.30 | $2.50 | $0.00145 | $1.45 | |
| gemini-3.8-flash | $0.75 | $3.75 | $0.00263 | $2.63 | |
| deepseek-v4-pro | DeepSeek | $1.32 | $3.96 | $0.00356 | $3.56 |
| grok-4.7 | xAI | $2 | $6 | $0.0054 | $5.40 |
| gpt-6.1-sol | OpenAI | $2 | $10 | $0.007 | $7.00 |
| Claude Sonnet 5.5 | Anthropic | $2 | $10 | $0.007 | $7.00 |
| gemini-4-argon | $2 | $10 | $0.007 | $7.00 | |
| Claude Opus 5.5 | Anthropic | $4 | $20 | $0.014 | $14.00 |
| gpt-6-astra | OpenAI | $10 | $50 | $0.035 | $35.00 |
Prices are standard, uncached, short-context list rates. A few come with conditions worth knowing: Google lists higher prices for gemini-4-argon from Dec 1, 2026 and for gemini-3.8-flash from Jan 1, 2027; DeepSeek's rates shown are peak-hour (off-peak is half); and several vendors charge more above a long-context threshold. The calculator links every vendor's pricing page.
The spread is the headline: the most expensive model here costs 100 times more per message than the cheapest. Model choice matters more than any other decision you make about cost.
What that means for a Free plan
Say 1,000 free users each send 30 messages a month. That's 30,000 messages:
- On a small model like Claude Haiku 5.5 or gpt-6-luna: about $10.50 a month.
- On a mid model like Claude Sonnet 5.5 or gpt-6.1-sol: about $210 a month.
- On gpt-6-astra: about $1,050 a month, for users who pay you nothing.
That's why many chat apps run the free tier on a small model and save the bigger model for paying users. And it's why the free cap has to be enforced on the server: a free plan without a hard limit is an open invitation to run up your bill. Our guide to Free vs Pro usage limits in Next.js shows how to enforce it properly.
What that means for a Pro plan
Price Pro for the user who hits the cap, not the average user. Example: Pro at $12/month with a cap of 500 messages/month.
- Stripe's standard US card fee on $12 is 2.9% + 30¢, about $0.65.
- On Claude Sonnet 5.5, a user who sends all 500 messages costs you $3.50. You keep about $7.85, roughly a 65% margin, even in the worst case.
- On gpt-6-astra, the same user costs $17.50. You'd lose money on every heavy user. To break even at that cap you'd need to charge about $18.33/month.
The break-even rule: (worst-case model cost + $0.30) ÷ (1 − 0.029). Anything above it is margin; anything below it is a subsidy.
Mistake 1: forgetting that history gets resent
Here's how one 20-turn conversation grows on Claude Sonnet 5.5, assuming a 500-token system prompt, 100-token user messages and 400-token replies, with the full history resent every turn:
| Turn | Input tokens sent | Cost of that turn | Running total |
|---|---|---|---|
| 1 | 600 | $0.0052 | $0.0052 |
| 5 | 2,600 | $0.0092 | $0.036 |
| 10 | 5,100 | $0.0142 | $0.097 |
| 20 | 10,100 | $0.0242 | $0.294 |
By turn 20, each reply costs almost 5 times what the first one did. If you only send the last 12 messages (6 turns) as context, the same 20-turn conversation drops from $0.294 to about $0.203, roughly 31% cheaper, and most users never notice. Cap the context window in code, the same place you cap messages.
Mistake 2: pricing on averages
Most users send far fewer messages than the cap, so average cost looks tiny. But your margin is decided by the heaviest users, and a single script hitting your API can look like your heaviest user times a hundred. Plan for "every Pro user maxes out the cap" and "every free user maxes out the free cap." If the numbers still work, you're safe.
Three ways to cut the bill
- Use a small model for the free tier. Within one vendor the gap can be huge: in the table above, Claude Haiku 5.5 is 20 times cheaper per message than Claude Sonnet 5.5.
- Limit context, not just messages. Send a fixed number of recent messages, and cap characters per message so nobody pastes a novel.
- Check for cached-input discounts. Many vendors discount repeated input like a fixed system prompt. Rates vary, so check your vendor's pricing page before counting on it.
Run your own numbers
Every app is different: a support bot with a long system prompt, a coding assistant with big replies, a companion app with long conversations. Put your model, token counts, users and Pro price into the AI chatbot cost & pricing calculator. It shows cost per message, free-tier cost, Pro margin after Stripe fees at the cap, a break-even price and a suggested free cap for your budget, then exports a plans.ts you can drop into your app.