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.

Topics

C2PA Manifests, Actions, and Assertions

How C2PA manifests built by Trufo are structured — manifest settings, created vs. gathered assertions, actions, digital source types, software agents, C2PA/CAWG metadata, and custom assertions.


Manifest Settings (ManifestSettings)

Pass manifest_settings to control display titles, thumbnails, and the allActionsIncluded claim flag:

from trufo import sign_c2pa_cloud_test
from trufo.c2pa import ManifestSettings, ThumbnailPolicy, ThumbnailSettings, ThumbnailSize

settings = ManifestSettings(
    manifest_title="hero_banner_v2.jpg",
    ingredient_title="hero_banner_v1.jpg",
    thumbnail_settings=ThumbnailSettings(
        policy=ThumbnailPolicy.AUTO,
        size=ThumbnailSize.MEDIUM,
    ),
    all_actions_included=True,
)

signed_bytes = sign_c2pa_cloud_test(api_key, media_bytes, manifest_settings=settings)
  • manifest_title / ingredient_title: Set dc:title on the new manifest and the implicit input parent ingredient (typically filenames). Top-level manifest_title / ingredient_title fields also exist as aliases; do not set both. When manifest_title is unset, the new manifest has no dc:title. When ingredient_title is unset, the parent ingredient takes the input’s existing manifest title or else input.<ext>, with <ext> derived by sniffing the media bytes — which cannot tell apart formats that share a container (TIFF / DNG, HEIC / HEIF / AVIF). Always set both titles explicitly for those formats so the intended extension is shown.
  • thumbnail_settings: Controls claim and ingredient thumbnail generation — see Storage Options and Privacy.
  • all_actions_included: Signals whether the manifest’s c2pa.actions list is a complete record of actions on the asset. Defaults to True on standard signs, and False whenever creation, parentOf, action_history, or placement="created" is used. Setting all_actions_included=True with a parentOf ingredient that has no action_history is refused (400 Conflict).

Created vs. Gathered Assertions

In C2PA 2.x, assertions sit in one of two buckets:

  • created assertions: Claims the signing generator product attests to directly (for example, c2pa.actions for operations Trufo actually performed, c2pa.hash.data, or c2pa.created under an authorized Branded Generator Product / first-party AI system).
  • gathered assertions: Information supplied by the caller or external tools (the default for cawg_training, custom, and non-parent ingredients; c2pa_metadata and cawg_metadata are always gathered — omit placement on them).

Requesting placement="created" on the user-supplied assertions and ingredients that allow it — or using creation, parentOf, or action_history — requires an approved branded_gp_id (403 C2PACreatedUserAssertionsNotAuthorized otherwise). Every manifest also carries ai.trufo.identity (oid and validated legal name when OV is active), injected automatically.


Actions

Pass actions as an ordered list of [name, params] pairs. Media actions run in order, each feeding its output to the next; an action whose input already satisfies its parameters is a no-op and records no C2PA action.

Action Recorded C2PA action Notes
["resize", {"width": 1600}] c2pa.resized.proportional Preserves aspect ratio; combinable with c2pa.created
["crop", {"x": 0, "y": 0, "width": 800, "height": 600}] c2pa.cropped Combinable with c2pa.created
["trim", {"start": 1.0, "end": 10.0}] c2pa.trimmed Audio/video exact cut; combinable with c2pa.created
["transcode", {"target_mime_type": "image/webp", "quality": 85}] c2pa.transcoded Cannot combine with c2pa.created (400 Conflict)
["repackage", {"target_mime_type": "video/mp4"}] c2pa.repackaged Stream-copy remux; cannot combine with c2pa.created
["watermark", {"wid_allocation_mode": "per_embed"}] c2pa.watermarked.bound / .unbound Place last after media actions
["publish", {}] c2pa.published Annotation-only
["redact", {"label": "c2pa.metadata", "reason": "c2pa.PII.present"}] c2pa.redacted Removes a named assertion from prior manifest history

To declare edits that happened outside Trufo (e.g., in Photoshop or a video editor), attach the pre-edit file as a parentOf ingredient with action_history — see Ingredients and Redaction.


Digital Source Type

