Skip to main content
Building with AI (Vibe Coding)

⏱ About 20 min20 XP

Who Owns AI-Built Code?

When a programmer writes code, the question of who owns it has a clear — if complicated — legal framework. When an AI writes the code, that framework develops cracks. Ownership of AI-generated work is one of the most contested legal and ethical questions in technology today, and the answers will directly affect every builder in this generation.

Copyright, Authorship, and the Human Requirement

Copyright is a legal right that grants the creator of an original work exclusive control over its reproduction, distribution, and adaptation. In most jurisdictions, copyright attaches automatically at the moment of creation — you do not need to register or apply. The foundational requirement in most legal systems, including in the United States, is that a work must be created by a human being to receive copyright protection. The U.S. Copyright Office has stated explicitly that it will not register works produced by a machine without creative input from a human author. This creates an immediate question for AI-generated code: if an AI model writes a function in response to a prompt, who holds the copyright? The current best answer — though it is evolving rapidly and varies by country — is: The AI system itself cannot hold copyright (it is not a legal person). The AI company that built the model may have claims based on the training data and model outputs, though this is actively contested in courts. The user who wrote the prompt may hold copyright over the elements that reflect their creative choices — but a short, generic prompt may not be creative enough to generate authorship rights. The result may be that some AI-generated code falls into the public domain — owned by no one — which has its own implications for commercial use. In 2023, the U.S. District Court for the District of Columbia ruled in Thaler v. Perlmutter that an image generated by an AI without human creative input could not be copyrighted. Similar questions are being litigated for code.

Copyright: Precise Definition

Copyright is an exclusive legal right granted to the creator of an original work, giving them control over reproduction, distribution, modification, and public display. It arises automatically at creation in most countries and lasts for the creator's lifetime plus 70 years in most jurisdictions. Its application to AI-generated outputs is currently unsettled law.

Three practical positions exist for a builder working with AI-generated code today: Position 1 — Treat it as public domain: assume AI-generated code you did not materially modify carries no copyright you can enforce. Do not build a business dependent on exclusive ownership of such code. Position 2 — Establish human creative contribution: write detailed prompts, make meaningful edits, combine AI outputs with your own logic. Courts and the Copyright Office are more likely to recognize copyright when the human contribution is substantial and demonstrable. Position 3 — Consult terms of service: AI coding tools have their own licensing terms. GitHub Copilot's terms, for example, specify that you own the output of your use of the product. These terms are contractual, not legal copyright — they can be revised and are not identical across all tools. For practical purposes in a high school or early college project, ownership questions are rarely pressing. They become significant when you commercialize, open-source, or attempt to protect something you built.

Ownership Beyond Copyright: Accountability

Even where copyright is unclear, one form of ownership is unambiguous: operational ownership — the responsibility to fix, improve, and answer for software you deploy. If you ship a product and it causes harm, copyright ambiguity does not shield you from liability. If your app stores user data insecurely and that data is breached, the question of who 'owns' the AI-generated encryption function is legally irrelevant. You deployed it. You are the operator. This distinction — between intellectual property ownership (unclear for AI code) and operational ownership (always clear: the person who ships is responsible) — is critical for every builder to internalize.

The Terms-of-Service Layer

When you use an AI coding tool, you are bound by its terms of service. Some tools prohibit certain commercial uses of their outputs. Some claim a license to your prompts or outputs for training future models. Read the terms of any tool you use in a project you intend to ship or commercialize. Ignorance of the terms is not a defense.

The U.S. Copyright Office has stated it will not register works produced by machines without human creative input. What does this mean for a function generated entirely by an AI with no human editing?

A student ships an app containing AI-generated code that processes user payments. The code has a bug that overcharges users. The student says 'the AI wrote it.' Who bears operational responsibility?

Ownership Scenarios Analysis

  1. Read each scenario below and write one to two sentences analyzing: (a) who likely owns copyright, and (b) who bears operational responsibility.
  2. Scenario A: A developer writes a 400-word, highly specific prompt describing a novel sorting algorithm, reviews the output carefully, and ships it in a commercial product.
  3. Scenario B: A student types 'write me a login form' into an AI tool, copies the output without reading it, and deploys it.
  4. Scenario C: A team uses an AI tool to generate 80% of their codebase, makes substantial edits to the remaining 20%, and publishes the project as open source under the MIT license.
  5. After analyzing all three, write a short paragraph: what principle or heuristic would you use to guide your own approach to AI-generated code ownership?