DEV Community

Translating 1M tokens into Russian on GPT-5.6 costs $16.88, not the $2 you estimated

Say you want to translate your app's documentation into Russian with an LLM. You count the tokens in the docs, say a million, look up the price, $2 per million on GPT-5.6, and budget $2. Then the bill comes in at about $17.

Nothing went wrong. The estimate only counted the cheaper half of the work.

A few words first

A token is a chunk of text the model reads as one piece; APIs bill per million of them. Input tokens are what you send, and output tokens are what the model writes back. Output usually costs five or six times more per token than input.

A tokenizer is the program that splits text into tokens; I used tiktoken with o200k_base, the encoding of the GPT-5.x models. A parallel text is the same content written in two languages, sentence by sentence.

Translation is the task where output equals the document

In most LLM tasks the answer is much shorter than the prompt. A summary of a 10-page report is a paragraph, and a classifier answers with one word.

Translation is different: the model has to write the entire document again, in another language. So the output is roughly as long as the input, and every one of those tokens is billed at the higher price.

To get real numbers I needed a real parallel text. The catalog of the LLM gateway I work on has a short description of each of its 50 chat models, written separately in English and in Russian. That's 608 English words and 620 Russian words of normal product text.

In o200k_base, the English side is 1,105 tokens and the Russian side 1,366, so the same meaning takes 1.24x more tokens in Russian. Translating English to Russian means sending 1,129 tokens (the text plus a 24-token instruction) and receiving 1,366.

Scaled to a million English source tokens, with official list prices:

Model Input / output $ per 1M Naive estimate Real bill Multiplier Output share
gpt-5.6 2 / 12 $2.00 $16.88 8.44x 88%
gpt-5.6-mini 0.20 / 1.20 $0.20 $1.69 8.44x 88%
claude-sonnet-5.5 2 / 10 $2.00 $14.41 7.20x 86%
gemini-3.8-flash 0.75 / 3.75 $0.75 $5.40 7.20x 86%
grok-4.7 2 / 6 $2.00 $9.46 4.73x 78%

The naive estimate is wrong by 5x to 8x, and how wrong depends on one number: how much more the model charges for writing than for reading. GPT-5.6 and its mini version charge 6x for output, the Claude and Gemini models here 5x, Grok 4.7 only 3x. Grok and GPT-5.6 have the same input price, but the real bill differs by 1.8x.

The formula behind it

The multiplier doesn't need a spreadsheet. It's one plus the ratio of output tokens to input tokens, times the ratio of output price to input price:

def translation_cost(source_tokens, in_price, out_price, length_ratio):
    """Prices in $ per 1M tokens; length_ratio = target tokens / source tokens."""
    output_tokens = source_tokens * length_ratio
    return (source_tokens * in_price + output_tokens * out_price) / 1e6

# English -> Russian on gpt-5.6: 1 + 1.24 * 6 = 8.44x the naive estimate
print(translation_cost(1_000_000, 2.00, 12.00, 1.24)) # 16.88

The length_ratio depends on the language pair and the tokenizer. For this text it was 1.24 into Russian. In the other direction it's 0.81, because English is shorter: Russian to English on GPT-5.6 comes out at $11.74 per million source tokens, 5.87x the naive estimate and 83% output. The same documents cost 44% more to translate one way than the other.

To get your own ratio, translate a few pages and count both sides with the tokenizer.

What it means for choosing and saving

Because output is 80-90% of a translation bill, the output price is what you should compare between models. Check the input price last. On GPT-5.6, English to Russian, a 10% cheaper input price cuts the bill by 1.2%. A 10% cheaper output price cuts it by 8.8%, and so does 10% less output.

Less output is something you control.

  • Tell the model to return only the translation, without "Here is the translated text:" or notes at the end.
  • Don't send text that doesn't need translating, like code blocks, URLs or tables of numbers; skip them and put them back in your own code.
  • If the model does reasoning, turn it off or set it to the minimum for plain translation, because reasoning tokens are billed as output too, even though you never see them.

What this doesn't solve

This is one small text: 50 product descriptions, about 600 words per language. Documentation with code, long sentences or a lot of terminology will have a different length ratio, so measure your own before you budget.

I counted all tokens with OpenAI's tokenizer. Claude, Gemini and Grok use their own tokenizers, so their rows show the price effect only; their real token counts, and the length ratio, will be somewhat different.

I didn't measure translation quality. The cheapest row in the table isn't automatically good enough, and a model that writes a looser, shorter translation is cheaper partly because it leaves things out.

And the formula is a floor. It assumes one clean pass. Retrying a failed chunk, sending a glossary with every call, or asking for a second "review" pass all add to the bill, and the review pass alone writes the whole document a third time.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.