If you're building anything conversational with an AI API — a chatbot, an agent, a multi-turn assistant — there's a cost hiding in plain sight that most developers don't think about until their bill shows up.

Every AI API is stateless. The model has no memory between calls. None. Claude, GPT, Gemini — it doesn't matter which provider. The API has no idea what you said in the previous message. If you want the AI to remember that the user's name is Ravi from message 1 when you send message 5, you have to resend messages 1 through 4 every single time.

And you pay for every resend.

The math nobody talks about

Let me walk through what this actually looks like in practice.