Skip to content

License your private codebase to AI companies

Private repositories with full git history show how real teams fix bugs, review code and ship. AI labs license them for training.

Price Index, Q4 2026
  • Private repo, standing-rate license$150 to $1,500 per repoMedium confidenceRightmark summary of public code licensing programs, Q3 2026
  • Premium or task-grade repository$10,000 to $100,000+ per repoLow confidenceRightmark estimate for task-grade code repositories, Q3 2026
AI-generated footage

You can license private source code to AI companies if you own it and it was never public, and you keep ownership. Most repos fetch $150 to $1,500 per sale, and each further license pays again. Buyers pay most for full git history and tests that run, and repos that build and pass their tests can also become training tasks.

Updated

Timeline
4 to 10 months
from submission to first payment (inferred), then paid again on each further license
You keep
Ownership
Code is non-exclusive by default, so one repo can be licensed to several AI developers.

Why AI buyers want it

Models learn to code from examples. Private repositories with long git histories teach what public snapshots cannot: how a codebase changes under deadlines, how bugs get found and fixed, and how reviewers push back. Labs also turn real repos into training tasks and private tests, which can pay more than the code alone.

Think of it this way

Think of your git history as a flight recorder. The finished code is the plane; the recorder is what investigators pay to study.

What sets the price

  • Full git history. Git history often carries more than half the price, so never squash or migrate a repo before it is licensed.
  • Never public. Buyers check public archives and exclude code that was ever in a public repo, a fork of a public project or a published package.
  • Tests wired into CI. Tests let buyers turn your repo into verifiable training tasks.
  • Linked issues and pull request reviews. The conversation around the code is part of what buyers license.
  • Written mostly by people, ideally before AI coding assistants were common. Buyers discount or reject code written mostly by AI assistants.
  • Several contributors, a long commit history and merged pull requests. Most buyers filter on them, though they are not hard minimums.

The estimate on this page prices a dozen mid-sized repos with full history. Each further license pays again, and repos that build and pass their tests can also become training tasks, a separate route that can pay more.

What blocks a deal, and the fix

Client code without a consent letter
A consent letter that offers the client a share of proceeds can help a client agree. You choose the share.
Contractors who never signed an IP assignment
Contributors sign a short IP confirmation that names AI training as a field of use.
Secrets and personal data in the history
Repo Check flags secrets and personal data on your own machine before any buyer sees a line, and buyers scrub the full history again on delivery.
Open-source components with copyleft licenses
A license scan flags them so they can be excluded or disclosed. Undisclosed copyleft can unwind a sale.

A component list makes open-source obligations visible

General information, not legal advice.

Before licensing a private codebase, make a component inventory that connects each dependency to a version, source, license identifier, location and action. A Software Bill of Materials can make that inventory machine-readable. It does not prove that a license is compatible with your deal, that notices are complete, or that your repository is free of third-party claims. Your own lawyer still needs to read the applicable licenses and contracts.

The CISA SBOM announcement describes an SBOM as a formal record of software components and highlights refined fields including component hash, license, SBOM tool name and generation context Cybersecurity and Infrastructure Security Agency, (opens in a new tab). The SPDX License List provides standardized identifiers and license text SPDX, (opens in a new tab). Use current versions of those sources when building the actual artifact.

Prepare the minimum evidence

Prepare the minimum evidence (table)
FieldWhat to recordWhy it matters
Component name and versionPackage or module identity and resolved versionA name without a version is hard to review
Source and relationshipRegistry, repository, direct or transitive dependencyShows how the component enters the build
License identifierSPDX identifier or full text when no identifier fitsMakes license text discoverable
Copyright and noticesCopyright holder and notice file where presentPreserves attribution and notice obligations
File or package locationThe path or package boundary in the private reportLets a reviewer connect the finding to an action
Hash or digestComponent hash when the tool supports itHelps identify the exact component reviewed
Generation contextTool, version, date and source lockfileMakes the report reproducible
ActionDisclose, retain, replace, exclude or ask your own lawyerConverts a list into a release decision

The source location can stay in the private report. Do not publish repository paths, private URLs, credentials or code in a public sample.

Triage by obligation, not by label

An identifier is a starting point. Read the license and the version actually present. Ask whether the component is linked, copied, modified, generated or shipped as a service. Identify notice, attribution, source-disclosure, patent, redistribution and derivative-work conditions. “Open source” does not mean “no obligations,” and “permissive” does not mean “compatible with every use.”

