How do you calculate the cost of LLM API calls?
Every API call to Claude, GPT, Gemini or DeepSeek is billed by tokens. One token corresponds to roughly 4 characters or 0.75 words in English — in Slovenian words are longer, so there are ~20–30% more tokens. The token counter counts precisely: input tokens (prompt + context), output tokens (response) and the total cost for the chosen model.
The calculator is especially useful for comparing models: Claude Haiku suits high-frequency tasks at low cost, while Claude Opus suits complex, high-value analysis. For an application with 10,000 calls a day the cost difference between models can be a thousandfold — comparing them on your actual text shows the real picture.
Frequently asked questions
Is Slovenian text tokenised differently?
Yes. Diacritics (č, š, ž) and long Slavic words often take 2–3 tokens instead of one. For Slovenian text, count on 20–30% more tokens than for English text of the same length.
What is the context window?
The maximum number of tokens a model sees at once. The latest Claude models have a context window of 200,000+ tokens — at least ~150,000 words or 500 pages of text. Longer context is usually more expensive.
How do I optimise API costs?
Shorten the system prompt, implement prompt caching (Claude supports it), choose a smaller model for simple tasks and set an output token limit where possible.
Does the calculator support batch processing?
The calculator estimates a single call. For a batch estimate (e.g. 10,000 documents), multiply the average tokens per document by the batch price — most models offer a 50% discount for asynchronous batch calls.