Technical Guide · EU/EEA

GDPR for AI Developers

The EU General Data Protection Regulation has been in force since 2018 — but most AI teams are still building as if it doesn't apply to LLM pipelines. It does. Every Article mapped to what your AI system must actually do, in code.

Last updated June 2026·25 min read·GDPR + EU AI Act 2024

What is GDPR?

The General Data Protection Regulation (EU) 2016/679is the world's most comprehensive data privacy law. In force since May 2018, it governs how organisations process personal data of EU and EEA residents. It applies regardless of where the organisation is based — if you process data of EU residents, GDPR applies to you.

The EU AI Act (2024/1689) adds a second layer for high-risk AI systems (medical, credit scoring, recruitment, critical infrastructure). GDPR compliance is a prerequisite for AI Act compliance — this guide covers GDPR. The AI Act adds obligations on top.

GDPR ≠ DPDP.Unlike India's DPDP Act, GDPR provides for "legitimate interests" as a lawful basis (Art. 6(1)(f)), a right to data portability (Art. 20), and mandatory DPO appointments in certain cases (Art. 37). It also has two penalty tiers — €10M/2% and €20M/4% revenue — versus DPDP's fixed rupee amounts.

Who is affected?

GDPR applies to any organisation that processes personal data of EU/EEA residents, regardless of where the organisation is established. A company in India, the US, or Singapore building an AI product used by EU customers is fully in scope.

AI systems are broadly in scope because they process personal data at every layer: user input (prompts), LLM inference (the API call itself is a processing operation), tool calls, responses, and any fine-tuning datasets. Sending EU personal data to a US-based LLM API is simultaneously a disclosure (Art. 4(2)) and potentially a cross-border transfer (Art. 44).

Art. 6 — Lawful basis

Every processing of personal data requires a lawful basis. There are six. For most commercial AI applications, the relevant ones are:

Art. 6(1)(a)
Consent
User has given explicit, withdrawable consent for this specific purpose
Art. 6(1)(b)
Contract
Processing is necessary to perform a contract with the data subject
Art. 6(1)(c)
Legal obligation
Processing is required by EU or member state law
Art. 6(1)(f)
Legitimate interests
Necessary for legitimate interests of the controller, balanced against data subject rights
Legitimate interests requires a balancing test (LIA). You cannot simply assert "legitimate interests" — you must document an assessment showing your interests outweigh the impact on data subjects. For AI systems processing sensitive data, this test rarely passes without strong safeguards.

When consent is your lawful basis, it must be: freely given (not bundled with service terms), specific (per-purpose, not "AI processing" in general), informed (clear explanation of AI processing and LLM vendors used), and unambiguous (explicit opt-in, no pre-ticked boxes). Withdrawal must be as easy as granting.

python
import governor

# Record GDPR consent before processing EU personal data
governor.consent.grant(
    data_subject_id="USR-EU-4821",   # never store raw email — hash it
    purpose="credit_risk_assessment",
    legal_basis="explicit_consent",
    data_categories=["IBAN", "CREDIT_CARD", "EMAIL"],
    locale="eu",
    channel="web_app",
    consent_version="3.2",
)

# Verify before every AI processing call
result = governor.consent.verify(consent_id)
if not result.valid:
    raise PermissionError(f"Cannot process: {result.reason}")

# On withdrawal — must stop ALL processing immediately
governor.consent.withdraw(consent_id)

Art. 5(1)(c) + Art. 25 — Data minimisation & privacy by design

Article 5(1)(c) requires that personal data be "adequate, relevant and limited to what is necessary in relation to the purposes." Article 25 (privacy by design) requires that data minimisation be the default — not something you enable with a flag.

For AI systems, this is one of the most commonly violated principles. Passing full EU personal data records to an LLM when only a subset is needed for the task violates Art. 5(1)(c). governor.wrap(client, locale='eu') enforces this technically — PII is stripped before the prompt leaves your network.

python
import governor, openai
from governor_tracer import GovernorTracer

