Need to comply with the EU AI Act by 2 December 2026? New users can start with Trufo's AI Labeling Service or C2PA Certificates with your first month free.

New users: AI Labeling Service or C2PA Certificates, first month free.

Guides

4. AI Labeling and Compliance

Set up machine-readable AI labels on generated and AI-edited media: a baseline setup, additions for durable auditability, and the edge cases that commonly cause refusals or unexpected labels.

Which regulatory obligations apply to you, and when they take effect, depends on your jurisdiction and product (for example EU AI Act Article 50 or California SB 942). This guide covers the technical setup and is not legal advice.


1. Baseline vs. Extended Labeling

Baseline labeling Extended labeling (durable auditability)
AI label AI-generated label: a C2PA ai_system assertion with ai_involvement: "ai_generated", using a registered first-party AI system Same, plus AI-edit labels (ai_modified) for AI edits and composites
Signing route Managed Signing (Starter), Cloud or Local Branded Generator Product (BPV) where you declare AI edits, composites, or edits of user assets
Watermark Optional per_ai_system watermark (one shared ID per AI system and involvement mode; identifies your organization and AI system) per_embed watermark per file, so the full manifest can be recovered after platforms strip C2PA metadata (8. Watermarking with Pawprint)
Publisher identity Organization identity added automatically (ai.trufo.identity) Same, plus an organization CAWG identity (cawg_identity with "org_interim") and AI-training preferences (cawg_training)
Inputs and sources Single first-party model output Ingredient provenance for multi-model and third-party pipelines: inputs (inputTo), components (componentOf), and edited originals (parentOf)
Data residency Any host eu.api.trufo.ai or Local mode where media must stay in the EU or on your infrastructure
Validation required OV (production) OV (plus BPV if declaring AI edits, composites, or edits of user assets)

You can start with baseline labeling and add the extended pieces later.

Key Principles

  • Created vs. gathered assertions: Mark an assertion placement="created" only when your product directly vouches for it (its own actions, AI involvement, or ingredients it tracked). Leave external or user-supplied inputs as gathered.
  • all_actions_included: Set ManifestSettings(all_actions_included=True) only when the manifest records every action performed since the parent.
  • How platforms display digitalSourceType: Platforms derive their AI badge from the digitalSourceType values you declare, and behavior differs across platforms — always test sample outputs on the platforms that matter to you:
    • trainedAlgorithmicMedia on a c2pa.created action usually displays as AI-generated.
    • compositeWithTrainedAlgorithmicMedia on an edit usually displays as AI-modified, and AI componentOf ingredients as partly AI.
    • Some platforms label strictly by the original source (such as a camera capture) and may not surface later AI edits; some ignore gathered AI declarations altogether.
  • Watermarks (per_embed vs. per_ai_system):
    • per_embed (default) assigns a unique watermark ID per file so recovery returns that file’s full C2PA manifest — use it when per-file provenance recovery is needed (for example, California AI Transparency Act / SB 942 workflows).
    • per_ai_system embeds the AI system’s shared ID so recovery identifies your organization and AI system at lower cost (one embed per file instead of allocating a new ID) — useful when AI disclosure alone is needed (for example, EU AI Act Article 50(2) workflows).

2. Starter Path: First-Party AI Generator

This path applies when your organization operates the model that generated the output.

Prerequisites

  • Account, MFA, and a c2pa-sign-test key (2. Trufo Account Setup).
  • The Created Assertion Acknowledgement (Agreements); registering a first-party AI system returns 403 without it.
  • For production: active OV, a C2PA Signing plan, and a c2pa-sign-prod key.

Register the AI system once

Register on a production host (api.trufo.ai or eu.api.trufo.ai) with either a test or production key. Registrations are shared across all hosts, including test.api.trufo.ai.

Note: AI system registrations are immutable and cannot be deleted. Each entry in ai_involvement_modes allocates and bills an active watermark ID from registration (see Watermark Billing). Include "ai_modified" only if you will sign AI edits under a Branded Generator Product, use a clearly versioned name during prototyping, and retire old versions with POST /ai-system/status.

import requests

from trufo.api.endpoints import TPS_AI_SYSTEM_ADD_PATH, TRUFO_API_URL
from trufo.util.credentials import TrufoAPIKey, load_api_key

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_TEST)  # a c2pa-sign-prod key is also accepted

resp = requests.post(
    TRUFO_API_URL + TPS_AI_SYSTEM_ADD_PATH,
    headers={"X-API-Key": api_key},
    json={
        "name": "<MODEL_NAME>",
        "version": "<MODEL_VERSION>",
        "ai_involvement_modes": ["ai_generated"],
        "c2pa_first_party_attestable": True,
        "c2pa_ai_disclosure": {"modelType": "c2pa.types.model"},
    },
    timeout=60,
)
resp.raise_for_status()
print(resp.json()["ai_system_id"])  # "aisys_..."; store it in your configuration

