Skip to content
CodeLifter
Search/ Browse prompts
CodeLifter Forum

Can you use AI-generated code in a commercial product?

Staff answerWritten by CodeLifter editors · AI code policies1 replyupdated

Short answer

Yes, generally. The main assistants' terms allow commercial use of output: OpenAI and Anthropic assign their rights in output to you, and GitHub claims no ownership of it. The risks are elsewhere. You may not hold copyright in purely generated code, output can match licensed open source code, and the terms make you responsible for both.

Written by CodeLifter editors · Staff, CodeLifter ·
CiteCodeLifter Forum, "Can you use AI-generated code in a commercial product?", https://codelifter.com/forum/posts/can-you-use-ai-generated-code-in-a-commercial-product/, accessed 2026-11-24.
  1. Staff, CodeLifter ·

    What do the vendors' terms say about output?

    Each vendor writes its own terms, and the terms differ by product. These are the three we opened for this answer, read on 16 October 2026. Other tools need their own check.

    Terms Who owns the output Who is responsible for it
    GitHub Terms of Service, Section J (effective 27 April 2026), covering Copilot "GitHub does not claim ownership of your Input or Output." You: "You are responsible for determining whether your use of Output requires a third-party license"
    OpenAI Terms of Use (effective 1 January 2026), covering ChatGPT and other services for individuals You: "We hereby assign to you all our right, title, and interest, if any, in and to Output." You must "evaluate Output for accuracy and appropriateness for your use case"
    Anthropic Commercial Terms of Service (effective 17 June 2025), covering API keys and offerings that reference them The customer "owns its Outputs" The customer must evaluate whether outputs are appropriate "before using or sharing Outputs"

    Notice the phrase "if any" in the OpenAI assignment, and the same words in Anthropic's: "its right, title and interest (if any)". A vendor can only hand you rights it has. If nobody holds a copyright in the output, the assignment passes nothing, which is the next question.

    OpenAI's terms also say "output may not be unique and other users may receive similar output", and that its assignment "does not extend to other users' output". Two companies can receive near-identical functions from the same prompt.

    In the US, only in the parts a human authored. The Copyright Office's Part 2 report (January 2025) says copyright does not extend to purely AI-generated material, and that prompts alone "do not alone provide sufficient control." The D.C. Circuit in Thaler v. Perlmutter (18 March 2025) held that the Act requires a human author "in the first instance", while noting that the rule "does not prohibit copyrighting work that was made by or with the assistance of artificial intelligence."

    For a business, that matters in two ways:

    1. You can still sell it. Copyright is about stopping others from copying; you do not need it to ship or charge for software.
    2. You may not be able to stop a competitor copying the purely generated parts. Your selection, arrangement and edits can be protected; the raw output may not be. Other protections, such as keeping the source private or contract terms with your customers, do not depend on copyright.

    The MIT licence thread covers how this plays out when you license the code to others, and the CodeLifter desk article Who owns AI-generated code? sets out the sources in full, including the UK's different rule for computer-generated works.

    What if the output matches someone else's code?

    GitHub's terms say it plainly: output "may contain material that resembles code or content in the model's training data or that is subject to third-party copyrights or open source license terms." GitHub's code referencing page says matches to public code "occur in less than one percent of Copilot suggestions". Rare is not never, and other assistants may not publish a figure or offer a check.

    If a block turns out to come from a permissively licensed project (MIT, BSD, Apache), you usually keep it by adding the required notice. If it comes from a copyleft project such as one under the GPL, the conditions reach your whole program when you distribute it; the second follow-up below goes through that. The CodeLifter desk article on snippet licensing covers Stack Overflow and MDN code, which have their own rules.

    Steps before you ship AI-written code commercially

    1. Check that the tool's terms cover your use. Consumer and business terms differ, and some products sit under their employer's agreement; the employer policies thread covers that case.
    2. Check what the vendor may do with your code while you work. For Copilot, see whether GitHub uses your code to train Copilot.
    3. Turn on public code matching or blocking where your tool offers it, and read the log for accepted matches.
    4. Search long or distinctive blocks yourself, and keep a note of what you found.
    5. Add any required notices for permissive code; remove or replace copyleft code you cannot comply with.
    6. Record which parts were generated and which you wrote or reworked. It is your evidence of human authorship if ownership is ever disputed.
    7. Read the restrictions too. OpenAI's terms, for example, bar using output "to develop models that compete with OpenAI", and Anthropic's bar using the services "to build a competing product or service, including to train competing AI models".
    Seven numbered checks to make before shipping AI-written code in a commercial product
    Seven checks before shipping AI-written code commercially, from this article

    Short version

    • Commercial use of AI-generated code is allowed under the GitHub, OpenAI and Anthropic terms we checked; each puts the risk of using it on you.
    • Vendors assign or disclaim their rights in output, but purely generated code may have no copyright for anyone to own.
    • You can sell such code; you may not be able to stop others copying the purely generated parts.
    • The real legal risk is output that matches licensed code, so check, attribute or replace before you ship.
    1
    ReplyLink

Plain text or simple Markdown. Links are nofollow. Your email is never shown.

  1. CodeLifter editorsStaffStaff, CodeLifter ·

    Who is liable if AI-generated code infringes someone else's copyright? By default, you are, because you are the one shipping it. Section J.5 of the GitHub Terms of Service says "You are responsible for your use of Output, including ensuring it complies with applicable law and does not infringe third-party rights", and that your indemnity duties apply to "claims arising from Output you incorporate into your products or services." OpenAI's Terms of Use ask businesses using its individual services to indemnify OpenAI against third-party claims "arising out of or relating to your use of the Services and Content".

    Some business terms run the other way. Anthropic's Commercial Terms, section K.1, say Anthropic will defend a customer against a claim that its "paid use of the Services" or the outputs "violates any third-party intellectual property right." Read the exclusions in K.3 before you rely on it: they include "modifications made by Customer to the Services or Outputs", combining outputs "with technology or content not provided by Anthropic", and uses the customer "knows or reasonably should know" infringe. Almost all shipped code is edited and combined, so treat an indemnity as a backstop, not a substitute for checking.

CodeLifter Forum. Questions and answers on vibe coding prompts, AI-generated code provenance, project AI policies and MCP tools.