C2PA uses IPTC Digital Source Type URIs (http://cv.iptc.org/newscodes/digitalsourcetype/<value>) to distinguish how an asset or edit originated:

  • trainedAlgorithmicMedia — generated by a trained AI model
  • compositeWithTrainedAlgorithmicMedia — human or captured media edited/composited with AI
  • digitalCapture / computationalCapture — camera capture
  • digitalCreation / humanEdits — human-created digital artwork or edits

When using ai_system, Trufo sets the appropriate AI digitalSourceType automatically. When using creation or action_history (with a branded_gp_id), specify digitalSourceType explicitly — it is required on creation and on every action_history C2PA action except c2pa.converted, c2pa.edited.metadata, c2pa.enhanced, c2pa.published, c2pa.repackaged, c2pa.resized.proportional, c2pa.transcoded, and c2pa.watermarked.unbound.


Software Agents

Software agents identify the tool or service that performed a creation or action_history step. Register them once per API region with POST /c2pa/software-agent/add (api.trufo.ai and eu.api.trufo.ai store software-agent records separately; test.api.trufo.ai does not serve these routes and resolves agents registered on api.trufo.ai):

import requests

from trufo.api.endpoints import (
    TPS_C2PA_SOFTWARE_AGENT_ADD_PATH,
    TPS_C2PA_SOFTWARE_AGENT_LIST_PATH,
    TRUFO_API_URL,
)

headers = {"X-API-Key": api_key}  # c2pa-sign-prod or c2pa-sign-test

resp = requests.post(
    TRUFO_API_URL + TPS_C2PA_SOFTWARE_AGENT_ADD_PATH,
    headers=headers,
    json={
        "agent": {"name": "Acme Studio Renderer", "version": "2.4.0"},
        "nickname": "studio-renderer-v2",
    },
    timeout=60,
)
resp.raise_for_status()
agent_id = resp.json()["software_agent_id"]  # "swagent_..."

# List registered agents in this region
agents = requests.post(
    TRUFO_API_URL + TPS_C2PA_SOFTWARE_AGENT_LIST_PATH, headers=headers, json={}, timeout=60
).json()["items"]

Then pass {"software_agent_id": agent_id} inside a creation assertion or an action_history entry. (If you use ai_system, Trufo automatically uses the registered AI system’s name and version as the software agent — you do not need a separate software-agent registration.) See Software Agents for the full request schema.


C2PA Metadata (c2pa_metadata)

Use c2pa_metadata (C2PA 2.4 §18.17.3, gathered only) for camera, capture, and technical asset metadata (EXIF, TIFF, XMP, IPTC, Photoshop, Camera Raw, PDF):

["c2pa_metadata", {
    "assertion": {
        "@context": {
            "exif": "http://ns.adobe.com/exif/1.0/",
            "tiff": "http://ns.adobe.com/tiff/1.0/",
            "Iptc4xmpExt": "http://iptc.org/std/Iptc4xmpExt/2008-02-29/",
        },
        "tiff:Make": "Example Camera Co.",
        "tiff:Model": "EC-100",
        "exif:DateTimeOriginal": "2026-09-01T14:22:00Z",
        "Iptc4xmpExt:DigImageGUID": "img-9f8e7d6c",
    },
}]

Every prefix used must be declared in @context with its exact allowlisted URI and supported fields (unsupported fields return 400 UnsupportedC2PAMetadataField). Note that exifEX uses http://cipa.jp/exif/1.0/ in c2pa_metadata and http://cipa.jp/exif/2.32/ in cawg_metadata.


CAWG Metadata, Training Preferences, and Identity

Use CAWG assertions for creator/rights metadata, AI training permissions, and verified organization identity:

  • cawg_metadata (cawg.metadata): JSON-LD creator, credit, rights, location, and Schema.org metadata.
  • cawg_training (cawg.training-mining): declares "allowed", "notAllowed", or "constrained" for cawg.ai_training, cawg.ai_generative_training, cawg.ai_inference, and cawg.data_mining.
  • cawg_identity (cawg.identity): cryptographically signs gathered assertions with your organization’s CAWG certificate ("org_interim", or "test" on test.api.trufo.ai).

For full examples and namespace tables, see CAWG Identity and Metadata.


Custom Assertions (custom) and Domain Validation

Attach organization-specific assertions under a reverse-DNS label you control (for example, com.example.asset-info):

["custom", {
    "label": "com.example.asset-info",
    "assertion": {
        "campaign_id": "2026-q4-launch",
        "sku": "SKU-4821",
    },
}]
  • Domain Validation required: Your organization must have active c2pa-custom-assertion Domain Validation for the label’s base domain, or signing returns 403 InvalidC2PACustomDomain. Domain Validation requires the Custom Domain plan (c2pa_custom_domain). Configure DV in app.trufo.ai or via /domain/dv/submit + DNS CNAME + /domain/dv/check (see Certificates, TSA, and OCSP API).
  • Domain matching: The validated domain is reversed and matched as a prefix: validating example.com authorizes com.example and every label beginning with com.example. — including subdomain namespaces such as com.example.sub.asset-info. The same check covers custom redact reasons and custom action_history action names.
  • Label rules: Cannot use the c2pa namespace or contain __.
  • .metadata suffix rule: Labels ending in .metadata (e.g., com.example.catalog.metadata) are written as JSON-LD and must include a non-empty @context object (400 InvalidMetadataContext otherwise).
  • Not redactable later: redact accepts only c2pa.metadata, cawg.metadata, cawg.training-mining, and cawg.identity. A custom assertion (like the automatic ai.trufo.identity) cannot be removed by a later redact, so do not put data in it that you may need to withdraw.

Reference