Source code

How per-token code pricing works

Code sells by the token, four bytes each: $100 per million of source and $40 per million of git history at Pangea's rates. The rules, with worked examples.

Last checked October 26, 2026

Typebars of a teletype machine

AI labs buy code by the token, and a token here is four bytes of a file. Pangea pays $100 per million tokens of source code and $40 per million tokens of git history for a non-exclusive license. A typical line of code is about ten tokens, so a million tokens is roughly 100,000 lines. The rules below are copied from pre.dev’s published counter, the script Pangea’s pipeline runs, and the worth calculator applies them to your repositories in your browser.

Tokens are bytes divided by four, not words or lines

The counter reads file sizes, not language. A 2,000-byte file is 500 tokens whether it is Python, CSS or a README. That makes the price easy to check by hand:

RepositorySource bytesSource tokensSource value
A small script40 KB10,000$1
A side project400 KB100,000$10
A product4 MB1,000,000$100
A large codebase20 MB5,000,000$500

Those are the source figures only. The history figure is usually several times larger.

Source is the latest version; history is every earlier one

Source is each code file as it stands in the latest commit, counted once. History is each earlier version of each counted file, on every branch and tag, each distinct version counted once. A version identical to today’s file counts in source only. Commit messages, authors and dates are not counted. Each file path is capped at 100 MB across all its versions, about 26 million tokens.

So a file that was rewritten twenty times carries about twenty versions of itself in history, priced at $40 per million tokens, on top of its single source count at $100 per million. That is why Pangea says “Git history carries most of the value”, and why 79% of the tokens on its network are history.

Docs, config and data count, up to ten times the code

Code files (.js, .ts, .py, .go, .rs, .java, .c, .sql, .css and about sixty other extensions) count in full. Text files (.md, .json, .yaml, .html, .xml, .toml and similar) count too, but only up to ten times the bytes of code beside them, in source and in history separately. A repository that is one script and a 50 MB JSON dump is priced as the script plus ten times its size, not as the dump.

Dependencies, builds and minified files count for nothing

The counter skips whole folders by name: node_modules, vendor, dist, build, target, .next, __pycache__, .git, Pods and the rest of the usual dependency and build output. It skips files named like bundles, such as main.min.js or chunk.8f3a9c2e.js, and any file with a single line of 100 KB or more, which is the test for minified code. Pangea’s page adds that generated files, vendored code, binaries, data dumps and third-party code stay out of the valuation. None of this needs cleaning up first: Pangea takes repositories as they are and leaves the excluded parts out of the count.

Three worked examples

History can only be counted exactly by pre.dev’s script, run on a full clone. githubworth.com estimates it from source size and commit count, with a published error band, and these are its worked examples at Pangea’s rates:

Source tokensCommitsEstimated history tokensLowMiddleHigh
50,00030161,653$7$11$30
1,000,0005008.1 million$187$424$1,331
5,000,0003,00084.8 million$1,416$3,893$13,395

Pangea’s own illustration, roughly $1,000 to $1,500 per repository at typical depth, sits inside the last two rows. Repositories with ten commits or fewer are the least predictable, so for those the range matters more than the middle.

Per token means per copy, and a copy can sell more than once

The license is non-exclusive. You keep the code, and the same repository can be licensed to several labs, each paying at the published rate. An exclusive license or a full acquisition is a separate written agreement with its own price.

The rate is a list price; the grade and demand set the deal

Pangea calls its rates indicative and can change them on 30 days’ notice, never retroactively. Before anything is licensed, an AI lab reviews a scrubbed copy of each repository against a fixed rubric, and Pangea says the final value depends on that analysis and on buyer demand. Licensing typically takes 2 to 16 weeks and is not guaranteed, and you’re paid within 15 days of a lab’s payment. The token count tells you the ceiling at today’s rates. How much is my GitHub repo worth has the three ways to get your own count.

Sources

  1. Pangea, code licensing for companies checked October 20, 2026
  2. pre.dev, code licensing estimate script (the counter Pangea's pipeline runs) checked October 19, 2026
  3. githubworth, how a repo is valued checked October 26, 2026

Buyers in this guide

More guides