Skip to content

0xtigerclaw/token-index-global

Repository files navigation

Token Index

An editorial model of monthly model spend for a coding-assistant inference workflow across countries.

Homepage screenshot of Token Index showing the editorial hero, the fixed monthly coding-assistant inference scenario, and the opening cost-gap framing.

The screenshot above shows the opening frame of the project: the fixed monthly coding-assistant inference scenario, the headline spread in the estimate, and the editorial setup for the country cost gap.

This project asks a simple question:

If you hold the same coding-assistant inference workflow constant, where does the estimated monthly model spend land lowest?

The site is built as an editorial story, not a live benchmark. It combines current model API pricing with country-level electricity and price-level proxies to show how the same inference workload can look different across national cost conditions.

What This Is

  • A sourced editorial model
  • A comparison of the same monthly coding-assistant inference workflow across countries
  • A way to explore how electricity and local price levels can move estimated inference spend
  • A narrative UI built around cost gap -> power -> PPP-adjusted second view -> implications

What This Is Not

  • Not a live benchmark of what companies actually pay
  • Not a map of local API list prices by country
  • Not a benchmark of retail AI seat prices for tools like Cursor, ChatGPT, or Claude
  • Not a complete measure of real-world AI infrastructure quality

The current country model is intentionally narrow. It does not directly model datacenter maturity, GPU availability, network quality, enterprise discounts, caching, SaaS markup, taxes beyond the price-level proxy, or procurement terms.

Current Scenario

The standard scenario is:

  • 1 month of a coding-assistant inference workflow
  • 22 workdays
  • 10 coding sessions / day
  • ~45K total tokens / session
  • 9.9M total tokens
  • 70% input / 30% output

The model basket is weighted toward coding-relevant inference usage and currently uses official list prices reviewed on April 20, 2026 for:

  • OpenAI
  • Anthropic
  • Google

Method In Plain English

  1. Start with a coding-focused basket of model API prices.
  2. Convert that basket into a fixed monthly inference scenario.
  3. Adjust the scenario by country using:
    • a World Bank business-electricity benchmark
    • a World Bank price-level ratio
  4. Show the result as an estimated monthly model spend
  5. Add a PPP-adjusted second view for affordability context

This is the core formula used in the app:

monthly inference cost =
  base monthly basket × (
    0.50 baseline +
    0.35 × electricity / median electricity +
    0.15 × price level ratio
  )

Power section screenshot showing the business electricity versus monthly coding-assistant inference cost chart, along with the PPP-adjusted affordability view.

This second screenshot shows the explanatory middle of the story: the power chart that anchors the main cost lever in the model, followed by the PPP-adjusted view that adds a second affordability lens.

Why The Framing Is Careful

This repo is intentionally written as an estimate and editorial model.

That matters because:

  • API prices are mostly global
  • country differences here come from the model inputs, not vendor country pricing pages
  • lower estimated cost does not automatically mean stronger real-world AI infrastructure

For example, if one country ranks cheaper than another, that only means it scores lower in this model given the current inputs. It does not prove that it has better datacenter infrastructure or a better production environment for AI deployment.

Data Sources

Primary pricing references:

Country-level proxy inputs:

Context:

Current source dates used in the app:

  • Model pricing reviewed: April 20, 2026
  • Electricity benchmark year: 2019
  • Price-level ratio year: 2024

Stack

  • TanStack Start
  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS v4
  • Recharts
  • react-simple-maps

Local Development

With Bun

bun install
bun run dev

Build

bun run build

Typecheck

bunx tsc --noEmit

If you prefer npm:

npm install
npm run dev

Project Structure

src/
  components/token/   editorial sections and visualizations
  lib/tokenIndex.ts   scenario definition, country inputs, and model math
  routes/index.tsx    homepage composition and narrative flow
  styles.css          global visual system

Notes For Readers

If you share or cite the project, the safest description is:

A sourced editorial model of estimated monthly model spend for a coding-assistant inference workflow under different national cost conditions.

That is the honest version of the project.

About

Editorial model of coding-assistant inference spend across countries using model pricing, electricity, and price-level proxies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors