Skip to content
codelicenses Value my repos

Can you license private repositories to AI labs?

Yes, and private is the requirement rather than an obstacle. Public code has already been collected, so it has nothing left to sell. A private repository you own, that was never published and never forked from something public, is exactly what the market is short of.

Updated 14 September 2026


The question usually arrives backwards. People ask whether private code is allowed, assuming the public stuff is the valuable half. It is the other way around.

Why private is the requirement

Public code has been collected. Every permissively licensed repository on a public host has been in training corpora for years. There is no market for something a buyer already has, so a public repository has nothing left to license regardless of how good it is.

Private code was never collected, because it was never there to collect. That is the entire economic argument, and it does not depend on your code being remarkable.

There is a second reason, and it is the more interesting one. Public code is not a representative sample of software. It skews hard towards libraries, frameworks, tutorials, and the kinds of projects people choose to publish. Most software in the world is none of those things. It is line-of-business systems, integrations, and internal tools maintained for years by people who inherited them. Models trained only on the public sample are noticeably weaker at that category of work, and that gap is what buyers are paying to close.

What private has to mean

Stricter than “the repository visibility setting says private”.

Never published. If it was public and later made private, it was already collected. Flipping the switch afterwards does not put it back.

Not forked from public code. A private repository that began as a fork carries the upstream code with it, and that part is already out there.

Not a mirror of something public. Same reasoning.

Yours to license. Private and owned are separate tests, and the second is the one that catches people. A private repository full of client-owned code is private and worthless to you at the same time. That question is worked through in who owns the code you wrote for a client.

┌─ WORTH CHECKING ─────────────────────────────────────────────────────┐
│                                                                      │
│  Private, finished, owned by you, and doing nothing.                 │
│                                                                      │
│  [ See what your repos are worth ]                                   │
│                                                                      │
└──────────────────────────────────────────────────────────────────────┘

What actually happens to it

This is where most of the anxiety sits, so it is worth being concrete.

Access is read-only, and you choose which repositories are ever touched. A copy is pulled for review. Secrets and personal data are stripped from that copy, in the code and in the history, and verified before a buyer sees anything. Your own repository is not modified at any point.

Nothing is published. Your code does not appear in a directory, a dataset listing, or anywhere else public. The grant is permission to train, not permission to distribute.

And it is non-exclusive. You keep the copyright. You keep using the code, internally and on client engagements, exactly as before. You can license the same repository again to another buyer, and be paid again when that happens.

The one that surprises people

Because licences are non-exclusive, this is not a sale with a single payment at the end. The same repository can be licensed more than once, and the owner is paid each time it is. How often that happens depends on demand rather than on anything you do after submitting.

That changes how to think about the whole exercise. You are not liquidating an asset. You are finding out that an asset you already owned has a yield.

The realistic version

Eligible does not mean licensed. Codebases are prepared, graded, and presented to buyers in batches, and whether a licence closes depends on demand. Nothing here is guaranteed, and the timeline runs to months rather than days.

What is within your control is which repositories you offer and whether you can stand behind the ownership claim on each one. Everything after that is the market.

Common questions

Does my code get published if I license it?
No. Nothing is published and nothing appears anywhere public. The grant is permission to train on it, which is a much narrower thing than developers assume on first hearing.
Does the buyer get to keep using it forever?
The licence terms govern that, and you should read the agreement before signing. What matters here is that it is non-exclusive, so nothing stops you licensing the same code again or using it yourself.
What if a repository was private but I open sourced part of it?
The published part is out. It has already been collected. The rest can still count, provided the boundary between them is clear.
Can I license code that is private but hosted on someone else's account?
Ownership is about rights, not hosting. If the intellectual property is yours, where it sits does not change that. If it is your employer's or client's account because it is their code, hosting is not the problem.
Can I withdraw a repository later?
Before it has been presented to labs, yes. Once an active licensing process has started it cannot be pulled out of that one, though you can withdraw from future opportunities with notice. Licences already completed stay valid.

WORTH CHECKING

You have repos you will never open again.

Private, finished, owned by you, and doing nothing.

That is the code labs pay to license. Non-exclusively, so you keep it.

See what your repos are worth