Skip to content

Code and repositories: what AI labs license

Product repositories, agency project archives, legacy stacks and app or game code can all be licensed to AI labs. Here is what each can fetch, the checks every repository must pass and how long payment takes.

AI labs license private code because public repositories are already widely used for training. Value sits in git history, tests and reviews: by our estimate most repositories license for $150 to $1,500 per repo per sale (indicative, Medium confidence), and repos that build and pass their tests may be worth $10,000 to $100,000+ (Low confidence, our estimate). Repo Check prices a repository without sharing its code.

  • By our estimate, private repos typically license for $150 to $1,500 per repo per sale (indicative, Medium confidence). Rightmark,
  • Our estimate for premium or task-grade repositories that build, pass their tests and carry real bug-fix history: $10,000 to $100,000+ per repo (Low confidence). Rightmark,
  • Training tasks built from real code have sold for $200 to $2,000 per task (Medium confidence). Epoch AI, (opens in a new tab)
  • App developers have been invited to a paid pilot to license the code of their apps for AI training. 404 Media, (opens in a new tab)

Updated

Code and repositoriesAI-generated footage
Indicative range
$150 to $1,500
per repo per sale, our estimate at Medium confidence; large repos with long histories can fetch more
How you are paid
Per license
Non-exclusive by default, so one repo can be licensed again
Timeline
4 to 10 months
from submission to first payment (inferred), then paid again on each further license
First gate
Never public
No public repo, fork or package, at any time

Indicative estimate, not an offer. Final offers depend on the systems you connect, data size and quality, access terms and due diligence.

Four kinds of code AI labs license

All are priced per repository and licensed non-exclusively by default. Title decides whether a repo can be offered at all.

What AI labs pay for code

Standing rates are priced per token of original code and, at a lower rate, per token of git history, per sale. The premium row is our own estimate for repos that build and pass their tests.

Code and repositories prices in the Rightmark Price Index, Q4 2026
PriceRangeConfidenceSource
Private repo, standing-rate licenseTypical, per sale. Large repos up to about $10,000 per sale (indicative); history often carries more than half the price$150 to $1,500per repoMedium confidenceRightmark,
Premium or task-grade repositoryOur estimate for repos that build, pass their tests and carry real bug-fix history; no published per-repo price$10,000 to $100,000+per repoLow confidenceRightmark,
Training task built from real codeReported range per task; difficulty and fair, repeatable grading set the price$200 to $2,000per taskMedium confidenceEpoch AI, (opens in a new tab)

Open the Rightmark Price IndexCode and repositories: 3 of the 40 prices in the Q4 2026 edition

What buyers check on a repository

Fail a gate and the repository is excluded or held back until it is fixed. Pass them all and the quality signals set its grade.

The gates every repository must pass

  1. Never public

    not on a public host, not a fork, not a published package. Buyers check public archives.

  2. Yours outright

    no client claim, NDA restriction or unpaid contributor. You warrant title.

  3. Real work, not a template

    not a demo, tutorial, coursework or template copy, and no history pasted in as a burst of same-day commits by one or two authors.

  4. Builds and runs its tests

    a hard gate for training-task buyers, so a red test suite must be fixed first.

  5. Open source disclosed

    every open-source component listed. Undisclosed copyleft can unwind a sale.

  6. Secrets and personal data removed

    across the whole history. Buyers pseudonymize contributor identities.

Most buyers also filter on the number of contributors, commits, merged pull requests and lines of original code. Below those filters you can still submit: they are filters, not hard minimums.

Quality signals buyers score

Tests
A configured framework, a real share of test code, and coverage enforced in CI.
Cleanliness
Lint and formatting enforced in CI, few very long files, consistent naming.
Architecture
Clear layers, typing and schemas, structured logging and error tracking.
Dependencies
Committed lockfiles, current versions, development and production separated.
Docs and onboarding
A complete README, documented APIs, a changelog, Docker or a devcontainer, and an example env file with no committed secrets.
CI
Lint, type checks and tests on every pull request.
Security hygiene
No hardcoded secrets, input validation and a dependency audit.
History
Recent activity, tags and releases, clean single-purpose commits, few bot commits and, at the top end, several human contributors.

