What is a token?
A token is a piece of text that an AI model reads or writes. For English text, one token is roughly 3–4 characters. Indonesian text and program code usually take more tokens per word, so exact numbers should always come from the usage log rather than guesses.
Input tokens and output tokens
- Input: everything you send to the model, including the prompt, system instructions, conversation history and file contents.
- Output: the answer the model writes. Output is usually several times more expensive than input.
The formula
Cost per call = (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price)
An example with round numbers (not real prices): input Rp 20,000 and output Rp 100,000 per 1 million tokens. One chat with 2,000 input tokens and 500 output tokens:
| Part | Calculation | Cost |
|---|---|---|
| Input | 2,000 ÷ 1,000,000 × Rp 20,000 | Rp 40 |
| Output | 500 ÷ 1,000,000 × Rp 100,000 | Rp 50 |
| Total per chat | Rp 90 | |
| 1,000 such chats | Rp 90,000 |
Real prices now
Estimate per chat with 2,000 input and 500 output tokens, from the prices on the models page.
| Model | Per chat | 1,000 chats |
|---|---|---|
| GEM 3.8 Flash | Rp 4 | Rp 4,434 |
| TT-6 Luna | Rp 11 | Rp 10,642 |
| TT-6.1 Terra | Rp 7 | Rp 7,263 |
| HK-5.5 | Rp 3 | Rp 3,487 |
| GEM 4 Argon | Rp 85 | Rp 84,649 |
| TT-6.1 Sol | Rp 15 | Rp 14,526 |
Why do long conversations cost more?
AI models do not remember conversations. Every new message is sent together with the whole history, and all of it counts as input tokens. The 20th message in a conversation can carry tens of thousands of input tokens even if the question itself is short.
Keeping the bill low
- Match the model to the task: small models for summaries and classification, large models for reasoning and hard code.
- Limit the history you send, or start a new conversation when the topic changes.
- Set
max_tokensso answers are no longer than needed. - Check Usage in the console to see tokens and cost for each call.