tracer = GovernorTracer(agent_id="eu-credit-agent")
client = governor.wrap(
    openai.OpenAI(),
    locale="eu",      # activates IBAN, UK_NIN, EU_PASSPORT, CREDIT_CARD detection
    tracer=tracer,    # logs every call to the audit trail
)

# IBAN and credit card are redacted before reaching OpenAI.
# The audit trail records pii_types=["IBAN"] with pii_redacted=True.
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{
        "role": "user",
        "content": "Credit risk for IBAN GB29NWBK60161331926819, card 4532015112830366"
    }]
)

EU PII types Governor detects

IBAN
57 country codes, format-validated
UK_NIN
Full exclusion rules (BG, NT, TN…)
EU_PASSPORT
Keyword-anchored
CREDIT_CARD
Luhn-validated, all major networks
EMAIL
RFC 5322 compliant
IPV4 / IPV6
IP addresses

Art. 13–14 — Transparency notice

At collection time (or within one month if data is obtained indirectly), data subjects must receive a privacy notice covering: the controller's identity, purposes and legal basis for processing, categories of data, recipients (including LLM API vendor categories), retention periods, all data subject rights, and — critically — the existence of automated decision-making with meaningful information about the logic involved.

Naming LLM vendors matters. Your privacy notice must disclose that personal data may be processed by third-party AI services. Naming vendor categories (e.g. "large language model API providers in the US under EU-US Data Privacy Framework") is the minimum. Specific vendor names are better practice.

Art. 15–20 — Data subject rights

Art. 15
Right of access
Confirmation of processing, copy of data, plus AI-specific logic explanation. Respond within 30 days.
Art. 17
Right to erasure
Delete data when purpose fulfilled, consent withdrawn, or unlawfully processed. Must propagate to LLM fine-tuning data and RAG stores.
Art. 18
Right to restriction
Temporarily halt processing while a dispute is resolved.
Art. 20
Right to portability
Provide data in machine-readable format. GDPR-specific right not present in DPDP.
Erasure (Art. 17) must propagate to sub-processors — including any LLM vendor that may have cached or stored request data. This is why zero-retention API contracts (or private inference) are strongly recommended for regulated use cases.

Art. 22 — Automated decision-making

Article 22 is the most important GDPR provision for AI systems. Data subjects have the right not to be subject to decisions based solely on automated processing that produce legal or similarly significant effects — credit decisions, insurance premiums, recruitment screening, medical triage, performance evaluation.

If your AI system makes such decisions, you must: (a) offer a human review mechanism, (b) allow the data subject to contest the outcome, (c) provide a meaningful explanation of the logic involved. "The model said so" is not a meaningful explanation.

python
from governor_tracer import GovernorTracer

tracer = GovernorTracer(agent_id="eu-loan-agent")

with tracer.run() as run:
    run.llm_call("openai", "gpt-4o", redacted_prompt, response)
    run.decision(
        reason="Credit score 680, income verified, no defaults in 36 months",
        outcome="approve",
        confidence=0.89,
    )

    # Art. 22 — human review for significant automated decisions
    run.human_checkpoint(
        question="Approve €15,000 loan for applicant EU-8821?",
        approved=True,
        reviewer_id="maria.s.credit.officer",  # reviewer identity
        notes="Verified income documents manually.",
    )

# The audit trail now proves:
# 1. What logic led to the decision (decision event)
# 2. A human reviewed and approved it (human_checkpoint event)
# 3. The chain is cryptographically intact (run.verify())

Art. 32 — Technical security safeguards

Article 32 requires "appropriate technical measures" including pseudonymisation, encryption, confidentiality and availability guarantees, and regular testing. For AI systems, the primary Art. 32 safeguard is PII redaction before LLM API calls— because sending EU personal data unredacted to an external API is itself a security gap, regardless of what the vendor's DPA says.

TLS 1.2+ in transitrequired
All LLM API calls over HTTPS
PII redaction before APIrequired
governor.wrap(client, locale='eu')
Audit log integrityrequired
Hash-chained, tamper-evident records
Encryption at restrequired
All stored EU personal data
DPA with LLM vendorrequired
Art. 28 processor agreement
Zero-retention API contractstrongly recommended
Vendor commits to no log storage

