Who Owns the Code an AI Wrote for You?

The current US position on AI-generated code copyright, why creative input matters, and why this is not the same answer everywhere. Not legal advice.

Developer reviewing AI-generated code alongside copyright and legal symbols representing code ownership questions.

This is a genuinely unsettled area of law and this article is not legal advice. What follows is a summary of publicly reported positions, each attributed to its source, so you know what is actually being said and by whom before deciding whether to ask a lawyer about your specific situation. The short version: the US Copyright Office’s position, upheld through the Thaler line of cases, is that copyright protection requires human authorship, and code generated by a model with no meaningful human creative input has no copyright owner under that framework, not you and not the AI provider. How much creative input you provided, direction, editing, structural decisions, is the detail that actually matters, and it is not the same answer in every jurisdiction.

The current US position, and its limits

Copyright, under the framework the US Copyright Office has applied and that the DC Circuit upheld in the Thaler case, protects work that has a human author. Output that is purely machine-generated, with no human creative contribution, falls outside that protection entirely under this reasoning. That does not mean nobody can ever own AI-assisted code. It means the ownership question turns on how much human creative input actually went into the result, not on whether an AI tool was involved at all.

A developer who accepts a single autocompleted line or a short suggestion within a function they otherwise wrote and structured has a reasonably strong claim to authorship over that function as a whole, since the human contribution is substantial and the AI’s role was narrow. A developer who prompts an assistant to generate an entire module from a high-level description, and ships it with minimal editing, has a considerably less clear claim, because the human creative contribution in that case is thinner and the question of where the model’s contribution ends and the human’s begins is genuinely harder to answer. Nothing about this piece tells you which side of that line your specific code falls on: that is a fact-specific legal question, not a general rule this article can resolve for you.

Why “the AI wrote it” is not itself the deciding question

It is tempting to treat “AI-generated” as a single category with one answer. The reporting on this consistently frames it differently: the deciding factor is the degree of human creative input and direction, not simply whether an AI tool touched the code at any point. This is also why platform terms of service that describe you as receiving ownership of generated output do not settle the underlying question. A contract between you and an AI vendor can grant you rights the vendor holds, but it cannot manufacture statutory copyright protection where the human-authorship requirement is not otherwise met. Read together, that means a favorable terms-of-service clause and an actual, defensible copyright claim are two different things, and having one does not guarantee the other.

A different jurisdiction, a different answer

This is squarely why “who owns AI-generated code” cannot be answered as a single global fact. Reporting on UK law describes the position there as having already been settled, from a different starting point than the US framework above, specifically around works generated by a computer with no human author, a category UK law has addressed directly rather than through case law interpretation. The detail that matters here is not which jurisdiction is “right.” It is that a developer working across borders, or a company with users or contributors in multiple countries, cannot assume the US analysis above transfers unchanged to every jurisdiction their code touches.

What this means practically

Nothing here tells you whether your specific code is protected, unprotected, or safe to commercialize as written, because that genuinely depends on facts this article has no way to know: how much you wrote versus generated, how much you edited, which jurisdiction’s law actually applies to your situation, and what you intend to do with the result. What can be said generally is where the line of questioning actually goes: how much genuine creative and structural input did a human provide, which jurisdiction governs the work, and does anything in the code itself (a separate question, covered in the piece on open-source license contamination in AI-generated code) carry an obligation independent of who owns it. For anything commercially significant, a mixed-authorship codebase you plan to sell, license, or rely on legal protection for, that combination of open questions is exactly the point at which a lawyer, not a blog post, is the right next step.

FAQ

If I heavily edit AI-generated code, do I own it?
Substantial human creative input strengthens an authorship claim under the US framework described above, but “heavily edited” is not a precise legal threshold and this article cannot tell you where your specific edits land. That determination depends on the facts of what was changed and how.

Does accepting an AI tool’s terms of service mean I automatically own what it generates?
A terms-of-service clause can assign you rights the vendor holds, but it does not by itself create statutory copyright protection if the underlying work does not meet the human-authorship requirement. The two are related but not the same thing.

Is the answer the same in every country?
No. UK law has addressed computer-generated works with no human author directly, differently from how the US framework above analyzes the question. Do not assume one jurisdiction’s answer applies to your project if it touches more than one.

Can I copyright code I wrote using an AI autocomplete feature like Copilot?
A short autocompletion accepted within work you otherwise authored and structured is generally treated as a stronger claim than a large generated block accepted with minimal editing, but this is not a bright-line rule this article can apply to your specific code.

Should I ask a lawyer about this, or is this settled enough to not worry about?
For anything you plan to commercialize, license restrictively, or rely on copyright protection for, this is genuinely unsettled enough across jurisdictions that a lawyer familiar with your specific situation is the appropriate next step, not a general article.

Written by

Shah Alom

Leave a Reply

Your email address will not be published. Required fields are marked *