option
Home
News
If ChatGPT produces AI-generated code for your app, who does it really belong to?

If ChatGPT produces AI-generated code for your app, who does it really belong to?

April 15, 2025
221

If ChatGPT produces AI-generated code for your app, who does it really belong to?

In one of my earlier articles on AI and coding, I explored how ChatGPT can rewrite and enhance your existing code. A reader, @pbug5612, raised an intriguing question in the comments:

Who owns the resultant code? What if it contains business secrets - have you shared it all with Google or MS, etc.?

This is a crucial question that doesn't have a straightforward answer. Over the past two weeks, I've consulted with attorneys and experts to get a clearer picture.

Also, since ChatGPT's impressive launch, I've tested numerous AI chatbots. Here's my top pick.

This topic is multifaceted, but attorney Collen Clark from the law firm Schmidt & Clark sums it up well:

Ultimately, until more definitive legal precedents are established, the legal implications of using AI-generated code remain complex and uncertain.

Opinions on this matter are plentiful, and in this article, I'll delve into the copyright implications of using ChatGPT to write your code. In a companion piece, I'll address the liability issues related to AI-generated code.

Who owns the code?

Let's consider a likely scenario. You're developing an application where the majority of the work is yours. You've designed the UI, developed the business logic, and written most of the code. However, you've utilized ChatGPT to create a few modules and integrated that code into your app.

Continue to Part 2: If you use AI-generated code, what's your liability exposure?

So, who owns the code produced by ChatGPT? And does incorporating this code into your application affect your ownership claims over the entire project?

Richard Santalesa, a founding member of the SmartEdgeLaw Group in Westport, Conn., who specializes in technology transactions, data security, and intellectual property, highlights that both contract law and copyright law come into play, and they are treated differently.

From a contractual standpoint, Santalesa believes that most AI code-generating companies will consider their AI-generated code as their own property, similar to other intellectual property they produce.

However, OpenAI, the company behind ChatGPT, does not claim ownership of the content generated. According to their terms of service, "OpenAI hereby assigns to you all its right, title, and interest in and to Output."

Also, AI is increasingly becoming part of businesses. But we need to address these issues first.

Clearly, when developing an application with AI-generated code, it's crucial to thoroughly investigate who owns or claims ownership of what.

For an international perspective, ZDNET spoke with Robert Piasentin, a partner in the Technology Group at McMillan LLP, a Canadian business law firm, based in Vancouver. He notes that ownership concerning AI-generated works remains an "unsettled area of the law."

In 2021, the Canadian agency ISED (Innovation, Science and Economic Development Canada) proposed three approaches to address this issue:

  1. Ownership belongs to the person who arranged for the work to be created.
  2. Ownership and copyright are only applicable to works produced by humans, meaning AI-generated code would not be eligible for copyright protection.
  3. A new "authorless" set of rights should be created for AI-generated works.

Also, a recent GitHub developer survey found that 92% of programmers are using AI tools.

Piasentin, who is also qualified to practice law in England and Wales, mentions: "Much like Canada, there is no English legislation that directly regulates the design, development, and use of AI systems. However, the UK is among the first countries in the world to expressly define who can be the author of a computer-generated work."

"Under the UK Copyright Designs and Patents Act, with respect to computer-generated work, the author of the work is the person who undertook the arrangements necessary to create the work and is the first owner of any copyright in it," he explains.

Piasentin also points out potential precedents from UK case law, not involving AI but video game litigation. In a case before the High Court (similar to the US Supreme Court), it was ruled that images generated within a video game belonged to the game developer, not the player, because the player did not "undertake the necessary arrangements for the creation of those images."

Similarly, Piasentin suggests that "the person who undertook the necessary arrangements for the AI-generated work -- that is, the developer of the generative AI -- may be the author of the work." This doesn't necessarily exclude the prompt-writer from being considered the author.

Moreover, it leaves room for the possibility that the unspecified (and possibly unknowable) author who sourced the training data could also be considered an author of AI-generated code.

Fundamentally, without more established case law, the situation remains unclear.

What about copyright?

It's important to distinguish between ownership and copyright. Ownership gives you control over the source code, including the ability to modify, distribute, and manage the codebase. Copyright, on the other hand, is a legal right granted to creators of original works, essential for controlling who can use or copy the work.

Santalesa views copyright as "one arrow in the legal quiver," providing an additional claim beyond other issues like breach of contract, confidentiality, or misappropriation of IP rights.

The strength of a copyright claim often depends on wilful infringement, which can be tricky to define with AI-generated code.

