AI-Generated Code and Licensing: Who Actually Owns It?
Who owns code a model wrote for you? The honest answer is: it's genuinely unsettled in places, differs by jurisdiction, and this isn't legal advice - just a map of the open questions.
This is not legal advice
This entry explains the landscape as of mid-2026, mainly US and EU, based on official guidance and vendor terms. Copyright law around AI output is actively evolving and differs by country. For real stakes, talk to a lawyer in your jurisdiction.
Is AI-generated code protectable by copyright at all?
In the US, the Copyright Office's position (2025 guidance) is that human authorship is required for protection - code generated purely by a model isn't copyrightable. Just typing a prompt doesn't count; meaningfully arranging or editing AI output can qualify. Other jurisdictions draw this line differently.
What about the training data?
A separate question: was the model trained on code under licenses that restrict reuse (like copyleft)? Genuinely contested and subject to ongoing litigation in multiple countries - no settled answer exists today.
What vendors actually promise you, contractually
Some vendors offer a copyright indemnity: if sued over code their tool generated, the vendor defends you and covers the judgment, under specific conditions (safety filters on, plan-tier requirements). This is a commercial promise, not a legal ruling - read the actual conditions attached.
A practical team rule
Treat AI-generated code like a contributor's pull request: someone reviews it, someone is accountable, and if output looks like a verbatim copy of something recognizable, check it before merging.
EXAMPLE
A rough decision map (US-centric, as of 2026, not legal advice): Scenario: You prompt a model, get a function back, ship it unedited. -> Copyrightability of that specific function: doubtful under current US Copyright Office guidance (prompting alone isn't enough human authorship). Scenario: You prompt a model, get a first draft, then substantially restructure it, rename things for your architecture, and add real logic. -> Your edits and creative arrangement are more likely protectable; the question shifts to "how much of this is really yours now." Scenario: A third party sues your company claiming your AI-assisted code copies their proprietary algorithm. -> Whether your vendor's indemnity applies depends entirely on the fine print: was the disputed code actually vendor-generated and largely unmodified, was the relevant safety filter on, and does your plan tier include the commitment at all. Team-rule template for a CONTRIBUTING.md: "AI-assisted code is welcome. Before merging: (1) a human has reviewed and understood every line, (2) nothing looks like a verbatim copy of a specific, recognizable existing project, (3) commit message notes if a PR is substantially AI-generated vs. AI-assisted."
๐ ๏ธ EXERCISE โ TRY IT YOURSELF
Audit a real (or hypothetical) piece of AI-assisted code in your own project for provenance.
- Pick a recent PR or file where you used an AI coding tool.
- Estimate roughly what fraction was used essentially unedited vs. substantially reworked by you.
- Check whether your team has any convention for flagging AI-generated vs. AI-assisted code - if not, note that as a gap.
- Look up whether the specific tool you used offers any copyright indemnity, and read the actual conditions attached (not just the headline claim).
- Draft one sentence for your team's contributing guide that states your actual practice around reviewing AI-generated code before merge.
โ SELF-CHECK
- โ Could you clearly explain, for the code you audited, how much of it was human-directed structure/logic vs. largely AI output kept as-is?
- โ Did you find and actually read the specific conditions attached to any indemnity claim, rather than just trusting the marketing headline?
QUICK QUIZ
According to the US Copyright Office's 2025 guidance, why doesn't 'just prompting' a model typically qualify as copyrightable human authorship?
SOURCES
- U.S. Copyright Office: NewsNet โ Copyright and Artificial Intelligence, Part 2: Copyrightability โ www.copyright.gov
- Anthropic: Expanded Legal Protections and Improvements to Our API โ www.anthropic.com
- GitHub Copilot Trust Center: FAQ (IP Indemnity) โ copilot.github.trust.page