Use this decision sequence:

  1. Resolve the dependency graph and lockfile versions.
  2. Match each component to a license text or mark it unknown.
  3. Flag copyleft, custom and missing licenses for review.
  4. Check whether private code includes copied files, snippets, fixtures or generated artifacts from another source.
  5. Decide whether to retain and disclose, replace, exclude or escalate.
  6. Re-run the report after remediation and retain the old report as review history.

Worked fictional example

Suppose fictional repository “Sample A” produces this private triage:

Worked fictional example (table)
ComponentEvidenceAction
Package A, version recordedSPDX identifier and lockfile matchRetain and include the required notice
Package B, copyleft familyLicense text and path identifiedExclude the affected module or take your own lawyer’s advice
Internal forkNo clear upstream license recordFind the original agreement or hold the fork out
Generated fixtureOrigin not documentedReplace with synthetic fixture or document provenance

The output is a route decision, not a score. A component marked “retain” still needs the notice and agreement checks that apply to the final license. A component marked “exclude” must actually be excluded from the delivered scope and any sample.

How Repo Check fits

Rightmark’s Repo Check page is the local technical path for contributor, license, secret and history signals. Its report can support the ownership pack. Keep the report tied to the exact repository state and scan date. Do not treat a clean output as a warranty that every component obligation has been resolved. The Trust page explains how the pack and scope reach a buyer under the approval gate.

This checklist is technical preparation, not a legal opinion. If a component is copyleft, custom licensed, copied from a client, or missing a rights record, ask your own lawyer before the code enters a licensing scope.

The private data review checklist covers public exposure, full history, secrets and personal data.

A narrower repository with a documented exclusion is more reviewable than a broad archive with unknown obligations.

What owners overlook

  • A repo you plan to rewrite is still an asset. Its history keeps its value after the product moves on.
  • Licensing a repo as plain training data can end its value as a private test set. Choose the route for each repo before it is licensed.

Market evidence

How a deal works

  1. Appraise

    Answer a few questions about your repositories. See an indicative range, what sets it and what would raise it. No files, no access.

    About a minute

  2. Verify title

    Repo Check runs on your own machine and reports the contributor, license and secrets checks buyers look for. With your IP documents, that report becomes the ownership pack.

    Before any offer

  3. Route

    Each repo goes to the route that fits it: a non-exclusive standing-rate license, or training tasks for repos whose tests run.
  4. Sign and get paid

    You approve the agreement and its scope. On code routes, signing covers future non-exclusive sales, and you can withdraw code that has not been licensed yet. We never hold your passwords. Transfers use scoped, revocable connections your admins approve, or exports.

    About 4 to 10 months from submission to first payment

Questions

Do I sell my code or license it?

You license it. You keep ownership and can keep using the code. Code licenses are non-exclusive by default, so the same repo can be licensed to several AI developers and you are paid on each sale. An exclusive deal needs a separate signed agreement, so read the scope of yours.

Do I approve each sale?

You approve the agreement and its scope. On code routes, signing covers future non-exclusive sales, so you do not sign again for each one. You can withdraw any repo that has not been licensed yet; licenses already granted stay in force.

Will an AI company copy my product?

Buyers are AI developers licensing code for model training and evaluation, under confidentiality. If a codebase is still commercially sensitive, keep it off the table.

How is the price set?

Standing-rate licenses are priced per token of original code and, at a lower rate, per token of git history, for each sale. Most repos fetch $150 to $1,500. The estimate on this page (12 repos at $250 to $1,200 each, per sale) comes to $3,000 to $15,000 at Medium confidence. You see the route and the range before you sign anything. Indicative estimate, not an offer.

Source: Rightmark,

How long until I am paid?

Usually 4 to 10 months from submission to first payment, an inferred guide. Scrubbing, grading and review by the labs come first, and labs commonly pay on fixed terms. Each further license of the same repo pays again.

What do I warrant?

That you own the code or hold the rights to license it, with IP assignments from every contributor and no client claim. On some code agreements the indemnity for ownership claims is uncapped, so only submit what you are sure you own.

What do you need from me to start?

Only answers to the appraisal. Then Repo Check runs on your own machine and reports the contributor, license and secrets checks buyers look for. With your IP documents, that report becomes the ownership pack.

Get an indicative range for your Private codebases.

About a minute to appraise. No files, no access.

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?