neptunenakub/thai-token-tax
About
How much more Thai text costs on each LLM: tokens per 1,000 Thai characters across 45 models, turned into baht per month, with a cost calculator. · วัดค่า token ภาษาไทย 45 โมเดล แปลงเป็นบาทต่อเดือน
AI & Machine LearningMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalThai Token Tax · ภาษีภาษา
The same Thai text takes 2.14× the tokens on Claude as on GPT, and 2.59× as on Gemini. APIs bill per token, so the bill follows. At the same list price ($4 in / $20 out per million tokens), an example workload (LINE OA customer chatbot, 10,000 conversations a month) costs 29,121 baht on Claude Opus 5.5 and 13,635 baht on GPT-5.6 Sol.
| Tokenizer (models that share it) | Tokens per 1,000 Thai characters | |
|---|---|---|
| Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 | 889.5 | ███████████████████████ |
| GPT-5.x and GPT-6 | 416.5 | ███████████ |
| Gemini 3.x, Gemma 4, Typhoon 2.1 | 344.1 | █████████ |
| Gemini 4 Argon | 325.9 | ████████ |
This measures cost, not answer quality: a model that uses more tokens may still answer Thai better. 45 models (13 distinct tokenizers) on 1,012 parallel Thai–English sentences (FLORES-200), measured 10 November 2026; official list prices as of 11 November 2026.
Reproduce it:
git clone https://github.com/neptunenakub/thai-token-tax thai-token-tax && cd thai-token-tax
pip install -e .
ttt all --out rerun
ภาษาไทย · Method and limits · Result files · web page with a cost calculator: https://neptunenakub.github.io/thai-token-tax/
Reproducing
- Needs Python 3.11 or newer (use a virtual environment) and no API key.
ttt alldownloads FLORES-200 (about 26 MB) and the tokenizer files, counts every sentence with every local tokenizer, recounts in a second independent way, and writesrerun/summary_<date>.md.- Those rows must equal the rows with source
openinresults/summary_2026-11-10_day2c.md. The published per-sentence counts are inresults/counts_2026-11-10_open.csv. - Claude, GPT and Gemini are counted through their official token-counting endpoints. Without
ANTHROPIC_API_KEY,OPENAI_API_KEYandGEMINI_API_KEYthose sources are reported as blocked and skipped; gated Hugging Face repositories needHF_TOKEN. A model that cannot be measured is listed as blocked with the real error. It is never replaced by an estimate. - Result files are never overwritten: every run writes a new dated set, which is why the example writes
to
rerun/.ttt prepare(the first step ofttt all) also rewritesdata/source.jsonanddata/normalization_log.json; only their timestamps should change. pytestruns the tests (no network, no keys):pip install -e ".[dev]", thenpytest -q.
What is measured, and what is not
Every model's own tokenizer counts the same content in Thai and in English. Two numbers come out, and they answer different questions:
- Tokens per 1,000 Thai characters compares models with each other: the same Thai text, how many tokens. Multiplied by a price it gives the bill.
- Thai ÷ English (the "premium") compares the two languages inside one model, with a 95% bootstrap confidence interval. It cannot be compared across models, because each model spends a different number of tokens on English. Example: from Claude Haiku 4.5 to Claude Opus 5.5 the premium fell from 3.870 to 2.676, yet Thai tokens per 1,000 characters barely moved (886.5 → 889.5) while English rose from 218.9 to 317.6.
Baht costs are measured tokens × official list price × the Bank of Thailand rate, for example workloads whose sizes are assumptions.
Not measured: answer quality, speed, reasoning or thinking tokens, prompt caching, batch discounts, and any kind of text other than the FLORES-200 sentences (news and encyclopedia style).
Results
Tokens for the same Thai text
| Tokenizer (models that share it) | Type | Tokens per 1,000 Thai characters | per 1,000 English characters | Thai ÷ English (95% CI) | Models | |
|---|---|---|---|---|---|---|
| GPT-4, GPT-3.5 (older generation) | API | 936.1 | ████████████████████████ | 206.0 | 4.343 (4.287–4.400) | 1 |
| Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 | API | 889.5 | ███████████████████████ | 317.6 | 2.676 (2.645–2.709) | 4 |
| Claude Haiku 4.5, Sonnet 4.6 | API | 886.5 | ███████████████████████ | 218.9 | 3.870 (3.820–3.922) | 2 |
| Qwen3, Typhoon 2.5, OpenThaiGPT 1.5 / 1.6 / R1 | open models only | 556.7 | ██████████████ | 209.3 | 2.541 (2.508–2.575) | 8 |
| Nemotron-SEA-LION v4.8 | open models only | 521.8 | █████████████ | 210.9 | 2.365 (2.335–2.395) | 1 |
| Llama 3.1, Llama 3.3, Typhoon 2 (Llama 3.1) | open models only | 470.7 | ████████████ | 205.9 | 2.185 (2.159–2.211) | 4 |
| GPT-5.x and GPT-6 | API | 416.5 | ███████████ | 203.6 | 1.954 (1.930–1.979) | 11 |
| Gemma-SEA-LION v3 | open models only | 394.9 | ██████████ | 204.9 | 1.842 (1.817–1.867) | 1 |
| Gemini 3.x, Gemma 4, Typhoon 2.1 | API | 344.1 | █████████ | 205.5 | 1.600 (1.580–1.621) | 7 |
| Gemini 4 Argon | API | 325.9 | ████████ | 205.0 | 1.519 (1.500–1.538) | 1 |
| Typhoon 7B | open models only | 303.9 | ████████ | 227.5 | 1.276 (1.262–1.291) | 1 |
| Qwen3.5, Qwen3.8, Qwen-SEA-LION v4.5 | open models only | 262.2 | ███████ | 208.6 | 1.201 (1.187–1.215) | 3 |
| OpenThaiGPT 1.0.0 | open models only | 252.9 | ██████ | 236.1 | 1.024 (1.013–1.035) | 1 |
One row is one distinct tokenizer. Models in a row gave identical token counts on every sentence
(models measured on a sample: on every sampled sentence). The table of all 45 models is
results/summary_2026-11-10_day2c.md.
Qwen3, Typhoon 2.5, OpenThaiGPT 1.5 / 1.6 / R1 give identical counts: 556.7 tokens per 1,000 Thai characters. The Thai models in this group inherit the base model's tokenizer.
Same list price, different bill
Example workload: LINE OA customer chatbot, 10,000 conversations a month.
| List price, $ per 1M tokens (in / out) | Model | Thai | Model | Thai | Ratio |
|---|---|---|---|---|---|
| $4 / $20 | Claude Opus 5.5 | 29,121 baht | GPT-5.6 Sol | 13,635 baht | 2.14× |
| $0.10 / $0.50 | Claude Haiku 5.5 | 728 baht | GPT-6 Luna | 341 baht | 2.14× |
Every priced model, same example workload
| Model | List price, $ per 1M tokens (in / out) | Thai | Same content in English | Ratio |
|---|---|---|---|---|
| GPT-6 Luna | $0.10 / $0.50 | 341 baht | 174 baht | 1.95× |
| Claude Haiku 5.5 | $0.10 / $0.50 | 728 baht | 272 baht | 2.68× |
| Gemini 3.5 Flash-Lite | $0.30 / $2.50 | 1,017 baht | 636 baht | 1.60× |
| Gemini 3.8 Flash | $0.75 / $3.75 | 2,112 baht | 1,320 baht | 1.60× |
| Gemini 3.6 Flash | $0.75 / $3.75 | 2,112 baht | 1,320 baht | 1.60× |
| GPT-6.1 Terra | $1 / $5 | 3,409 baht | 1,744 baht | 1.95× |
| Gemini 4 Argon | $2 / $10 | 5,334 baht | 3,512 baht | 1.52× |
| Gemini 3.1 Pro Preview | $2 / $12 | 5,976 baht | 3,735 baht | 1.60× |
| GPT-6 Sol | $2 / $10 | 6,818 baht | 3,488 baht | 1.95× |
| GPT-6.1 Sol | $2 / $10 | 6,818 baht | 3,488 baht | 1.95× |
| GPT-5.2 | $1.75 / $14 | 7,061 baht | 3,613 baht | 1.95× |
| Claude Haiku 4.5 | $1 / $5 | 7,255 baht | 1,875 baht | 3.87× |
| GPT-5.4 | $2.50 / $15 | 9,043 baht | 4,627 baht | 1.95× |
| GPT-5.6 Sol | $4 / $20 | 13,635 baht | 6,976 baht | 1.95× |
| Claude Sonnet 5.5 | $2 / $10 | 14,560 baht | 5,441 baht | 2.68× |
| GPT-5.5 | $5 / $30 | 18,087 baht | 9,254 baht | 1.95× |
| Claude Sonnet 4.6 | $3 / $15 | 21,766 baht | 5,624 baht | 3.87× |
| Claude Opus 5.5 | $4 / $20 | 29,121 baht | 10,881 baht | 2.68× |
| GPT-6 Astra | $10 / $50 | 34,088 baht | 17,441 baht | 1.95× |
| Claude Fable 5.2 | $8 / $40 | 58,242 baht | 21,763 baht | 2.68× |
More tokens does not always mean a higher bill: Claude Haiku 5.5 costs 728 baht, less than Gemini 3.5 Flash-Lite at 1,017 baht, although it uses more Thai tokens (889.5 vs 344.1 per 1,000 characters). The price per token differs.
Open models have no per-token price of their own, so they have token counts only. The other
workloads are in results/costs_2026-11-11.md; the web page has a calculator with
editable assumptions.
The workloads (assumptions, from registry/scenarios.toml; sizes in Thai characters):
| Scenario | Volume | Turns | System prompt, chars | Input per turn, chars | Output per turn, chars | History resent |
|---|---|---|---|---|---|---|
| LINE OA customer chatbot, 10,000 conversations a month | 10,000 | 6 | 2,000 | 60 | 250 | yes |
| Summarising 100 Thai documents | 100 | 1 | 500 | 20,000 | 1,500 | no |
| Writing 1,000 Thai content pieces | 1,000 | 1 | 800 | 300 | 3,000 | no |
Planned but not measured
| Model | Why not measured |
|---|---|
aisingapore/SEA-LION-v1-7B |
no tokenizer.json; would need code from the repository to be executed (HTTP 404) |
meta-llama/Llama-4-Scout-17B-16E-Instruct |
gated repository, access not granted (HTTP 403) |
google/gemma-3-27b-it |
gated repository, access not granted (HTTP 403) |
gemini-2.5-pro |
the API says the model is no longer available to new users (HTTP 404) |
gemini-2.5-flash |
the API says the model is no longer available to new users (HTTP 404) |
Limits
This is token cost only. It says nothing about answer quality.
Token rates were measured on FLORES-200 (news and encyclopedia style text). Chat messages or other kinds of text may tokenize differently.
Output tokens are assumed to have the same tokens-per-character as input text of that language.
Reasoning/thinking tokens, prompt caching, batch discounts, free tiers and long-context price tiers are not included. Standard list prices only.
Claude token rates come from count_tokens, which Anthropic documents as an estimate.
Open models have no per-token price of their own: only their token counts are reported.
The English column is the same content in English: character counts are scaled by the measured English/Thai character ratio of FLORES-200.
Scenario sizes (characters, turns, volumes) are assumptions written in registry/scenarios.toml, not measurements.
FLORES contains some translations whose meaning does not match the source. The data was not edited.
The check against real billing (90 paid requests to Claude; billed input tokens equalled
count_tokenson every one) covered single-message requests only: no system prompt, no tools.Claude's request framing (8 / 7 tokens per request) is billed, but is not part of these numbers.
Prices change. On 11 November 2026 Google's pricing page stated an end date for the current price of:
Gemini 3.8 Flash: input "$0.75 through December 31, 2026. $1.50 starting January 1, 2027." output "$3.75 through December 31, 2026. $7.50 starting January 1, 2027."
Gemini 4 Argon: input "$2.00 through November 30, 2026. $4.00 starting December 1, 2026." output "$10.00 through November 30, 2026. $20.00 starting December 1, 2026."
Gemini 3.6 Flash: input "$0.75 through December 31, 2026. $1.50 starting January 1, 2027." output "$3.75 through December 31, 2026. $7.50 starting January 1, 2027."
The full list of weak points, and what would change the conclusions, is in
docs/methodology.md.
Adding a model or a language
Both are registry changes, not new code.
- Model: add one
[[model]]block toregistry/models.toml(id,family,counter;revisionpins a Hugging Face repository;sample_ofchecks an API model against a fully measured one on a fixed sample). Thenttt count,ttt verify,ttt analyze. For a price, add its row toregistry/pricing.tomland runttt pricesandttt cost. Thenttt siteandttt docs. - Language: add one
[[target]]block with a FLORES-200 code toregistry/languages.toml, thenttt prepareand the steps above.prepare,count,verifyandanalyzetake every language in the registry; only Thai has been run so far, and the cost tables, the site and this README present one target language.
Repository layout
registry/ what is measured: models, languages, price sources, example workloads, display names
src/thai_token_tax/ the `ttt` command: prepare, count, verify, analyze, prices, cost, compare, site, docs
tests/ pytest, no network
data/ provenance and logs; the FLORES sentences are rebuilt locally, not committed
results/ dated raw counts, summaries, prices, costs; latest.json points at the newest set
site/ one static page; reads site/data.json, written by `ttt site`
templates/ the sources of this README and docs/methodology.md, filled by `ttt docs`
docs/methodology.md how it was measured, limits, what would change the conclusions
blog/ articles (Thai, English) and post drafts, generated like this README
ARCHITECTURE.md how the code is organised
LOG.md what was run each day, including the things that went wrong
No number in this README, the methodology or the site is typed by hand: they are generated from
results/, and tests fail if a document is out of date.
Dates and sources
- Token counts: measured 10 November 2026 (UTC). Raw per-sentence counts:
counts_2026-11-10_open.csv,counts_2026-11-10_open-llama31.csv,counts_2026-11-10_open-llama33.csv,counts_2026-11-10_openai.csv,counts_2026-11-10_gemini.csv,counts_2026-11-10_anthropic.csv. - Prices: official pricing pages of Anthropic, OpenAI and Google, fetched 11 November 2026, saved with the
page hashes in
results/prices_2026-11-11.json. - Exchange rate: 33.392 baht per US dollar, Bank of Thailand weighted-average interbank exchange rate, baht per US dollar, 10 November 2026 (https://www.bot.or.th/en/statistics/exchange-rate.html).
- Data: FLORES-200
devtest, English and Thai, the original Meta release. FLORES+ 5.0 differs from it in 0 of these sentences after normalization.
Licences
- Code: MIT (LICENSE).
- Result files, documentation and site text: CC BY 4.0 (LICENSE-DATA).
- FLORES-200 is by Meta (NLLB Team) under CC BY-SA 4.0. Its sentences are not redistributed here;
ttt preparedownloads them from the original release. Seedata/README.md.
How to cite
Thai Token Tax authors. Thai Token Tax: how many more tokens Thai text costs than the same
English text on major AI models. Version 0.1.0, measured 10 November 2026. https://github.com/neptunenakub/thai-token-tax
Machine-readable: CITATION.cff.
Explore related projects
Loading…