Blog
4 min read

Who Owns AI-Generated Code? Copyright, Licences, and What It Means for Your App

If an AI wrote your app's code, who owns it? What AI providers' terms say, why copyright law cares about human authorship, the risk of code that resembles open-source projects, and practical steps to protect a product built with AI.

You described an app, an AI wrote the code, and now you want to sell it, raise money on it, or hand it to a client. A reasonable question follows: who owns that code?

The honest answer is "mostly you, in practice — but with some legal uncertainty worth understanding." This article explains the moving parts in plain English.

This is general information, not legal advice. Laws differ by country and are still developing. For anything with real money at stake, talk to a lawyer where you live.

Two separate questions

People mix up two questions that have different answers:

  1. Contract: Does the AI company claim any rights over what its tool produced for you?
  2. Copyright: Does the law treat AI-written code as something anyone can own at all?

Question 1: What the AI providers say

The major AI coding providers' commercial terms generally say that you own the output — the company doesn't claim it, and assigns to you whatever rights it might have. Some providers also offer indemnity on business plans: if someone sues you claiming the output infringes their copyright, the provider will defend you, subject to conditions.

So contractually, the AI company isn't going to come after your code. Read the terms for the specific plan you use — consumer and business terms sometimes differ, and indemnity usually applies only to paid business plans.

Copyright protects works of human authorship. In the United States, the Copyright Office has said that material generated entirely by AI isn't protected by copyright, that writing prompts alone generally isn't enough to make you the author, and that human contributions — selecting, arranging and modifying AI output, or writing parts yourself — can be protected. US courts have so far upheld the human-authorship requirement. Other countries are working through the same questions, with different answers emerging.

What that means in practice

  • The parts you meaningfully shape are on firmer ground. Designing the structure, choosing what to keep, rewriting, and combining AI output with your own work all count as human contribution.
  • Raw AI output with no human changes is the weakest. A competitor copying a purely AI-generated file may be hard to stop with copyright alone.
  • Your app is more than its code. Your brand, your domain, your customer relationships, your data, and your trade secrets don't depend on copyright in the source code at all.

For most small products, the realistic risk isn't "someone copies my code and I can't sue" — it's that a buyer, investor or client asks about it during due diligence. Being able to explain your process helps.

The other risk: code that resembles someone else's

AI models learned from enormous amounts of public code, including open-source projects with licences. Occasionally an AI reproduces a recognisable chunk of existing code. If that code was under a licence like the GPL, using it can come with obligations — such as releasing your own source.

This is uncommon for ordinary app code, but worth guarding against:

  • Be suspicious of long, distinctive blocks — a whole algorithm or file that looks lifted from somewhere.
  • Use the tools' filters if your AI provider offers a setting that blocks suggestions matching public code.
  • Know your dependencies' licences, which matter far more than snippets. See open source licences explained.

Practical steps to protect your product

  1. Keep your project in git with a clear history. Commits show your process: what you asked for, what you changed, what you rejected.
  2. Make real decisions and edits. Review, restructure, rename, and rewrite — good engineering and better ownership at once.
  3. Document how you built it in your README: tools used, what you designed, what was generated.
  4. Choose plans with the terms you need. If you're building a business, look for business terms and indemnity.
  5. Get contracts right with clients. If you build for others, your contract should say who owns the result and that AI tools were used. See how to hand off an AI-built app to a client.
  6. Protect what matters most: trademarks for your name, terms of service, and keeping your secrets secret.

The summary

  • AI providers' terms generally give you the output.
  • Copyright law in the US requires human authorship, so purely AI-generated code has weak protection; your edits and design choices strengthen it.
  • Occasionally AI reproduces existing licensed code — watch for long distinctive blocks.
  • Your brand, data and customers matter more to your business than copyright in the code.

EasySpawn works with GitHub as the home of your code, so every change Claude Code makes is a commit or pull request you review and approve — a clear record of what was generated and what you decided. See how it works or join the waitlist.

Related: What Is Vibe Coding? · Write Good Commit Messages · Technical Debt in AI-Built Apps · Does My App Need a Privacy Policy?

Keep reading