Also, learn how to use ChatGPT to write code.

The Compendium of the U.S. Copyright Office Practices, Third Edition, clarifies that "a work of 'authorship' must be created by a human being…Works that do not satisfy this requirement are not copyrightable."

It further states that the U.S. Copyright Office "will not register works produced by nature, animals, or plants. Likewise, the Office cannot register a work purportedly created by divine or supernatural beings."

Although the Copyright Office doesn't explicitly address AI-generated works, it's likely that the code ChatGPT produced for you isn't copyrightable.

Also, here are 25 AI tips to boost your programming productivity with ChatGPT.

Piasentin confirms that this applies in Canada as well. Provisions referring to "the life of the author" and the requirement for the author to be a resident of a certain country imply a human creator.

In CCH Canada Ltd. v Law Society of Upper Canada, the Supreme Court of Canada ruled that original work requires "an exercise of skill and judgment" and cannot be "purely mechanical exercise."

Messy for coders

Sean O'Brien, a lecturer in cybersecurity at Yale Law School and founder of the Yale Privacy Lab, offers some practical insights. He references a recent U.S. Copyright Office decision regarding a graphic novel that used images generated by the AI software Midjourney. The office concluded that the novel was copyrightable because of significant human contributions, such as the text and layout, but the AI-generated images themselves were not.

If this ruling were extended to software, the overall application could be copyrighted, but the AI-generated routines would not. This means programmers need to clearly document which parts of their code were generated by AI to protect the rest of their work.

Also, check out the most popular programming languages in 2024 (and what that even means).

O'Brien also highlights licensing issues. He notes that ChatGPT "can't properly provide the copyright information, specifically refusing to place free and open source licenses, like the GNU General Public License, on code."

However, he adds: "It's already been proven that GPL'd code can be verbatim repeated by ChatGPT, creating a license infringement mess. Microsoft and GitHub continue to integrate such OpenAI-based systems into code authoring platforms used by millions, and that could muddy the waters beyond recognition."

What does it all mean?

We haven't even touched on liability and other legal issues yet, which you can read about in Part II. However, some clear conclusions emerge from this discussion.

First, this is largely uncharted territory. Even the attorneys I spoke with emphasized the lack of sufficient precedent to provide definitive answers. They all recommended consulting an attorney for specific advice, yet acknowledged the limited case law makes it difficult to predict outcomes with certainty.

Second, it's likely that code written by an AI cannot be owned or copyrighted in a way that provides legal protections.

Also, generative AI introduces new risks to everyone. Here's how you can stay safe.

This creates significant challenges because without rigorous documentation, it will be hard to defend what parts of the code are subject to copyright and what parts are not.

Finally, Yale's O'Brien believes that ChatGPT and similar software rely on the concept of fair use. However, he notes:

There have been no conclusive decisions around this affirmation of fair use, and a 2022 class action called it "pure speculation" because no court has yet considered whether usage of AI training sets arising from public data constitutes fair use.

Pure speculation. When determining whether you own and can copyright your code, you don't want to rely on "pure speculation." Yet, that's where we stand.

Continue to Part 2: If you use AI-generated code, what's your liability exposure?


You can follow my day-to-day project updates on social media. Be sure to follow me on Twitter at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.

Related article
China Telecom Invests in Mianbi Intelligence, Raises Capital to 713,000 Yuan for LLM & Data Infra China Telecom Invests in Mianbi Intelligence, Raises Capital to 713,000 Yuan for LLM & Data Infra The "national team" and the leading figure from Tsinghua University in the large model space are deepening their strategic alignment. On March 1, 2026, according to the latest business registration data from Qichacha, Beijing Mianbi Intelligent Techn
Taotian Group Accelerates AI-Native Restructuring, Grants Interns Free Token Quotas Taotian Group Accelerates AI-Native Restructuring, Grants Interns Free Token Quotas TaoTian Group recently introduced the "AI Productivity Plan," designed to accelerate the integration of AI technology into e-commerce operations and R&D workflows through resource allocation and tool subsidies. The program is now available to all int
Glean targets enterprise AI infrastructure in land grab Glean targets enterprise AI infrastructure in land grab The race to dominate enterprise AI is accelerating. Microsoft is embedding Copilot into Office, Google is integrating Gemini into Workspace, and both OpenAI and Anthropic are selling directly to corporations. Meanwhile, nearly every SaaS vendor now i
Related Special Topic Recommendations
writing Best AI Xianxia & Wuxia Assistants: Write Epic Cultivation Progression & Martial Arts Choreography
Best AI Xianxia & Wuxia Assistants: Write Epic Cultivation Progression & Martial Arts Choreography