What earns the premium

  • Hard, long-horizon work: large features built over many commits that cannot be split easily. Too easy is a common rejection.
  • Tasks that can be graded fairly: deterministic tests that fail when a unit is removed and pass when it is restored.
  • Real bug-fix commits that added a regression test.
  • A well-structured codebase where hard new features could be specified and verified.
Repo Check

Price a repository without sharing a line of it

Repo Check is a free script you run on your own machine. It reads your git history read-only, makes no network calls and writes a share file of counts and yes or no answers: no code, file paths, names, emails or secrets.

  • Measures size, history depth, tests and CI
  • Flags secrets, env files, open-source licenses and publishable packages
  • Checks the buyer filters and readiness for task buyers

Generic clean-code grades barely predict how many tasks a repo yields. Hard and testable beats tidy.

Have a private repository with passing tests? Read the task-ready repository lot requirements before submitting.

What to prepare before a deal

Buyers ask for the same file every time. Having it ready shortens the agreement step.

Ownership pack
Repo Check's contributor, license and secrets checks, plus your IP documents: assignments from founders, employees and contractors, client consent letters and any earlier licenses.
Never-public evidence
No public mirrors, forks or packages of the code.
Open-source disclosure
An SBOM, lockfiles or a component list, with any copyleft flagged.
History scan
Secrets and personal data searched across the full history, with exposed keys rotated.
Build and test instructions
A README, Docker or a devcontainer, and an example env file.
Payout details
A US tax form and verified bank details.

From submission to first payment

Code moves at the pace of AI labs, which choose what to license. The ranges are across buyers.

  1. Appraise or run a local checkAn indicative range and the fixes to make first.Minutes
  2. Sign the agreementOne combined confidentiality and license agreement.Owner-paced
  3. Connect and selectApprove a scoped, revocable connection to your git host, choose repos and disclose open source.Same day
  4. Scrub and gradeSecrets and personal data stripped across history; each repo graded and valued.Confirmed at scoping
  5. Present to AI labsLabs review and choose. Not every repo is chosen.Lab-paced
  6. Lab signsThe lab signs its license.Lab-paced
  7. Get paidPaid after the lab pays; labs commonly pay on fixed terms.After the lab pays
  8. Submission to first paymentFrom submission to first payment (inferred), then paid again on each further license. Each further license of the same repo pays again.4 to 10 months
  9. You keepCode is non-exclusive by default, so one repo can be licensed to several AI developers.Ownership

Indicative timings, confirmed at scoping.

Questions about code and repositories

Can I sell or license my company's source code to AI companies?

Yes, if you own it and it was never public. You license a copy for training and evaluation and keep ownership. Client code needs the client's consent, and contractor code needs signed IP assignments.

How much is a private repository worth?

By our estimate, most private repositories license for $150 to $1,500 per repo per sale (indicative, Medium confidence), priced per token of original code and, at a lower rate, per token of git history. Premium or task-grade repositories that build, pass their tests and carry real bug-fix history may be worth $10,000 to $100,000+ (Low confidence, our estimate).

Sources: Rightmark, ; Rightmark,

Why does git history matter so much?

Git history often carries more than half the price: the commits, reviews and fixes that show how engineers work. Squashing or migrating a repository without its history removes much of its value.

Is legacy code worth more?

It can be. COBOL, Fortran, embedded C and old .NET are scarce in public data, so private codebases that come with specs, tests and production fixes may draw more interest. No buyer publishes a price for them, so legacy code is priced after review.

Will an AI company copy my product?

Buyers license code to train and test models, under confidentiality, and models learn patterns across a very large number of repositories rather than shipping any one of them. Some code routes also let the licensee sublicense or build derived datasets, so read the scope, and consider keeping code that is still your competitive edge out of any deal.

A buyer sent us a tool to run on our code. Is it safe?

Some assessment tools build your code, run its tests and call an AI model, and their reports can include file paths, commit details, contributor names and emails, and snippets flagged as possible secrets. Run them on a copy in an isolated environment and review the report before you share it.

What if a repository grades low?

A low grade is not a rejection. Some buyers improve their own copy automatically, and your original is untouched.

Other kinds of data

Search all 34 data types

Find out what your repositories are worth.

Answer a few questions for an indicative range, or run Repo Check on your own machine for a figure built from your history. Neither needs a copy of your code.

Find out what your data could be worth.

Start with an indicative appraisal. No files or system access needed.

Appraise your data

What brings you to Rightmark?