The cost formula

A chatbot’s monthly cost is the cost of one message multiplied by how many messages you handle. The inputs are active users, messages per user, and the tokens in a typical turn: the system prompt, the conversation history sent with it, the new user message, and the reply.

What drives the number

Two things grow cost faster than expected. First, conversation history is resent and billed as input on every turn, so later messages in a long conversation cost more than early ones. Second, a large system prompt is billed on every call. Both make input tokens the dominant cost for most chatbots.

How to lower chatbot cost

Trim the system prompt, cache its stable prefix where the provider supports it, and summarize older history rather than resending it in full. For routine turns, a cheaper model often does well enough. Model your own numbers on the AI chatbot cost calculator.