HALVERTON & CO.

Technology & AI Law · 16 November 2026 · 7 min read

Who Owns Code Written With AI? Copyright Risks When Indian Developers Use AI Tools for US Clients

An illustrated graphic with a US flag, a programmer at a laptop, a copyright shield and a human brain icon, with arrows labelled Programmer and Human.

Key takeaways

  • US copyright protects human authorship, so purely machine-generated code is poorly protected, while human selection, arrangement and modification can be protected.
  • In India an employer is first owner of work made in employment, but a contractor keeps the copyright unless there is a written assignment.
  • AI tools can reproduce code under open source licences and may retain what you paste in.
  • Use an IP assignment, an AI tool disclosure and ban, code scanning, warranties, an indemnity and records of human input.

AI generated code copyright ownership is a question many US companies are only now realising they should have asked their offshore teams. Developers in Pune or Bengaluru use Copilot-style tools all day. The code comes back in a pull request. Who owns it? What if a chunk of it is copied from an open source project? And if you want to protect it, can you?

The honest answer is that the law is unsettled and the contract matters more than anything else. In the US, human authorship is the cornerstone, and pure machine output is poorly protected. In India, the Copyright Act has its own approach to computer-generated works, and a recent order on DABUS adds a wrinkle. Here is what a US client should know and the clauses worth putting in. On AI generated code copyright ownership, the contract carries more weight than any single case.

What US law says about AI output

US copyright law protects works of human authorship. The Copyright Office’s guidance on AI says that material generated entirely by an AI system isn’t protected, though human contributions, such as selection, arrangement or substantial modification, can be. Simply typing a prompt is not usually enough on its own, in the Office’s view. AI generated code copyright ownership in the US depends on human authorship. The US Copyright Office human authorship code position is that pure machine output is unprotected.

Courts have backed the human authorship line. In Thaler v. Perlmutter, an attempt to register an AI-made work with the AI as author failed in the DC Circuit, and the Supreme Court is reported to have declined to review it. That case is about an image, not code, but the reasoning carries over.

Code is a mixed case. Much of a program’s value is in architecture and design decisions made by people. A developer who uses an assistant to autocomplete lines, then reviews, edits and integrates, is likely a human author of the whole. A program generated end to end with minimal human input is a weaker claim. The more a person directs and shapes the result, the better the AI generated code copyright ownership argument. On AI generated code copyright ownership, the more a person directs the result, the better.

What Indian law adds

Indian developers work under Indian copyright law as well. Section 17 makes the employer the first owner of work made in the course of employment, unless there’s a contract to the contrary. Contractors are different: the commissioner doesn’t automatically own the copyright, which is why a written IP assignment is essential. Our post on IP assignment with Indian developers covers it. Indian law on AI generated code copyright ownership starts with Section 17 and the IP assignment AI-assisted work needs.

On AI output specifically, Section 2(d)(vi) says the author of a computer-generated work is the person who causes the work to be created. The Copyright Office’s reported DABUS order accepted that an AI-generated work could be original and named the human behind the tool as the person who caused it. It was a narrow decision, but it suggests Indian authorities are open to treating AI-assisted work as protectable.

That doesn’t help a US client directly. US protection depends on US law, and the Indian position doesn’t convert machine output into human authorship in the US. The practical consequence is that you can have a work that is protected in one country and thin in another. For AI generated code copyright ownership, US law decides US protection.

The risks beyond ownership

Ownership isn’t the only concern. AI tools can reproduce snippets of code from their training data, including code under open source licences. If a copyleft licence such as GPL attaches to a piece that slips into your product, you may be obliged to release more of your source. That open source licence contamination AI code risk is the one that lawyers see in diligence. Open source licence contamination AI code can arise without anyone noticing, and it hurts AI generated code copyright ownership claims in diligence.

Confidentiality is another. Pasting client source code into a public AI tool may expose trade secrets and breach the client’s own terms. Some tools retain inputs or use them for training. Whether an Indian developer used an approved enterprise tool or a free consumer one matters a lot.