Discover the 2026 best AI assistants for crafting epic xianxia & wuxia tales. XIX.AI's curated list features top-rated, game-changing tools to master cultivation progression and martial arts choreography. Compare free vs paid options with real-world tests. Unlock your creative potential and start writing today!

10 tools
xix.ai
code AI Mobile App Coding Tools: Generate Cross-Platform Flutter & React Native Code from Prompts
AI Mobile App Coding Tools: Generate Cross-Platform Flutter & React Native Code from Prompts

Discover the 2026 best AI mobile app coding tools for Flutter & React Native. Our curated, top-rated list features powerful, game-changing solutions that generate cross-platform code from prompts. Compare free vs paid options with real-world tests. Unlock faster development and build better apps. Explore the rankings on XIX.AI now!

10 tools
xix.ai
code Best AI Chrome Extension Generators: Create Custom Browser Add-ons with Zero Coding Experience
Best AI Chrome Extension Generators: Create Custom Browser Add-ons with Zero Coding Experience

Discover the 2026 best AI Chrome extension generators on XIX.AI. Our curated list features top-rated, must-try tools that let you create custom browser add-ons with zero coding. Compare free vs paid options, see real-world tests, and unlock your productivity. Explore the latest rankings and find your perfect tool today!

10 tools
xix.ai
Text-to-speech Best AI Multilingual TTS: Generate Authentic Native-Accent Speech in 50+ Languages
Best AI Multilingual TTS: Generate Authentic Native-Accent Speech in 50+ Languages

Discover the 2026 best AI multilingual TTS tools for authentic native-accent speech in 50+ languages. Explore our top-rated, curated rankings with free vs paid comparisons and real-world tests. Find your perfect voice tool on XIX.AI and unlock global communication today.

10 tools
xix.ai
Meeting Assistant Best AI Meeting Automation Tools for Smarter and Faster Collaboration
Best AI Meeting Automation Tools for Smarter and Faster Collaboration

Discover the 2026 latest top-rated AI meeting automation tools for smarter, faster collaboration. Our curated list features powerful, game-changing solutions to automate notes, summaries, and action items. Compare free vs paid options with real-world tests and weekly updated rankings. Unlock peak team productivity. Explore the best picks now at XIX.AI.

10 tools
xix.ai
Prompt AI Prompts for Infrastructure-as-Code: Deploy Terraform & Docker Configurations Safely
AI Prompts for Infrastructure-as-Code: Deploy Terraform & Docker Configurations Safely

Discover the 2026 latest top-rated AI prompts for Infrastructure-as-Code. XIX.AI's curated selection helps you safely deploy Terraform & Docker configurations, automate cloud setups, and boost DevOps productivity. Compare free vs paid options with real-world tests. Explore now and unlock your AI edge.

10 tools
xix.ai
Comments (5)
0/500
DavidAllen
DavidAllen May 22, 2026 at 6:00:34 AM EDT

Interesting question! If AI writes code based on my prompts, I'd argue I still own it—but those terms of service are a legal minefield. Makes me wonder if we'll see more 'open-source your prompts' movements. 🤔

LarryWilliams
LarryWilliams March 22, 2026 at 2:01:17 PM EDT

Pas bête comme question en effet! Perso, j'ai toujours peur qu'une info sensible se retrouve dans les entrailles de l'IA sans que je le sache. C'est un peu comme confier une partie de son business à un collaborateur invisible... 😬 Mais bon, les CGU sont sûrement là pour ça, non? En tout cas, ça mérite vraiment d'y réfléchir avant de se lancer.

AvaHill
AvaHill September 23, 2025 at 6:30:37 AM EDT

Interesante pregunta sobre la propiedad del código generado por IA. Si ChatGPT mejora mi código, ¿sigue siendo mío o ahora es de OpenAI? 🧐 Esto podría volverse un dolor de cabeza legal en el futuro, especialmente para startups con código sensible.

KevinScott
KevinScott August 25, 2025 at 5:01:06 AM EDT

This article really got me thinking about AI code ownership! 🤔 If ChatGPT spits out code with my business logic, am I just handing my secrets to big tech? Kinda feels like letting a genie out of the bottle—cool, but risky!

JerryGonzalez
JerryGonzalez August 23, 2025 at 3:01:24 PM EDT

Whoa, this article really got me thinking about AI code ownership! 🤔 If ChatGPT spits out code with my business secrets, am I accidentally leaking them to big tech? Kinda scary, but super fascinating topic!

OR