# Copyright and licensing

> Copyright in generative AI is four questions: may you collect and train on the data (US fair use, EU TDM opt-outs), which licence binds the weights and fine-tunes, can outputs be owned (human authorship), and do they copy training works.

Source: https://www.mlfoundry.in/learn/copyright-and-licensing  
Section: Generative AI › Safety, Alignment and Responsible AI  
Level: core · 8 min read · updated 2026-10-21

**Copyright and licensing:** in generative AI covers the legal permissions around a model's whole lifecycle. **Copyright** is the exclusive right of an author to copy, adapt and distribute an original work. A **licence** is the owner's permission to do those things on stated conditions. For a generative system that means: rights in the training data, the licence on the model weights, whether outputs can be protected, and whether outputs infringe someone else's work. The rules come from national law (the US Copyright Act, the EU DSM Directive 2019/790, the EU AI Act 2024/1689, Japan's Copyright Act Art. 30-4) and from licence texts (Creative Commons, Apache-2.0, MIT, custom model licences).

> **Not legal advice:** This article states what laws and licences say in general terms, as of 2025. Several key questions are being decided in court cases right now, and the answer depends on jurisdiction and facts. Treat it as an engineering checklist and ask counsel for anything that matters.

Practitioners meet the topic as concrete decisions. Which crawled pages may enter the corpus? Can we sell a product built on these weights? Must we credit the fine-tuning dataset? Can a customer copyright an image our model drew? Each decision belongs to one stage of the pipeline, and each stage has its own rule and its own engineering control.

> Figure: Four stages and the question at each. Collect: does the source opt out (a robots.txt rule such as User-agent: GPTBot, Disallow: /, or an EU machine-readable reservation)? Train: is copying for training allowed (US fair use, EU TDM exceptions, Japan Art. 30-4)? Release: which licence binds the weights, and do fine-tunes inherit it? Generate: can outputs be owned, and do they copy training works? The right-hand column is the matching control.

## Training data: may you copy it?

Training makes copies: crawling, storing, tokenising. Whether those copies need permission depends on jurisdiction. In the **US** the question is **fair use** (17 U.S.C. §107), decided case by case on four factors. Authors Guild v. Google (2nd Cir. 2015) held that scanning whole books to build a search index was fair use, and AI developers rely on it by analogy. Rights holders argue the reverse, for example in The New York Times v. Microsoft and OpenAI (filed December 2023).

US fair use: the four statutory factors and how each is argued for model training

| Factor (§107) | Question | Training argument for / against |
| --- | --- | --- |
| 1. Purpose and character | Is the use transformative? Commercial? | learning statistics is a new purpose / outputs serve the same market |
| 2. Nature of the work | Factual or creative? Published? | creative works weigh against the user |
| 3. Amount used | How much was copied? | whole works copied / none shown to the public |
| 4. Market effect | Does it harm the market for the original or licences? | no substitute / floods the market, kills a licensing market |

Early rulings split on facts. In June 2025 two US district courts (Bartz v. Anthropic; Kadrey v. Meta) found training on books to be fair use on their records. Bartz also held that building a central library from pirated copies was not. In February 2025 Thomson Reuters v. Ross found no fair use for a non-generative legal search tool trained on Westlaw headnotes. None of these is an appellate ruling.

The **EU** uses explicit exceptions rather than fair use. The DSM Directive's Art. 3 lets research organisations and cultural heritage institutions mine works they can lawfully access. Art. 4 allows text and data mining for any purpose, including commercial, unless the rights holder has reserved it, for online content "by machine-readable means". The **AI Act** (Art. 53) requires providers of general-purpose AI models to have a policy to respect those reservations and to publish a sufficiently detailed summary of training content. These obligations apply from 2 August 2025. **Japan**'s Art. 30-4 permits use for data analysis unless it unreasonably prejudices the owner's interests. The **UK** exception (CDPA s.29A) covers only non-commercial research.

**Opt-out signals and dataset practice**