Art. 33–34 — Breach notification

A breach of EU personal data must be notified to the supervisory authority within 72 hours of discovery (Art. 33). If the breach is likely to result in high risk to data subjects (e.g. exposed financial or health data), affected individuals must also be notified without undue delay (Art. 34).

For AI systems, inadvertent PII leakage through an LLM prompt — for example, an un-redacted IBAN sent to OpenAI's servers — likely constitutes a breach. The 72-hour clock starts at discovery, not at the time of the leak. A structured audit trail makes breach scope determination (exactly whose data, exactly what type) a query, not a forensic investigation.

The 72-hour window is absolute. Organisations that discover a breach on Friday at 5pm must notify by Monday morning. Plan for this — incident response procedures must explicitly cover AI system breaches.

Art. 35 — Data Protection Impact Assessment

A DPIA is mandatory before processing likely to result in high risk to data subjects. Supervisory authorities publish lists of processing types that always require a DPIA. For AI systems, these commonly include:

→Systematic profiling with legal or significant effects (credit scoring, recruitment screening)
→Large-scale processing of special category data (health, biometric, genetic, political)
→Systematic monitoring of publicly accessible areas (surveillance AI)
→Novel technology with unknown privacy risks (new LLM applications)
→Automated decision-making that prevents access to services or contracts

The DPIA must assess necessity and proportionality, risks to data subject rights and freedoms, and planned mitigating measures. If residual risk remains high after mitigations, you must consult your supervisory authority before proceeding.

Governor's machine-readable gdpr-ai-v1.json spec maps all 15 GDPR controls to AI obligations with verifiable assertions — use it as the technical input to your DPIA risk register.

Art. 44–49 — Cross-border transfers to LLM APIs

Sending EU personal data to LLM APIs hosted outside the EEA is a cross-border transfer subject to Chapter V. The primary mechanisms are:

EU-US Data Privacy Framework
Adequacy decision (July 2023) — covers US LLM vendors certified under DPF. Verify certification at dataprivacyframework.gov.
Standard Contractual Clauses
SCCs (updated June 2021). Most vendor DPAs include SCCs as a fallback. Check your vendor DPA.
Adequacy decision
EEA, Switzerland, UK (TCA), Japan, South Korea, Canada (partial). No transfers to countries without adequacy or SCCs.
Explicit consent (Art. 49)
Only for occasional transfers. Cannot be used for systematic AI processing.
The practical answer: governor.wrap(client, locale='eu') strips EU PII before prompts reach US LLM APIs. This does not eliminate the transfer mechanism requirement (you still need SCCs or DPF), but it dramatically reduces the risk and scope of any transfer-related breach.

Implementation: EU PII detection in production

python
# pip install pygovernor
import governor

# Detect EU entities
entities = governor.detect(
    "IBAN: GB29NWBK60161331926819, NIN: AB123456D",
    locale="eu",
)
# [Entity(type='IBAN', ...), Entity(type='UK_NIN', ...)]

# Redact — token replacement (default)
result = governor.redact("Card: 4532015112830366", locale="eu")
result.text    # "Card: [CREDIT_CARD]"
result.count   # 1

# Redact — partial mask (GDPR-friendly, preserves last 4)
result = governor.redact("Card: 4532015112830366", locale="eu", replacement="mask")
result.text    # "Card: XXXX-XXXX-XXXX-0366"

# IBAN mask preserves first 4 chars (country + check) and last 4 digits
result = governor.redact("IBAN GB29NWBK60161331926819", locale="eu", replacement="mask")
result.text    # "IBAN GB29XXXXXXXXXXXXXX6819"
typescript
// npm install governor-sdk
import { detect, redact, wrap, GovernorTracer } from 'governor-sdk';

// Detect EU entities
const { entities } = detect("NIN: AB123456D, IBAN: GB29NWBK60161331926819", "eu");

// Redact with mask
const { text } = redact("Card 4532015112830366", "eu", "mask");
// "Card XXXX-XXXX-XXXX-0366"

// Wrap + trace
const tracer = new GovernorTracer("eu-credit-agent");
const client = wrap(new OpenAI(), { locale: "eu", tracer });

