EU AI Act Article 50(2) for LLM text: marking and detecting AI-generated text before 2 December A developer published a layered compliance design for EU AI Act Article 50(2), which requires providers of AI systems generating synthetic text to mark outputs in a machine-readable, detectable format. The approach combines signed provenance blocks and headers in API responses, metadata in exported documents, a detection endpoint, and an evidence log, since copy-paste strips metadata, edits break hashes, and paraphrasing weakens statistical watermarks. The post notes Article 50 has applied since 2 August 2026, with pre-existing systems given until 2 December 2026 under Article 111(4) of the Digital Omnibus on AI. If your product returns LLM-generated text to people in the EU chat answers, drafted emails, summaries, generated reports , Article 50 2 of the EU AI Act asks you, the provider, to make that text machine-readably marked and detectable. Our October post https://dev.to/rulereddy/eu-ai-act-article-502-marking-ai-generated-images-with-c2pa-before-the-2-december-deadline-1opc covered images with C2PA. Text is harder, because plain text has nowhere to hide a manifest. This post covers what the law and the Commission's guidelines actually say about text, then a layered design you can ship this week: provenance in API responses, metadata in exported documents, a detection endpoint, and an evidence log. It's readiness support for developers, not legal advice, and it was AI-assisted and then edited. From the AI Act Service Desk's consolidated text of Article 50 https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-50 Regulation EU 2024/1689 on EUR-Lex https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng : "Providers of AI systems, including general-purpose AI systems, generating synthetic audio, image, video or text content, shall ensure that the outputs of the AI system are marked in a machine-readable format and detectable as artificially generated or manipulated. Providers shall ensure their technical solutions are effective, interoperable, robust and reliable as far as this is technically feasible, taking into account the specificities and limitations of various types of content, the costs of implementation and the generally acknowledged state of the art, as may be reflected in relevant technical standards." And the exceptions: "This obligation shall not apply to the extent the AI systems perform an assistive function for standard editing or do not substantially alter the input data provided by the deployer or the semantics thereof, or where authorised by law to detect, prevent, investigate or prosecute criminal offences." The Commission Guidelines on Article 50 https://digital-strategy.ec.europa.eu/en/policies/guidelines-ai-transparency-obligations C 2026 5054 final, 20 July 2026, non-binding are where the developer-relevant detail lives: Article 50 2 is the provider's machine-readable mark. Article 50 4 is a separate deployer duty: a visible label on AI text "published with the purpose of informing the public on matters of public interest", unless it went through human review or editorial control. We covered 50 4 here https://dev.to/rulereddy/eu-ai-act-article-504-building-deepfake-and-ai-text-labels-your-customers-can-actually-ship-2ae8 . Your marking doesn't satisfy your customers' labeling duty, and vice versa. Article 50 has applied since 2 August 2026. For systems placed on the market before that date, the Digital Omnibus on AI Regulation EU 2026/1744 https://eur-lex.europa.eu/eli/reg/2026/1744/oj/eng added Article 111 4 https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-111 : those providers "shall take the necessary steps in order to comply with Article 50 2 by 2 December 2026." The Commission FAQ https://digital-strategy.ec.europa.eu/en/faqs/transparency-obligations-under-article-50-ai-act confirms this is the only grace period. That's eight days from today. The voluntary Code of Practice on Transparency of AI-generated Content https://digital-strategy.ec.europa.eu/en/policies/code-practice-ai-generated-content , published 10 June 2026, has a Section 1 for providers on marking and detection, and the Commission and AI Board have confirmed it as an adequate tool to demonstrate compliance. If you don't sign it, you must show your own measures are adequate. No single technique survives everything. Copy-paste strips metadata, any edit breaks a hash, and paraphrasing weakens statistical watermarks. So layer them. This Express middleware TypeScript adds a signed provenance block and headers to any response with output text , logs it, and exposes a detection function: js // provenance.ts import { createHash, generateKeyPairSync, sign, verify, randomUUID } from "node:crypto"; import { appendFileSync } from "node:fs"; import type { Request, Response, NextFunction } from "express"; // In production, load the key from your KMS/secret store instead. const { privateKey, publicKey } = generateKeyPairSync "ed25519" ; export interface Provenance { id: string; ai generated: true; generator: string; model: string; created at: string; sha256: string; sig: string; verify url: string; } const sha256 = s: string = createHash "sha256" .update s.normalize "NFC" .digest "hex" ; const index = new Map