TokenSave Data · Dataset
Does the prompt language change what AI coding costs? Claude Code and Codex in 5 languages
Asking Claude Code or Codex to build the same game in Korean, Japanese, Spanish or Ukrainian cost about the same as asking in English: 77,083 to 80,598 input tokens in Claude Code and 47,677 to 49,257 in Codex. What changed was the game itself: its on-screen text, and Claude Code’s code comments, followed the language of the prompt.
Measured 2026-10-18 · 5 languages · 2 tools · 2 runs · License CC BY 4.0 · Related: Claude Code vs Codex: the same coding task
DOI 10.5281/zenodo.23454308 · Also on Hugging Face · Kaggle · GitHub
Key findings
- The prompt language barely moves the bill for agentic coding. With Korean, Japanese, Spanish and Ukrainian prompts, Claude Code used 77,083 to 80,598 input tokens per task against 79,213 for a comparable English run, and Codex 47,677 to 49,257 against 47,954 to 48,815. The prompt is about a hundred tokens; the agent’s own instructions, tools and the code it writes make up the rest.
- Output did not grow either. Claude Code wrote 5,797 to 9,212 output tokens with non-English prompts and Codex 2,536 to 3,986, close to the English runs (7,870 to 8,537 and 2,872 to 3,803), with no language consistently higher. At the API list prices Claude Code reports, a task cost $0.33 to $0.42 in any language.
- The run matters more than the language. One English Claude Code run took an extra agent step and used 123,666 input tokens, more than any non-English run.
- The game speaks your language. In all 16 non-English runs the game’s on-screen text (score, lives, level, messages) was written in the prompt’s language (16 of 16). Claude Code also wrote its code comments in that language in every run, and in one Spanish run named variables in Spanish (
paleta,ladrillos); Codex wrote almost no comments (3 in 8 runs). - Every game worked. All 20 of 20 games loaded and responded to keyboard and mouse in a headless browser without script errors.
- The language tax is a chat problem. In plain chat, the same answer in Korean or Japanese needs far more tokens than in English (see token cost by language). In an agentic coding task that difference is lost in the agent’s fixed overhead and the English-like code it writes.
Tokens, time and cost by prompt language
Both runs are shown for tokens and cost. Codex does not report cost. “Game text language” is the language of the on-screen text in the generated game.
| Prompt language | Tool | Input tokens (run 1 / 2) | Output tokens (run 1 / 2) | Time (avg) | API cost (run 1 / 2) | Game works | Game text language |
|---|---|---|---|---|---|---|---|
| English | Claude Code | 123,666 / 79,213 | 8,537 / 7,870 | 68 s | $0.42 / $0.39 | 2 / 2 | English |
| English | Codex | 47,954 / 48,815 | 2,872 / 3,803 | 37 s | – / – | 2 / 2 | English |
| Korean | Claude Code | 78,282 / 78,381 | 6,976 / 7,116 | 59 s | $0.36 / $0.37 | 2 / 2 | Korean |
| Korean | Codex | 47,677 / 48,793 | 2,536 / 3,649 | 37 s | – / – | 2 / 2 | Korean |
| Japanese | Claude Code | 80,471 / 78,974 | 9,045 / 7,501 | 68 s | $0.42 / $0.38 | 2 / 2 | Japanese |
| Japanese | Codex | 49,078 / 48,063 | 3,858 / 2,837 | 38 s | – / – | 2 / 2 | Japanese |
| Spanish | Claude Code | 80,598 / 77,083 | 9,212 / 5,797 | 67 s | $0.42 / $0.33 | 2 / 2 | Spanish |
| Spanish | Codex | 48,163 / 48,192 | 3,038 / 3,058 | 38 s | – / – | 2 / 2 | Spanish |
| Ukrainian | Claude Code | 79,506 / 79,926 | 8,137 / 8,648 | 70 s | $0.39 / $0.41 | 2 / 2 | Ukrainian |
| Ukrainian | Codex | 49,257 / 47,898 | 3,986 / 2,651 | 36 s | – / – | 2 / 2 | Ukrainian |
Prompts
- English: “Make a brick-breaker game that runs in the browser as a single file named index.html in the current folder. It needs 2 levels, a score display and 3 lives, and it must be playable with the keyboard and the mouse. Write the file and finish.”
- Korean: “브라우저에서 실행되는 벽돌깨기 게임을 현재 폴더에 index.html 파일 하나로 만들어 주세요. 레벨 2개, 점수 표시, 목숨 3개가 있어야 하고 키보드와 마우스로 플레이할 수 있어야 합니다. 파일을 작성하고 끝내 주세요.”
- Japanese: “ブラウザで動くブロック崩しゲームを、現在のフォルダに index.html という1つのファイルで作ってください。レベル2つ、スコア表示、ライフ3つが必要で、キーボードとマウスで遊べるようにしてください。ファイルを書いたら終了してください。”
- Spanish: “Crea un juego de romper ladrillos que funcione en el navegador como un único archivo llamado index.html en la carpeta actual. Necesita 2 niveles, un marcador de puntos y 3 vidas, y debe poder jugarse con el teclado y el ratón. Escribe el archivo y termina.”
- Ukrainian: “Створи гру «арканоїд» (розбивання цеглинок), що працює в браузері, як один файл index.html у поточній папці. Потрібні 2 рівні, відображення рахунку та 3 життя, і грати має бути можна клавіатурою та мишею. Запиши файл і заверши.”
Method
- Both tools on one Windows laptop, effort medium, each run in its own empty folder, prompt sent through standard input.
- Claude Code 2.1.295 (Opus 5.5):
claude -p --permission-mode acceptEdits --output-format json, no MCP servers. Input tokens are summed over every model in the run, including cache reads. - Codex CLI 0.162 (gpt-6-luna):
codex exec --json -s workspace-write; tokens from theturn.completedevents. - The English runs are the same-task runs of the Claude Code vs Codex dataset, measured the same day with the same settings.
- “Game works”: the file loaded in headless Chromium with a canvas, took mouse clicks and arrow keys for two seconds and threw no script errors. The game text language was read from the generated HTML.
Limitations
- One small task and two runs per language and tool; bigger projects with more conversation may show a larger language effect.
- Only the first prompt was in another language; a long back-and-forth in Korean or Japanese would add more non-English text to the context.
- The cost figures are list-price estimates; subscription plans are not billed per token.
How to cite
Free to use, quote and republish with attribution under CC BY 4.0. Please link to this page.
TokenSave (2026). Coding in your own language: does the prompt language change what Claude Code and Codex cost? [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23454308
Embed the chart
Related
- Claude Code vs Codex: startup tokens and the same coding task
- Token cost by language
- Does AI search in your language?
Questions or corrections: contact@jonhisking.com