Implementation: Art. 30 Records of Processing

Article 30 requires controllers (250+ employees, or non-occasional processing) to maintain Records of Processing Activities (RoPA). For AI systems, this means documenting: each agent's processing purposes, categories of data subjects, categories of personal data, LLM vendor names and locations, retention periods, and security measures.

The Governor Agent Tracer generates this automatically — every run logs the fields accessed, the purpose, the LLM provider, and a timestamp. The compliance engine aggregates these into an Art. 30 report on demand.

python
from governor_tracer import GovernorTracer

tracer = GovernorTracer(agent_id="eu-loan-agent-v3")

with tracer.run() as run:
    run.data_access(
        source="eu_customer_db",
        fields_accessed=["iban", "credit_score", "income"],
        purpose="mortgage_assessment",
        data_principal_id="EU-CUST-7741",  # hashed before storage
    )
    run.llm_call(
        provider="openai",
        model="gpt-4o-mini",
        prompt="[IBAN] applicant, score 710",  # PII already redacted
        response="Low risk. Recommend approval.",
        pii_types=["IBAN"],
        redact_pii=True,
    )
    run.decision(
        reason="Score above 700 threshold, no defaults",
        outcome="approve_conditional",
        confidence=0.91,
    )

valid, msg = run.verify()  # cryptographic proof chain is intact

Penalties

GDPR has two penalty tiers. The higher figure or the revenue percentage is applied — whichever is greater. For large companies, the revenue percentage is typically larger.

€20M or 4% revenueupper tier
Core principles (Art. 5), lawful basis (Art. 6), consent (Art. 7), data subject rights (Art. 12–22), cross-border transfers (Art. 44–49)
€10M or 2% revenuelower tier
Processor obligations (Art. 28), records of processing (Art. 30), DPO requirements (Art. 37–39), DPIA (Art. 35), breach notification (Art. 33)

Notable enforcement actions against AI systems include the Italian DPA ordering ChatGPT offline (March 2023), Clearview AI fines across EU member states (€20M+), and ongoing investigations into LLM training data practices by EDPB.

Key dates
May 2018GDPR enters into force
Jun 2021Updated Standard Contractual Clauses published
Jul 2023EU-US Data Privacy Framework adequacy decision
Mar 2024EU AI Act published in Official Journal
Aug 2025EU AI Act prohibited practices ban in force
Aug 2026EU AI Act high-risk AI obligations enforceable
Aug 2027Full EU AI Act enforcement (all providers)

GDPR compliance checklist for AI systems

Before deploying AI on EU personal data

✓Document lawful basis for each AI processing purpose (Art. 6)
✓Conduct DPIA for high-risk AI: profiling, special categories, novel technology (Art. 35)
✓Sign DPAs (Art. 28) with all LLM API vendors — OpenAI, Anthropic, Google, etc.
✓Verify EU-US DPF certification or SCCs for each US-based LLM vendor
✓Publish privacy notice naming AI processing purposes and LLM vendor categories (Art. 13)
✓Implement governor.wrap(client, locale='eu') on all LLM clients

At runtime

✓Verify lawful basis before every AI processing operation
✓Redact EU PII (IBAN, UK_NIN, CREDIT_CARD, EU_PASSPORT) before all LLM API calls
✓Log every LLM call with pii_redacted=True and entity types in audit trail
✓Require human review (Art. 22) for automated decisions with significant effects
✓Provide meaningful explanation of AI decision logic when requested (Art. 22(3))

Ongoing

✓Respond to data subject access requests within 30 days (Art. 15)
✓Notify supervisory authority of breaches within 72 hours (Art. 33)
✓Maintain and update Art. 30 Records of Processing Activities
✓Review DPAs and transfer mechanisms when vendors update their terms
✓Update DPIA when AI system processing changes significantly
✓Verify audit chain integrity regularly: run.verify()
Automate your GDPR compliance
EU PII detection, Art. 22 human checkpoints, Art. 30 records — all wired in with governor.wrap(client, locale='eu').
Open Dashboard →gdpr-ai-v1.json →