- **Crawler user agents:** GPTBot (OpenAI, August 2023), Google-Extended (September 2023, controls use for Google's models, not Search indexing), CCBot (Common Crawl)
- **robots.txt:** a request, not access control; the most widely used machine-readable opt-out
- **The Stack (BigCode, 2022):** only permissively licensed source code, with an opt-out tool for repository owners
- **LAION-5B (2022):** 5.85 billion image–text pairs distributed as URLs and metadata, not image files

Worked example: a 625B-token corpus under three filtering policies (tokens in billions)

| Source | Licence / signal | Tokens | A: commercial, honour opt-outs, drop NC | B: openly licensed only | C: public domain + permissive |
| --- | --- | --- | --- | --- | --- |
| Public-domain books | PD | 20 | 20 | 20 | 20 |
| Wikipedia | CC BY-SA | 5 | 5 | 5 | 0 |
| Code | MIT / Apache | 60 | 60 | 60 | 60 |
| Code | GPL | 25 | 25 | 25 | 0 |
| Web crawl | no opt-out | 400 | 400 | 0 | 0 |
| Web crawl | opted out | 90 | 0 | 0 | 0 |
| News archive | licensed by contract | 15 | 15 | 0 | 0 |
| Research set | CC BY-NC | 10 | 0 | 0 | 0 |
| Kept |  | 625 | 525 (84.0%) | 110 (17.6%) | 80 (12.8%) |

Policy A follows the EU Art. 4 logic: keep what is lawfully accessible and not reserved. Policy B is what "trained only on openly licensed data" means, at the cost of five sixths of the tokens. Record the policy and the per-document provenance at collection time. Reconstructing it later is close to impossible.

## Licences on weights and what fine-tunes inherit

A weights licence decides what you may do with the model; see **Open-weight vs closed models** for the main families. Permissive licences (Apache-2.0, MIT) ask only for notices. The Llama 2 Community License allows commercial use but requires a separate licence from Meta if your products had more than 700 million monthly active users on its release date, and it binds you to an acceptable-use policy. CreativeML OpenRAIL-M (Stable Diffusion v1) imposes use restrictions that every derivative must pass on. A LoRA adapter or merged model is usually treated as a derivative, so these terms follow the fine-tune.

Data licences add their own conditions when you fine-tune. CC BY needs credit. CC BY-NC forbids commercial use. CC BY-SA requires adaptations to be shared under the same licence, and every CC 4.0 licence forbids adding terms that restrict recipients. Whether a trained model is an "adaptation" of its training data is unsettled, so a conservative reading treats it as one. That reading makes some combinations impossible to distribute: a BY-SA dataset cannot be honoured on top of a base licence that adds use restrictions.

> Figure: Each component contributes a cell per obligation column, and the pipeline takes the strictest. Default (Llama 2 base, CC BY data plus own data, commercial hosted service, 10M MAU): allowed with 2 duties, the acceptable-use policy and crediting the dataset. Move MAU to 1B: blocked by the 700M cap. Back at 10M, switch to distribute weights and add the CC BY-SA set: blocked, because BY-SA allows no extra terms and Llama 2 adds them. The same data on an Apache-2.0 base is allowed with 4 duties.

## Outputs: ownership and infringement

**Ownership.** US copyright protects only human authorship. The Copyright Office's March 2023 registration guidance asks applicants to disclose AI-generated material and to exclude it from claims. In the Zarya of the Dawn decision (February 2023) it registered a comic's text and the human selection and arrangement, but not the Midjourney images. Thaler v. Perlmutter upheld refusing registration for a work listed as created autonomously by an AI. Human edits, selection and arrangement can be protected. The UK instead names the person who made the arrangements as author of a "computer-generated work" (CDPA s.9(3)).

**Infringement.** An output that reproduces or is substantially similar to a protected work can infringe, however it was produced. Memorised, often-duplicated works are the main risk: famous images, song lyrics, popular code snippets (see **Privacy and data leakage** for how memorisation is measured). Controls are deduplication before training, a filter that blocks outputs matching training text (GitHub Copilot offers one for public code), refusing prompts that ask for protected characters or lyrics, and logging. Several vendors offer indemnities for paying customers: Microsoft's Copilot Copyright Commitment (September 2023), Google (October 2023) and OpenAI's Copyright Shield (November 2023), each with conditions such as keeping safety filters on.

- **Data intake:** Check robots.txt and TDM reservations per crawler; store source URL, licence and fetch date per document.
- **Model selection:** Read the weights licence for the exact version: user caps, acceptable-use policy, naming rules, output-use limits.
- **Fine-tune release:** Combine the base licence with every dataset licence; resolve SA and NC conflicts before publishing an adapter.
- **Product output:** Similarity filter against training data, refusal of verbatim lyric or text requests, and terms that tell users what they own.

```python
from urllib.robotparser import RobotFileParser

ROBOTS = """\
User-agent: GPTBot
Disallow: /

User-agent: CCBot
Disallow: /articles/

User-agent: *
Allow: /
"""

rp = RobotFileParser()
rp.parse(ROBOTS.splitlines())               # normally: rp.set_url(".../robots.txt"); rp.read()

url = "https://news.example/articles/2024/flood.html"
for agent in ["GPTBot", "CCBot", "MyResearchCrawler"]:
    print(f"{agent:18} {'fetch' if rp.can_fetch(agent, url) else 'skip'}")
# GPTBot             skip
# CCBot              skip
# MyResearchCrawler  fetch
```

Honouring robots.txt opt-outs per crawler with the standard library (runs as is). A real pipeline fetches each site's file and also checks other reservation signals

> **Outputs from a closed API are not free data:** Using another provider's model outputs to build a training set (see **Synthetic data generation**) is governed by that provider's terms of service, which have commonly prohibited using outputs to develop competing models. The Llama 2 licence likewise barred using Llama 2 outputs to improve other large language models. Terms are contracts and apply whatever copyright says about the outputs.

**Question:** You fine-tune an Apache-2.0 base model on a CC BY-NC 4.0 dataset and want to sell API access. On a conservative reading, what blocks you?

- A. Apache-2.0 forbids hosted services
- B. The NC term in the dataset licence
- C. Nothing: licences never apply to trained models
- D. The fair-use test

**Answer:** B. The NC term in the dataset licence — Apache-2.0 has no commercial or hosting restriction. Whether a dataset licence binds a trained model is unsettled, but if it does, NC forbids commercial use of the adaptation. Retrain without that set, get a commercial licence, or accept the legal risk knowingly.

**Question:** A user writes a detailed prompt, and the model generates an image that the user publishes unchanged. Under current US Copyright Office guidance, what is protected?

- A. The image, owned by the user
- B. The image, owned by the model provider
- C. Not the image itself; human-authored elements such as later edits or arrangement can be
- D. Everything, since the prompt was creative

**Answer:** C. Not the image itself; human-authored elements such as later edits or arrangement can be — The Office requires human authorship and has treated prompts alone as insufficient control over the expressive output. Human modifications, selection and arrangement can be registered; the raw generated material is disclaimed.

**Key points**

- Four stages, four questions: collect (opt-outs), train (fair use / TDM exceptions), release (weights licence), generate (ownership and infringement).
- US: fair use, four factors, case by case; 2025 district rulings favoured training on lawfully acquired books but not pirated libraries. None is final.
- EU: DSM Art. 4 allows commercial TDM unless reserved machine-readably; the AI Act requires a copyright policy and a training-content summary from GPAI providers.
- Fine-tunes inherit base-licence terms; on a conservative reading BY-SA data clashes with any base licence that adds restrictions.
- Outputs need human authorship for US protection; memorised outputs are the infringement risk, handled with dedup, output filters and logging.

---

From MLFoundry (https://www.mlfoundry.in). The web page adds interactive figures and diagrams.
