Who Owns AI-Generated Code? Copyright Basics Before You Ship It
Copyright law in the US only protects human authorship — which puts a meaningful amount of AI-assisted code in a legal gray zone worth understanding before you rely on it.
This is a summary of general principles, not legal advice for your specific situation — talk to an actual lawyer before making a decision that depends on the answer. With that said, the basic shape of the issue is worth understanding before you ship code you didn't fully write yourself.
US copyright law protects "original works of authorship," and the Copyright Office has taken a consistent position that purely AI-generated output, with no human creative input, isn't eligible for copyright protection at all — there's no human author to attach the copyright to. That matters less for a single function and more for a codebase you're hoping to protect as a commercial asset.
Code that's substantially human-directed — where you wrote the actual logic and used an assistant for boilerplate, or where you made enough creative choices about structure and implementation that the result reflects your own authorship — is much more clearly protectable, the same as it would be if you'd looked up a pattern in a book and adapted it. The harder cases are large blocks generated with minimal human input beyond a prompt, where it's genuinely unclear how much human authorship a court would find.
A separate question from ownership is licensing: a coding assistant trained on public code might reproduce a recognizable snippet from a specific open-source project, which could carry that project's license obligations whether or not you knew the snippet's origin. Most major vendors now offer some form of code-reference filtering or indemnification to reduce this risk, but it's worth checking your specific tool's terms rather than assuming it's handled.
The practical takeaway isn't to avoid AI-assisted code — it's to know that "who owns this" isn't automatically "you," and that the more of the actual design and implementation decisions are yours, the stronger your position is if ownership or licensing ever gets challenged. For anything going into a product you plan to protect or sell, that's worth a real conversation with counsel rather than an assumption.
