Home / Blog / What is your startup's codebase worth to AI labs?
What is your startup's codebase worth to AI labs?
A private codebase is worth more to AI labs when it has never been public, has a long and genuine git history with reviewed pull requests and linked issues, has tests that still run, comes with the docs and discussions around it, and has a clean ownership record. Size alone matters less than people expect, and the licence terms, especially exclusivity, move the value too.
Founders often assume a codebase is valued like a product: by revenue, users or how polished it is. AI labs look at it differently. They want material to train and test coding agents on realistic, multi-year software work, so they value the things that show how real engineering happens. A product that never found customers can still have a valuable codebase, and a successful one can have a codebase labs pass on.
This post explains the factors that drive value. It deliberately gives no prices. Offers depend on what buyers are short of at the time, and any number quoted without seeing the code is a guess.
Why labs want private code at all
- Evaluation that isn't contaminated. Public code is very likely already in a model's training data, so it makes a weak test. Code that has never been published is a fair test of whether a model can really work in an unfamiliar codebase.
- Realistic tasks. Real pull requests and issues can be turned into tasks: here is the repository before the change, here is the bug report, make the tests pass.
- How teams actually work. Review comments, reverted changes and long-running refactors show judgement that tutorials and public snippets don't.
Our page on private codebases for AI training shows what a delivery includes and how buyers use it.
1. It has never been public
This is the first thing buyers check. If the repository, a fork or a mirror was ever published, the value of the exposed parts drops sharply. Partly open-sourced projects can still qualify, but the private portions are what count. Be upfront about anything that was published, even briefly.
2. The history is long and genuine
A buyer wants to see the code change over time. What helps:
- Years of continuous commits rather than a single import
- Commit messages that explain what changed and why
- Merged pull requests with review discussion
- Issues or tickets linked to the commits that fixed them
What hurts: history that was squashed, rewritten or lost in a migration between hosts. If you moved from one platform to another, check that the history came with you.
3. Tests that still run
Labs build environments where an agent's change is checked automatically. That only works if the project builds and its tests run. A working test suite, CI configuration, lockfiles and a reproducible setup (a Dockerfile or clear build instructions) make a codebase far more useful. Tests that fail today are not a deal-breaker, but say so.
4. Real complexity, not just size
Large is not automatically better. Buyers discount generated code, vendored dependencies, minified bundles and copied boilerplate. What they value is complexity that came from real use: several services talking to each other, data migrations, integrations with third-party APIs, performance fixes, security patches.
5. Many contributors and a review culture
Code written by a team, with people reviewing each other's work, carries more signal than a single developer's project. Disagreement in review threads is useful: it shows trade-offs being argued and decided.
6. Language, domain and demand
Demand moves. At any time, buyers are short of particular languages, frameworks or domains: regulated industries such as finance and healthcare, infrastructure, embedded systems, or legacy stacks like COBOL and mainframe code. Mainstream web stacks are in demand too, but there is more supply. Some buyers also say they particularly want code written mostly by people, so history from before AI coding assistants became common can draw extra interest.
7. The context around the code
A repository on its own tells an agent what changed. The surrounding records tell it why. Design docs, runbooks, architecture notes, support tickets, and the Slack or email threads where decisions were made can add a lot of value, especially when they link to specific commits or pull requests. See business operations data for AI agents for what buyers look for in those records.
8. Clean ownership and clean data
Uncertainty lowers offers or ends deals. Buyers want to know:
- Who owns the code now, and who can sign the licence
- Whether contractors or an agency wrote parts of it, and whether they assigned their rights in writing
- Whether customer data sits in fixtures, logs or seed files
- How many secrets need scrubbing from the history
None of these has to be perfect, but the answers have to be clear. If your company has closed, our guide to selling data and IP during a shutdown covers who can sign.
9. The licence terms
The same codebase can be worth different amounts under different terms. An exclusive licence is worth more to a buyer than a non-exclusive one, because competitors can't train on the same code. Broader use (training, evaluation and fine-tuning), longer terms and fewer restrictions also raise value. Narrower terms are a fair trade if you want to license the code more than once. Our post on how training data is priced explains the general structure.
What matters less than you'd think
- Revenue and users. Commercial success doesn't transfer to the training value of the code.
- Code quality. Messy, real code with history is often more useful than a tidy rewrite.
- Why the company stopped. Buyers care about the code, not the outcome.
Get the basic numbers in a minute
From inside the repository, these commands give you the figures buyers ask about first:
Find out what yours is worth
The quickest way to a realistic answer is to tell us about the code. Fill in the short codebase form: approximate answers are fine, and you don't share any code or give access at this stage. We'll reply within two business days with a straight view on whether AI labs would license it, and how the factors above apply to yours. You keep ownership, and you don't pay us.
Questions
How much is my codebase worth for AI training?
It depends on whether the code has ever been public, how long and genuine its git history is, whether tests run, how much context comes with it, how clean the ownership is, and the licence terms. A realistic estimate needs a look at those details, not a rule of thumb.
Do AI labs buy code from failed startups?
Yes. What labs value is real engineering history in code that has never been published, and that does not depend on whether the product succeeded.
Does exclusivity change what my code is worth?
Yes. An exclusive licence is usually worth more to a buyer, because competitors cannot train on the same code. A non-exclusive licence lets you license the code more than once.
Is open-source code worth anything to AI labs?
Very little as training data, because public code is likely already in models' training sets. Private portions of a partly open-source project can still be valuable.
Find out what your data could be worth
Tell us roughly what you have: repos, years of history, the systems you used. We'll give you a straight answer in 15 minutes.