Who Owns AI-Generated Code? Copyright, IP & Legal Risks for Developers (2026)
You asked an AI to write a React component. It spit out 40 lines of clean, working code. You shipped it. But here’s the question almost nobody stops to ask: do you actually own that code?
The answer matters more than you think. If you can’t copyright it, you can’t enforce it. If it contains fragments of someone else’s GPL-licensed work, you might owe the world your entire codebase. And if your employer’s contracts assume you own everything you produce — well, that assumption might be wrong.
This guide breaks down where the law actually stands in April 2026, what the major court cases mean for working developers, and what you should do about it right now.
Disclaimer: This article is for informational purposes only and does not constitute legal advice. Consult a qualified attorney for guidance on your specific situation.
The short answer
It depends on how much you contributed.
US copyright law requires human authorship. If an AI generates code entirely on its own — you typed a prompt, it wrote everything — that output likely cannot be copyrighted. It sits in the public domain. Anyone can use it, and you have no exclusive rights.
But if you substantially shaped, edited, architected, or rewrote the AI’s output, the result can be copyrighted — as your work. The key threshold is whether your human contribution is “sufficiently creative.” A one-line prompt doesn’t cut it. Designing the system architecture, writing detailed specifications, selecting and arranging AI outputs, and heavily refactoring the result probably does.
The problem: there’s no bright line. And the cases that are defining that line are still playing out.
Key court cases and what they mean
Thaler v. Perlmutter — pure AI output isn’t copyrightable
Stephen Thaler tried to register a copyright for artwork generated entirely by his AI system, DABUS. The Copyright Office refused. The court agreed. The Supreme Court declined to hear the appeal, effectively settling the question for now: purely AI-generated works cannot be copyrighted under US law.
What this means for you: if you use an AI coding tool to generate code and ship it without meaningful human modification, you likely have no copyright protection on that code.
Doe v. GitHub (Copilot settlement, Nov 2025) — the training data problem
This class action alleged that GitHub Copilot reproduced verbatim snippets from open-source repositories it was trained on — without respecting the licenses attached to that code. The November 2025 settlement didn’t find Copilot “guilty,” but it forced real changes:
- GitHub must offer strict duplication filters that block verbatim matches against training data
- An attribution option that surfaces the likely source of suggested code
- Crucially, no ownership transfer — using Copilot doesn’t give GitHub rights to your code
This is the settlement that directly changed how Copilot works today. If you haven’t enabled the duplication filter and license blocking features, you should. More on that below.
Bartz v. Anthropic — the $1.5 billion wake-up call
The largest AI copyright settlement to date. Authors alleged that millions of pirated books were used to train Claude. Anthropic settled for $1.5 billion. The case didn’t produce a court ruling on the merits, but the sheer size of the settlement sent a clear signal: using copyrighted material to train AI models carries enormous financial risk.
For developers, this matters because it shapes how AI companies handle training data going forward — and how cautious they’ll be about what their models reproduce.
UMG v. Udio — consent matters
This music industry case established the opt-in principle: creators must consent before their work is used for AI training. While it originated in the music space, the legal reasoning applies broadly. Expect this principle to influence how code repositories handle AI training permissions.
NYT v. OpenAI — still ongoing
The New York Times argues that ChatGPT can reproduce its articles nearly verbatim. This case is still in litigation and could set major precedent on whether AI outputs that closely mirror training data constitute infringement. If the NYT wins, the implications for code generation tools that reproduce training data patterns would be significant.
What the US Copyright Office actually says
The Copyright Office has been surprisingly clear, issuing guidance in March 2023 and reaffirming it in 2024:
- AI-generated content lacks the human authorship required for copyright registration. No human author, no copyright.
- AI-assisted works can be registered — but only the human-authored portions are protected. If you write 70% of a file and an AI writes 30%, your 70% is copyrightable. The AI’s 30% is not.
- You must disclose AI involvement when registering a copyright.
Then in May 2025, the Office weighed in on the training side: when AI training competes with licensing opportunities for the original work, fair use weighs against the AI company. This is a big deal — it means training an AI on code that has commercial licensing value (think proprietary SDKs, premium libraries) is increasingly legally risky for AI providers.
The EU angle
Europe is moving faster on regulation, and two developments matter:
Like Company v. Google (March 2026) landed at the EU Grand Chamber — the first case directly asking whether LLM training on copyrighted material violates EU law. A ruling here could force AI companies to obtain explicit licenses for European training data, or stop using it entirely. This case is ongoing and could reshape the global AI training landscape.
The EU AI Act is also now in effect, imposing transparency requirements on AI systems. For developers working with EU data or EU clients, this intersects directly with GDPR compliance and data privacy obligations. AI-generated code that processes personal data still needs to meet all the usual requirements — the fact that an AI wrote it doesn’t create any exemptions.
Practical risks for developers
Beyond the abstract copyright question, there are concrete risks you need to manage:
Open-source license contamination. AI models trained on open-source code can reproduce snippets that carry license obligations. If Copilot suggests a function that’s actually from a GPL-licensed project, and you put it in your proprietary codebase, you may have just violated that license. The Copilot settlement’s duplication filter helps, but it’s not perfect.
GPL “infection.” GPL requires that derivative works also be GPL-licensed. If AI-generated code in your proprietary product contains GPL fragments, the entire project could theoretically be subject to GPL terms. This is the nightmare scenario for commercial software teams.
No provenance trail. When a human developer copies code from Stack Overflow, there’s a URL, a timestamp, a license. When an AI generates code, there’s often no record of where it came from. This makes compliance auditing extremely difficult.
Contractual mismatches. Your employment contract or client agreement probably says you own (or assign) all code you produce. But if AI-generated portions aren’t copyrightable, you’re assigning rights to something you don’t own. This creates legal ambiguity that could surface during acquisitions, audits, or disputes.
How to protect yourself
Here’s what you can do today:
1. Document your human contribution. Keep records of your architecture decisions, design docs, detailed prompts, and the modifications you made to AI output. If you ever need to prove “sufficiently creative” human authorship, this documentation is your evidence.
2. Configure your tools properly. Enable Copilot’s strict duplication filter and license blocking. Check the settings on whatever AI coding agent you use — most now offer some form of provenance or filtering controls post-Copilot settlement.
3. Review AI output before committing. Treat AI-generated code like code from an untrusted contributor. Review it for quality, security, and — yes — potential license issues. Don’t blindly accept suggestions.
4. Update your contracts. If you’re a freelancer or run an agency, your contracts should address AI-assisted work. Clarify ownership, disclose AI usage where required, and don’t promise copyright protection you can’t guarantee.
5. Track AI usage in your workflow. Some teams now tag commits or PRs that involved AI generation. This isn’t just good hygiene — it creates the provenance trail that’s otherwise missing.
6. Check your AI provider’s data practices. Understand whether your code is being used to train models. Review the privacy policies and API terms of the tools you use.
What this means for AI coding tools
The legal landscape is actively reshaping how tools operate:
- GitHub Copilot now offers strict duplication filters and license blocking as a direct result of the Doe v. GitHub settlement. These should be enabled by default for any commercial project.
- Claude Code and other Anthropic tools are operating in the shadow of the $1.5B Bartz settlement. Expect increasingly conservative guardrails around code that might reproduce training data.
- Cursor, Windsurf, and other IDE-integrated tools vary widely in their filtering and attribution capabilities. Check what each offers before relying on them for production code.
The trend is clear: AI coding tools are adding more safeguards, more filters, and more transparency. But the responsibility still falls on you — the developer — to use them correctly and understand the limits.
Bottom line
The law is catching up to AI-generated code, but it’s not there yet. Here’s where things stand:
- Pure AI output = likely not copyrightable. You can use it, but so can everyone else.
- AI-assisted work with substantial human contribution = copyrightable. But you need to be able to prove that contribution.
- AI-generated code can carry hidden license obligations. Use filters, review output, track provenance.
- The legal landscape is shifting fast. NYT v. OpenAI and Like Company v. Google could change the rules again within months.
The safest approach: treat AI as a powerful junior developer. It writes drafts. You architect, review, modify, and take responsibility. Document that process. Configure your tools. And keep an eye on the cases that are still being decided — because the rules of this game are still being written.
For more on navigating AI tools responsibly, check out our 2026 guide to the best AI coding tools and our deep dive on AI and data privacy for developers.