Tokencito Game of the day Play

How much does it cost to use AI?

Using AI through an API is usually billed by tokens: you pay for what you send (input) and what the model answers (output), each with its own rate per million. A single question costs a fraction of a cent; the bill grows with volume, chat history, long answers and the model you pick.

  • 📥 Input0.1 USD
  • 📤 Output2 USD
A thousand questions at made up rates: output weighs far more

Put it to the test

A question from the app. Pick an answer.

Example rates: 1 USD/M input, 4 output. 100 tokens in, 500 out. Cost?

Play the full lesson: Costs in practice

What you pay for: input and output

Input is not just your question. It includes the instructions the app gives the model, the chat history and any document you pass along. Output is the text the model generates. Many APIs bill both separately, and output usually has a higher rate.

Rates are usually quoted in USD per million tokens and change with the provider and the model. That is why there are no real prices here: the numbers on this page are made up, to understand the math.

A step by step calculation

Made up rates: 1 USD per million input tokens and 4 USD per million output tokens. You send a 100 token question and get a 500 token answer. Input: 100 × 1 ÷ 1,000,000 = 0.0001 USD. Output: 500 × 4 ÷ 1,000,000 = 0.002 USD. Total: 0.0021 USD, not even a quarter of a cent.

Two things to notice. The answer takes more than 95% of the cost: it is longer and its rate is higher. And cheap becomes visible at scale: a thousand identical questions add up to 2.10 USD, and a million to 2,100 USD.

If you pay from a country with another currency, the rate is in dollars but your card bills you in local money. Many banks add fees or taxes on foreign payments, so your final bill can be higher than the API number.

What drives the bill up and how to spend less

History: with each message, the app usually sends the whole conversation again. If each back and forth adds about 200 tokens, by message 10 you send about 1,800 tokens of history before your new question. Long answers: each output token is the pricey one. The big model: it usually has higher rates than a small one. And language: many tokenizers use more tokens in Spanish or Portuguese than in English to say the same thing.

To spend less: ask for short answers when that is enough, start a new chat when you change topic or summarize the old one, try a small model first and keep the cheapest one that passes your tests. Some services charge less for repeated input if you use their prompt caching.

A subscription is not pay per use

If you pay a monthly plan for a chat like ChatGPT, you pay a fixed fee: you do not see a charge per message, though the plan may have usage limits. Per token billing applies when you use an API, which is what an app or a program connected to the model does. A common mistake is estimating a project's cost from the subscription price, or assuming the API is flat rate too.