# Can AI-generated code be copyrighted in the US?

Source: https://codelifter.com/forum/posts/can-ai-generated-code-be-copyrighted-in-the-us/
Site: CodeLifter Forum, category AI code policies
Published: 2026-11-18. Updated: 2026-11-18. Replies: 1.

## Question by CodeLifter editors (staff), 2026-11-18

Not on its own. In the US, copyright protects only human authorship, so code whose expressive choices were made by an AI model is not protected, however good the prompt. Code you wrote, chose, arranged or substantially changed yourself is protected, and using an assistant along the way does not cancel that. This is not legal advice.

## What does US law actually say?

Two official sources set the position for anyone writing code with an assistant.

The **US Copyright Office** issued registration guidance on 16 March 2023 ([policy statement](https://www.copyright.gov/ai/ai_policy_guidance.pdf), published at 88 Fed. Reg. 16,190). It says "copyright can protect only material that is the product of human creativity", and that when an AI system "receives solely a prompt from a human and produces complex written, visual, or musical works in response, the 'traditional elements of authorship' are determined and executed by the technology, not the human user." Its comparison is useful for prompts: they "function more like instructions to a commissioned artist."

The Office's later report, **Copyright and Artificial Intelligence, Part 2: Copyrightability**, was released on 29 January 2025. The Office's [announcement](https://www.copyright.gov/newsnet/2025/1060.html) summarises its conclusion: outputs of generative AI "can be protected by copyright only where a human author has determined sufficient expressive elements", which can include a human-authored work perceptible in the output, or "creative arrangements or modifications of the output, but not the mere provision of prompts." It adds that using AI "to assist in the process of creation or the inclusion of AI-generated material in a larger human-generated work does not bar copyrightability."

The courts agree on the core point. In *Thaler v. Perlmutter*, decided on 18 March 2025, the D.C. Circuit held that "the Copyright Act of 1976 requires all eligible work to be authored in the first instance by a human being" ([opinion on copyright.gov](https://www.copyright.gov/ai/docs/court-of-appeals-decision-affirming-refusal-of-registration.pdf)). That case was about a work listing a machine as its sole author; the court said disputes over "how much artificial intelligence contributed to a particular human author's work" were not before it.

## How does that apply to code?

The Copyright Office treats software alongside other written works (its 2023 listening session on AI was titled "Literary Works, Including Software" on its [AI initiative page](https://www.copyright.gov/ai/)), so the same human authorship test applies, choice by choice. A rough guide, based on the sources above:

| How the code came about | Likely status |
| --- | --- |
| You wrote it; an assistant only completed a variable name or closing bracket | Yours; the guidance says tools can be "part of the creative process" |
| An agent generated a whole module from a one-line prompt and you shipped it unchanged | The generated expression is not protected |
| You generated several functions, then chose, ordered and wired them into your own design | Your selection and arrangement can be protected; the generated parts themselves are not |
| You rewrote generated code substantially | Your modifications can be protected if they meet the usual originality standard |

The 2023 guidance puts the mixed case precisely: copyright "will only protect the human-authored aspects of the work, which are 'independent of' and do 'not affect' the copyright status of the AI-generated material itself." For a repository, that means one project can contain protected and unprotected code side by side.

Prompts deserve one more note. A footnote in the guidance says some prompts "may be sufficiently creative to be protected by copyright," but "that does not mean that material generated from a copyrightable prompt is itself copyrightable." A long, careful prompt can be your work; the code it produced still is not, unless you shaped the expression.

Checked on 12 November 2026.

## What if you want to register code you wrote with an assistant?

Registration is optional for owning a copyright; the Thaler opinion notes ownership "does not depend on registration or publication", though registration is generally needed before a domestic author can sue. If you do register, the 2023 guidance sets the rules:

1. Use the Standard Application, not the Single Application.
2. Describe the human contribution in the "Author Created" field.
3. Exclude AI-generated material that is "more than de minimis" under "Material Excluded", for example "[description of content] generated by artificial intelligence."
4. Do not list an AI tool or its company as an author or co-author.
5. If an earlier registration did not disclose AI material, correct it with a supplementary registration. The guidance warns that registrations with essential information omitted may be cancelled.

If you are unsure, the guidance allows "a general statement that a work contains AI-generated material", and the Office will follow up.

## What records help show human authorship?

The registration process asks you to describe what a human did, so keep that information as you work rather than reconstructing it later:

- Commit AI-generated code in separate commits, with a trailer or note saying which tool produced it.
- Keep the prompts and the raw output for significant generated sections.
- Note design decisions you made: architecture, data model, which of several generated options you kept and why.
- Record substantial rewrites as your own commits.

CodeLifter's [who owns AI-generated code](https://codelifter.com/provenance/who-owns-ai-generated-code/) guide covers ownership questions beyond registration, and the [MIT licence thread](/forum/posts/can-you-put-ai-generated-code-under-the-mit-licence/) explains what a licence does and does not cover in a mixed repository.

## Short version

- US copyright needs a human author; purely AI-generated code is not protected.
- Prompts alone do not make you the author of the output, even detailed ones.
- Your own code, your selection and arrangement, and substantial modifications can be protected.
- Registering a mixed work means disclaiming AI material that is more than de minimis.
- Keep records of what you wrote and what the tool wrote. This is not legal advice; ask a lawyer for a real decision.

## Reply 1 by CodeLifter editors (staff), 2026-11-18

**Does iterating with many follow-up prompts make you the author?** On the Copyright Office's current reading, usually not by itself. The [2023 registration guidance](https://www.copyright.gov/ai/ai_policy_guidance.pdf) addresses this directly in a footnote: some tools let users "provide iterative 'feedback' by providing additional prompts", and while "such instructions may give a user greater influence over the output, the AI technology is what determines how to implement those additional instructions."

For code, that covers the common loop of "now add error handling", "rename that", "split this into two functions". Each turn steers the result, but the model still writes the lines. The Office's [Part 2 announcement](https://www.copyright.gov/newsnet/2025/1060.html) repeats the line that "the mere provision of prompts" is not enough.

What changes the picture is when you take over the expression: editing the code yourself, writing parts by hand, or making creative choices about selection and arrangement that the model did not make. The guidance's test is "the extent to which the human had creative control over the work's expression." So if authorship matters for a project, the practical step is to do meaningful parts of the writing yourself and commit them as your own work, rather than relying on a long prompt history. This is not legal advice.

---
Cite as: CodeLifter Forum, "Can AI-generated code be copyrighted in the US?", https://codelifter.com/forum/posts/can-ai-generated-code-be-copyrighted-in-the-us/, accessed 2026-11-18.
