$100 per 1M source tokens · rates checked October 20, 2026

How much is your code worth to AI labs?

Pangea licenses private source code to AI labs at $100 per million tokens of source and $40 per million tokens of git history. It puts a typical repository at roughly $1,000 to $1,500. Connect GitHub or pick a folder to count your own source at that rate. Your token and your code stay in your browser.

Connect GitHub

  1. 01Create a fine-grained token on GitHub's token page. Under Repository access, choose the repositories to price.
  2. 02Under Repository permissions, set Metadata to Read-only and Contents to Read-only.
  3. 03Paste the token below. It's gone when you close this tab.

How source and git history are counted

Pangea licenses two things from a repository: the code as it stands today (the source) and every earlier version of it (the git history). The calculator above counts source only, so a repository with a long history can be worth more than it shows.

pre.dev publishes a script that counts both. It reads every version of every file that a branch or tag still reaches, and counts each version in full, the same way it counts a file today. A file edited 40 times leaves 40 versions behind, so a repository worked on for years can hold more history tokens than source tokens.

CountedSourceGit history
What countsEach code file in the latest commitEach earlier version of each code file, on every branch and tag
Rate$100 per million tokens$40 per million tokens
Counted onceEach fileEach distinct version. A version that matches today's file counts in source only
Docs, config and dataUp to 10 times the code beside themUp to 10 times the code in history, counted apart from source
SkippedDependencies, build output, minified and bundled filesThe same, plus commit messages, which aren't counted
LimitNone100 MB per file path across its versions, about 26.2 million tokens
Counted on this pageYesNo. Run the script below

From pre.dev's script, read October 20, 2026. Pangea publishes the two rates.

One edited file can earn more from history

A 20 KB TypeScript file is about 5,000 tokens today, or $0.50 at the source rate. If it went through 40 earlier versions of about the same size, its history is about 200,000 tokens, or $8.00 at the history rate.

Squashing a repository removes its history

Squashing, rewriting history or deleting branches drops the old versions, and their tokens with them. Price the repository as it is and submit it the same way. Pangea strips secrets and personal data before a lab sees the code.

A browser can't count history

Reading every old version over the GitHub API would take thousands of calls per repository. pre.dev's script reads them from your own clone with git and prints source and history side by side. It makes no network calls.

Run it on your machine
curl -fsSLO https://api.pre.dev/api/code-licensing/estimate.mjs
node estimate.mjs /path/to/repo

Needs git and Node 18 or newer. Run it on a full clone, because a shallow one leaves the old versions out. Pass several paths, or a folder of repositories, to get one row each and a total.

Which repositories Pangea takes

From Pangea's code licensing page, checked October 20, 2026.

01

Private and never public

Code that was ever public is out, even if it's private now.

02

Yours to license

You own the code or hold the right to license it. Work done for a client is out.

03

Original work

Forks are out. Generated files, vendored code and third-party code don't count toward the value.

Pangea grades each repository before a lab licenses it

Pangea grades a separate copy of each repository and offers the accepted ones to labs. The standard license is non-exclusive, so you keep using the code and the same repository can be licensed more than once. An exclusive license or a full sale needs a separate written agreement on price.

Price my repositories on Pangea

We may earn a fee if you sign up. How we get paid.

What 1,000 to 500,000 lines of code are worth

LinesSource tokensAt $100 per 1M
1,00010,000$1.00
5,00050,000$5.00
10,000100,000$10.00
50,000500,000$50.00
100,0001,000,000$100
500,0005,000,000$500

Assumes about 10 tokens a line, which is our own rule of thumb; no buyer publishes one. Source only, at Pangea's rate checked October 20, 2026.

Common questions

How is the value worked out?

Tokens are bytes divided by four. Source code counts in full at $100 per million tokens. Docs, config and data files (.json, .md, .yaml and the like) count up to ten times the code beside them. Git history is $40 per million tokens and is counted by the script above.

Are commit messages part of git history?

Not for pricing. pre.dev's script counts the files in each old version and leaves commit messages, authors and dates out.

Do branches other than main count?

Yes. The script reads every branch and tag the repository holds, including the remote branches a normal clone brings with it. Versions that lived only on a deleted branch don't count.

Why does the script show almost no history?

Usually the copy is shallow (cloned with --depth) or the code arrived in one commit, for example after a move from another host without its history. Run git fetch --unshallow, or point the script at the original repository.

What does the GitHub token let this page read?

The list of repositories you own, and the path and size of each file in them. File contents are read only for files of 100 KB or more, to check whether they are minified. The token stays in this tab and is not stored.

Does anything reach Dataconto?

A count of repositories, the rounded total and which mode you used, so we can see whether the tool works. Repository names, usernames, file paths and tokens stay out of it.

Will Pangea pay exactly this figure?

Not necessarily. Pangea calls its rates indicative, so this figure is an estimate. You're paid within 15 days of a lab paying for a license. What Pangea publishes has the details.

How is this different from githubworth.com?

githubworth.com prices a public GitHub profile for fun, with the Pangea rate added on top. This page prices the private repositories you could license.