And there’s trade secret law. A company’s ability to protect code as a trade secret depends on reasonable measures to keep it secret. Feeding it into third-party systems without controls can weaken that argument. This is as much a process problem as a legal one.

Contract terms that help

Start with an IP assignment that covers everything created in the engagement, including AI-assisted work, and that includes a present assignment of future rights. Add a clause that the vendor will disclose any AI tools used and will use only approved tools that don’t retain or train on your data. An AI coding assistant ownership contract should say so explicitly. Begin with an AI coding assistant ownership contract clause and an IP assignment AI-assisted work covers. Indian developers AI tools disclosure should be mandatory.

Contract terms for AI-assisted development
TermWhat it saysWhy
IP assignmentAll work, including AI-assisted work, assigned to the clientContractors may keep copyright otherwise
AI tool disclosureVendor lists tools and bans tools that train on your codeConfidentiality and ownership
Open source scanScan before delivery and keep reportsLicence contamination
Warranty and indemnityNo infringement, no copyleft surprisesRisk allocation
RecordsLog which parts were AI-assisted and reviewedShow human authorship

Add warranties and an indemnity. The vendor should warrant that, to its knowledge, deliverables don’t infringe third-party rights and don’t include code under licences that would affect your product, and indemnify you for breaches. Require code scanning for open source before delivery, and keep the reports.

Finally, set rules for record keeping. Ask the vendor to keep records of which parts were AI-assisted and how they were reviewed. If you ever try to register copyright or defend ownership, those records will help show human authorship. And review the contract when tools change, because tool terms change often. Keep records, because AI generated code copyright ownership is easier to defend with them.

Questions people ask

A final practical suggestion: ask your developers what tools they use. Most are happy to say, and the answers often show where the contract needs updating. AI generated code copyright ownership is a contract question first.

Related reading: IP assignment for Indian developers and US startups, open-source licence audits for US startups, trade secret protection for source code in India, the DABUS order and AI authorship, hiring contractors in India from the US and AI copyright in India and the US compared; also GPL licence risks in commercial software.

Quick answers

Who owns AI generated code copyright ownership questions usually turn on?

It turns on who made the human creative contribution and on the contract. In the US, purely machine-generated code is poorly protected. Human authorship in selecting, arranging and modifying it is protectable, and a written assignment makes sure the client owns what exists.

Can a US client own code written by Indian developers using AI tools?

Yes, if the contract assigns the rights and the code includes protectable human authorship. Without a written assignment, an Indian contractor may keep the copyright.

What contract terms should I use for AI-assisted development?

Include a full IP assignment, disclosure of AI tools, a ban on tools that retain or train on your code, open source scanning, warranties, an indemnity and record keeping.

Can I register copyright in AI-assisted code?

Possibly for the human-authored parts. The Copyright Office looks at the human contribution, so keep records.

Final word

Halverton & Co. is an Indian law firm advising US companies, founders, investors and law firms on Indian law, including software development, IP assignment and technology contracts between US companies and Indian developers. We practise in Jharkhand, Maharashtra and before the Supreme Court of India, and work alongside US counsel, who advise on US law. Halverton & Co.: Where tech needs law! If you have a question about Indian law, write to us at office@halvertonandco.com, or get in touch.

This article reflects developments reported up to 31 October 2026. It is for general information only, is not legal advice, and does not create an attorney-client relationship. Halverton & Co. is an Indian law firm and does not advise on US law; US-law points should be confirmed with US counsel.

Related practice area

Technology & AI Law

Contracts, data protection and AI policies for products that handle other people’s data.

View the practice area
Email this

Comments

No account needed. Comments are reviewed before they appear, so yours will show here once approved. Please do not share confidential details or describe your own legal matter: replies are general discussion, not legal advice, and do not create an advocate-client relationship. For your own situation, write to office@halvertonandco.com.

Only if you would like a reply.

This article is part of our Guides for US companies.

Questions

Write to us about what you are building.

This article is general information, not legal advice for your situation. If something here applies to your business, tell us briefly what you are working on.