The AI system’s name, version, and model disclosure can appear publicly in signed manifests and watermark lookups. c2pa_ai_disclosure is optional; when present, Trufo writes a c2pa.ai-disclosure assertion on every sign that names the AI system.

Sign on the test host, then production

from pathlib import Path

from trufo import sign_c2pa_cloud_test
from trufo.util.credentials import TrufoAPIKey, load_api_key

AI_SYSTEM_ID = "aisys_..."

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_TEST)
signed_bytes = sign_c2pa_cloud_test(
    api_key,
    Path("generated.png").read_bytes(),  # model output without a C2PA manifest
    manifest_title="generated.png",
    assertions=[
        ["ai_system", {"ai_system_id": AI_SYSTEM_ID, "ai_involvement": "ai_generated"}],
    ],
    actions=[
        ["watermark", {"wid_allocation_mode": "per_ai_system", "effort_policy": "require_if_supported"}],
    ],
)
Path("labeled.png").write_bytes(signed_bytes)

On an unsigned input, a first-party AI system produces a c2pa.created action with digitalSourceType trainedAlgorithmicMedia and the AI system as software agent. The watermark action is optional; remove it to sign without a watermark.

Checkpoint: inspect with c2patool labeled.png — you should see c2pa.created with trainedAlgorithmicMedia, c2pa.ai-disclosure (if configured), and c2pa.watermarked.unbound. Test-host certificates are untrusted by public validators until you add TCA Test Root CA (Verification).

For production, use sign_c2pa_cloud() (or sign_c2pa_local()) with a c2pa-sign-prod key; the assertions and actions are unchanged. The runnable script is ai_labeling.py.


3. When You Need a Branded Generator Product

Starter signing covers ai_generated output from a first-party model. A Branded Generator Product (3. Managed Signing Setup) is needed when:

  • Declaring AI edits or composites: ai_involvement: "ai_modified" writes compositeWithTrainedAlgorithmicMedia and requires a branded_gp_id approved for that source type (400 without one).
  • Editing user-uploaded media: linking the original with a parentOf ingredient and recording edits in action_history, or declaring creation or placement="created" (see Section 4).
  • Signing under your own product name: see certificate naming under 4. Branded Product Validation (BPV).

Prototype ai_modified on test.api.trufo.ai with branded_gp_id="test" and an AI system registered with "ai_modified" in ai_involvement_modes:

from pathlib import Path

from trufo import sign_c2pa_cloud_test
from trufo.util.credentials import TrufoAPIKey, load_api_key

AI_EDIT_SYSTEM_ID = "aisys_..."  # registered with "ai_modified" in ai_involvement_modes

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_TEST)
signed_bytes = sign_c2pa_cloud_test(
    api_key,
    Path("ai_edit.png").read_bytes(),  # without a C2PA manifest
    branded_gp_id="test",
    assertions=[["ai_system", {"ai_system_id": AI_EDIT_SYSTEM_ID, "ai_involvement": "ai_modified"}]],
)
Path("ai_edit_labeled.png").write_bytes(signed_bytes)

4. Edge Cases: Third-Party Models, Signed Uploads, and Remote Manifests

Wrapping a third-party AI API

If you call a model you do not operate, do not register it as first-party. Two supported patterns:

  • Register with c2pa_first_party_attestable: false. Signing with that AI system records the output as a declared AI parent ingredient (trainedAlgorithmicMedia) opened by your organization (c2pa.opened), not as a c2pa.created action.
  • Declare third-party outputs as ingredients. Add inputTo or componentOf ingredients with an ingredient-level digital_source_type. Only trainedAlgorithmicMedia and compositeWithTrainedAlgorithmicMedia can be written on an ingredient, and digital_source_type cannot be combined with ingredient media that carries its own C2PA manifest.
from pathlib import Path

from trufo import sign_c2pa_cloud_test
from trufo.c2pa import DigitalSourceType
from trufo.util.credentials import TrufoAPIKey, load_api_key

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_TEST)
signed_bytes = sign_c2pa_cloud_test(
    api_key,
    Path("composite.png").read_bytes(),
    manifest_title="composite.png",
    assertions=[
        ["ingredient", {
            "relationship": "componentOf",
            "title": "background.png",
            "format": "image/png",
            "digital_source_type": DigitalSourceType.TRAINED_ALGORITHMIC_MEDIA.value,
        }],
    ],
)
Path("composite_signed.png").write_bytes(signed_bytes)

