Who owns AI-generated code?
Short answer
Under US law, code an AI generates from prompts alone has no copyright owner; only the parts a person wrote, edited creatively, or selected and arranged are protected.
The US Copyright Office said so in its January 2025 report, and in March 2025 the D.C. Circuit held in Thaler v. Perlmutter that the Copyright Act requires a human author. Tool terms sit on top: GitHub's Terms of Service say GitHub does not claim ownership of AI output and leave licence checks to you. This page explains published rules; it is not legal advice.
Three things that decide it
- Human Copyright does not extend to purely AI-generated material, and prompts alone do not provide sufficient control, per the Copyright Office in January 2025. US Copyright Office, Part 2 report
- 2025 On 18 March 2025 the D.C. Circuit affirmed that a work listing an AI system as its sole author cannot be registered. Thaler v. Perlmutter, No. 23-5233
- Terms GitHub does not claim ownership of Input or Output, and you must check whether Output needs a third-party licence. GitHub Terms of Service, Section J
Who owns AI-generated code under US copyright law?
Nobody owns the purely generated part, because copyright never attaches to it. The US Copyright Office set this out in Copyright and Artificial Intelligence, Part 2: Copyrightability, published in January 2025. The report concludes that copyright does not extend to purely AI-generated material, or material where there is insufficient human control over the expressive elements. The same report says copyright still protects the original expression a human author puts into a work, even if the work also includes AI-generated material.
For a developer, that splits a file into layers. The lines you wrote are yours, or your employer's. The lines a model produced from your instructions, accepted unchanged, are probably unprotected. Your choices about which generated pieces to keep, how to edit them and how to fit them together may be protected, judged case by case. Unprotected does not mean free of other people's rights: generated code can still reproduce someone else's licensed code, which is a separate licensing question.
The report also mentions software directly. It notes that programmers already use automated tools to modify code, for example to refactor it or translate it between languages. The line the Office draws is between AI as a tool that assists a person and AI as a stand-in that makes the expressive choices itself.
How much human input counts?
There is no line count. The Office's earlier registration guidance, published in the Federal Register on 16 March 2023 (88 FR 16190), frames the test as whether the traditional elements of authorship were conceived and executed by a person or by a machine. It compares prompts to instructions given to a commissioned artist: they say what the prompter wants, but the machine decides how to carry them out.
The same guidance names two ways a person adds protectable authorship to generated material. One is selecting or arranging it in a sufficiently creative way. The other is modifying it so far that the modifications themselves meet the standard for protection. In both cases copyright covers only the human-authored aspects. Applicants registering a work must exclude AI-generated content that is more than de minimis and describe what the human contributed.
Applied to code, a long chat with an assistant still counts as prompting under this framing; the guidance notes that iterative feedback gives the user more influence, but the technology still decides how to carry it out. Rewriting a generated function's logic, restructuring a module by hand, or writing the tests and architecture the generated parts slot into are the kinds of work that look like authorship.
What did the court decide in Thaler v. Perlmutter?
On 18 March 2025, a three-judge panel of the US Court of Appeals for the D.C. Circuit decided Thaler v. Perlmutter, No. 23-5233. Stephen Thaler had listed his system, the Creativity Machine, as the sole author of an image. The court affirmed the refusal to register it, holding that the Copyright Act of 1976 requires all eligible work to be authored in the first instance by a human being.
The opinion is careful about scope. It says the human authorship requirement does not prohibit copyrighting work made by or with the assistance of AI; it requires only that the author be the person who created, operated or used the AI, not the machine itself. Because Thaler named the machine as sole author, the court did not decide how much human contribution is enough in mixed work.
Other countries take different approaches. Section 9(3) of the UK Copyright, Designs and Patents Act 1988 says that for a computer-generated literary, dramatic, musical or artistic work, the author is taken to be the person by whom the arrangements necessary for its creation are undertaken. Check the law where you publish or sell.
Does my employer or client own the code I generated?
For the human-written parts, usually yes. The D.C. Circuit opinion explains that the work-made-for-hire provision, 17 U.S.C. 201(b), lets the employer be considered the author and own the rights, but only for work originally created by a human; it cannot turn machine output into protected work. The opinion also notes that transferring copyright requires a signed instrument of conveyance.
That leaves a practical gap. A client who pays for a codebase expects to own it, and the generated parts may carry no copyright to hand over. Read originality and assignment clauses before you deliver code that is mostly generated, and say in writing how assistants were used.
What do AI coding tool terms say about ownership?
Tool terms decide what the vendor claims, not whether copyright exists. Section J of the GitHub Terms of Service, effective 27 April 2026, states that GitHub does not claim ownership of your Input or Output. The same section warns that Output may resemble code in the model's training data or be subject to third-party copyrights or open source licence terms, and makes you responsible for determining whether your use requires a third-party licence.
Other assistants such as ChatGPT, Gemini or Cursor publish their own terms. Read the current version for the plan you use, and save a dated copy.
What should a developer record?
Record which tool produced which parts, with dates; a commit trailer or pull request note is enough. Record what you changed by hand after generation, because that is the evidence of human authorship if it is ever questioned. Keep any public-code match the tool reported, the tool's terms as they stood when you used it, and any client clause on originality or AI use.
Accepting a suggestion is not authorship; rewriting, selecting and arranging it can be, and only the human part is protected.
How we checked
Checked on 2026-10-15 by the CodeLifter editors: the executive summary of the Copyright Office's Part 2 report (January 2025), the full text of the 16 March 2023 registration guidance on the Federal Register, the full D.C. Circuit opinion in Thaler v. Perlmutter, Section J of the GitHub Terms of Service (effective 27 April 2026) and section 9 of the UK Copyright, Designs and Patents Act 1988. We did not review other courts, later appeal history, or the terms of any assistant other than GitHub Copilot. Drafted with AI assistance; every claim checked against its source. Not legal advice.
Questions and answers
Is AI-generated code copyrighted?
Not when it is purely generated. The US Copyright Office's January 2025 report says copyright does not extend to purely AI-generated material or material without sufficient human control over its expressive elements. Human-written parts and creative edits are protected.
Do I own code that GitHub Copilot writes for me?
GitHub does not claim it: Section J of the GitHub Terms of Service says GitHub does not claim ownership of your Input or Output. Whether copyright exists in that output is a separate question, and for unedited suggestions the Copyright Office's answer is usually no.
Does writing a detailed prompt make me the author?
No, under current US guidance. The Copyright Office's January 2025 report concludes that, based on current generally available technology, prompts do not alone provide sufficient control.
Can I copyright a program that includes AI-generated code?
Yes, for the human-authored parts. The March 2023 guidance says applicants should claim the human contribution and exclude AI-generated content that is more than de minimis.
Does my employer own code I generate with AI at work?
Your employer owns the human-authored parts under work made for hire, 17 U.S.C. 201(b). The D.C. Circuit noted that this provision transfers rights a human author created; it cannot create rights in material no human authored.
Is AI-generated code public domain everywhere?
No single answer applies. This page covers US law; the UK, for example, has a specific rule for computer-generated works in section 9(3) of its 1988 Act. Check the law where you publish, and ask a lawyer.
Is this page legal advice?
No. It summarises US Copyright Office documents, one appeals court decision, one UK statute section and GitHub's published terms as checked on 15 October 2026.
Sources
An editor checked every claim on this page against these sources on 2026-10-15. If a source has changed since, the source is the authority.