Validators and platforms may display these disclosures differently from a c2pa.created action, or not at all. Test sample outputs against the validators that matter to you. If the upstream provider already signs its output with C2PA, Trufo keeps that manifest as the parent under the default signed_input_policy: "auto" and writes no new source type.

User uploads that carry a camera or human-created manifest

Under the default signed_input_policy: "auto", an ai_system assertion triggers a source-class check on the input’s manifest chain. Inputs classified as camera_captured or human_created are refused (400), whatever the request’s actions, so the new manifest does not contradict the existing provenance.

  • signed_input_policy: "keep" skips the refusal, but it only preserves the incoming manifest: no c2pa.created and no new AI source type are written.
  • To declare an AI edit of a user photo, sign the edited output under your branded_gp_id, attach the original photo as a parentOf ingredient, and record the edit in action_history with compositeWithTrainedAlgorithmicMedia. Omit ai_system: it can never be combined with parentOf. The edited file must not carry a C2PA manifest of its own, because a readable manifest is kept as the parent and the supplied parentOf is then refused (400).
import base64
from pathlib import Path

from trufo import sign_c2pa_cloud_test
from trufo.c2pa import DigitalSourceType
from trufo.util.credentials import TrufoAPIKey, load_api_key

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_TEST)
original_b64 = base64.b64encode(Path("user_photo.jpg").read_bytes()).decode()

signed_bytes = sign_c2pa_cloud_test(
    api_key,
    Path("edited_photo.jpg").read_bytes(),  # edited output without its own C2PA manifest
    manifest_title="edited_photo.jpg",
    branded_gp_id="test",
    assertions=[["ingredient", {
        "relationship": "parentOf",
        "title": "user_photo.jpg",
        "media": original_b64,
        "action_history": [{
            "action": "c2pa.edited",
            "digitalSourceType": DigitalSourceType.COMPOSITE_WITH_TRAINED_ALGORITHMIC_MEDIA.value,
        }],
    }]],
)
Path("edited_photo_signed.jpg").write_bytes(signed_bytes)

See Ingredients and Redaction for a complete example.

Inputs with remote manifests

Some files carry a URL to a remote manifest instead of an embedded one; Trufo fetches it from allowed hosts and applies the same rules as an embedded manifest. If it cannot be fetched, a request with ai_system or creation is refused under "auto" with 400 RemoteManifestUnavailable; see Remote Manifests for the allowed-host settings.


5. Production Rollout and Verification

  1. Complete OV and subscribe to a C2PA Signing plan (2. Trufo Account Setup); for ai_modified or edits of user media, obtain an approved branded_gp_id (3. Managed Signing Setup).
  2. Switch to a c2pa-sign-prod key and sign_c2pa_cloud() / sign_c2pa_local(), targeting https://api.trufo.ai or https://eu.api.trufo.ai (trufo_api_url=TRUFO_API_URL_EUROPE).
  3. Add publisher identity and training preferences for extended labeling:
from pathlib import Path

from trufo import sign_c2pa_cloud
from trufo.util.credentials import TrufoAPIKey, load_api_key

AI_SYSTEM_ID = "aisys_..."

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_PROD)
signed_bytes = sign_c2pa_cloud(
    api_key,
    Path("generated.png").read_bytes(),
    manifest_title="generated.png",
    assertions=[
        ["ai_system", {"ai_system_id": AI_SYSTEM_ID, "ai_involvement": "ai_generated"}],
        ["cawg_training", {"assertion": {"entries": {
            "cawg.ai_generative_training": {"use": "notAllowed"},
        }}}],
        ["cawg_identity", {"cawg_identity_id": "org_interim"}],  # requires cawg_cert_organization
    ],
    actions=[
        ["watermark", {"wid_allocation_mode": "per_embed", "effort_policy": "require_if_supported"}],
    ],
)
Path("labeled.png").write_bytes(signed_bytes)
  1. Choose the watermark allocation mode and effort policy for your formats (8. Watermarking with Pawprint).
  2. Verify sample outputs at verify.trufo.ai or with c2patool: c2pa.actions should show c2pa.created with trainedAlgorithmicMedia (or compositeWithTrainedAlgorithmicMedia), plus c2pa.ai-disclosure where requested. A per_embed watermark also writes c2pa.soft-binding; a per_ai_system watermark writes c2pa.watermarked.unbound without c2pa.soft-binding (Verification).
  3. Monitor TrufoServerWarning notices, which report skipped watermarks and kept incoming manifests (Error Handling).

Next Steps

Reference