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

3. Managed Signing Setup

Set up C2PA signing through Trufo: choose Starter or Branded signing and an execution mode, integrate against the test host, complete Branded Product Validation (BPV) if needed, and move to production.

Prerequisites: an account with MFA, an organization, and API keys (2. Trufo Account Setup).


1. Choose Starter or Branded Signing

Tier Who signs Choose this when Validation
Managed Signing (Starter) Trufo, with Trufo’s shared C2PA certificate You are publishing assets, declaring first-party AI-generated outputs (ai_generated), adding CAWG identity/metadata, running Trufo media actions, or watermarking Organization Validation (OV)
Managed Signing (Branded) Trufo, with a dedicated certificate issued for your registered C2PA product You need AI-edit labels (ai_modified), asset creation (creation, placement="created"), explicit parentOf ingredients (with or without action_history), or your own product name on the signing certificate OV + Branded Product Validation (BPV)

Building an in-house C2PA Generator Product with your own signing keys and Trufo-issued certificates instead? See 5. C2PA Certificates. For a full comparison of all three paths, see 1. Choose Your Path to C2PA Implementation.

Starter and Branded signing use the same functions and request fields; Branded signing adds branded_gp_id.


2. Choose an Execution Mode and Region

Mode How to call Original media sent to Trufo Requirements
Cloud, direct (REQUEST) sign_c2pa_cloud() / POST /c2pa/sign with media_input Yes pip install trufo; ≤ 10 MB
Cloud, via S3 (TASK) sign_c2pa_cloud(..., execution_mode=ExecutionMode.TASK, mime_type=...) Yes (ephemeral S3, deleted after 1–2 days) Production hosts only; required above 10 MB and for media actions (watermark, resize, crop, trim, transcode, repackage) on audio, video, PDF, or SVG
Local, Python SDK sign_c2pa_local() No Linux x86_64/arm64 (glibc 2.28+), CPython 3.10–3.15 (3.12+ for trufo[local-full]), sdk-download key configured against packages.trufo.ai; trufo[local-sign-only], or trufo[local-full] for watermarking
Local, Docker POST /c2pa/sign on ghcr.io/trufo-ai/trufo-local:2.4 (2.4-full for watermarking) No Docker, sdk-download key; any language over local HTTP

In Local mode, Trufo receives your request parameters (ingredient bytes replaced by hashes), the claim to sign, and the finished manifest. To keep generated thumbnails and stored manifest copies off Trufo, set thumbnail_settings.policy to "none" and skip_manifest_storage=True (not compatible with per_embed watermarking). See Storage Options and Privacy.

Region: the host you call decides where Cloud-mode media is processed. Use https://api.trufo.ai for US/Global, or https://eu.api.trufo.ai (TRUFO_API_URL_EUROPE) to keep processing in EU infrastructure (set TRUFO_API_URL=https://eu.api.trufo.ai for the Docker image). Poll tasks on the host that accepted them. For other dedicated regional deployments, contact support@trufo.ai.

Setup details: Cloud Signing, Local Signing (Python SDK), Local Signing (Docker).


3. Integrate on the Test Host

  1. Create a c2pa-sign-test key (2. Trufo Account Setup) and store it as TRUFO_C2PA_SIGN_TEST_API_KEY.
  2. Sign against https://test.api.trufo.ai:
from pathlib import Path

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

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_TEST)
assert api_key, "Set TRUFO_C2PA_SIGN_TEST_API_KEY or run: trufo set-api-key c2pa-sign-test <KEY>"

signed_bytes = sign_c2pa_cloud_test(
    api_key,
    Path("input.jpg").read_bytes(),
    manifest_title="signed.jpg",
    ingredient_title="input.jpg",
    actions=[["publish", {}]],
)
Path("signed.jpg").write_bytes(signed_bytes)

Checkpoint: inspect the result with c2patool signed.jpg. You should see a c2pa.published action and an ai.trufo.identity assertion. Public validators flag test-host signatures as untrusted because they chain to Trufo’s test root — that is expected on the test host (see Verifying Test-Host Assets in CI).

For Local mode, call sign_c2pa_local_test(api_key, media_bytes, ...) with the same keyword arguments, or point the Docker image at TRUFO_API_URL=https://test.api.trufo.ai. To also attach a CAWG identity assertion, see 7. CAWG Identity. The full runnable script is signing_cloud.py.

  1. Prototype branded flows before BPV approval with branded_gp_id="test". This example declares an edit made outside Trufo by attaching the original as parentOf:
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("original.jpg").read_bytes()).decode()

signed_bytes = sign_c2pa_cloud_test(
    api_key,
    Path("edited.jpg").read_bytes(),  # must not carry its own C2PA manifest
    manifest_title="edited.jpg",
    branded_gp_id="test",
    assertions=[
        ["ingredient", {
            "relationship": "parentOf",
            "title": "original.jpg",
            "media": original_b64,
            "action_history": [
                {
                    "action": "c2pa.cropped",
                    "digitalSourceType": DigitalSourceType.HUMAN_EDITS.value,
                },
            ],
        }],
    ],
)
Path("edited_signed.jpg").write_bytes(signed_bytes)

Test-host behavior to plan around (see Setup and Credentials — Hosts):

  • Outputs carry a test certificate that public validators do not trust; add TCA Test Root CA as a local trust anchor to validate them in CI.
  • Only REQUEST execution is available; exercise media actions on audio and video with sign_c2pa_local_test() or the Docker image.
  • Register AI systems and software agents on https://api.trufo.ai (a c2pa-sign-test key is accepted) and reference them on the test host.
  • cawg_identity_id="test" and branded_gp_id="test" are accepted only on the test host.

4. Branded Product Validation (BPV)

Skip this step for Starter signing. (Building an in-house generator product instead? See Product Validation (PV) in 5. C2PA Certificates.)

Your Branded Generator Product certificate carries your product name as its Common Name (CN) with O=Trufo Inc., C=US by default; to list your own organization in O, contact support@trufo.ai.

Prerequisites

Submitting a BPV application requires only an MFA-verified owner or admin, so you can submit BPV while OV is in review. Approval requires active OV and the c2pa_signing_api_branded plan.

Prepare the draft

Each organization has one BPV draft. An owner or admin (MFA-verified session, see 2. Trufo Account Setup) can save fields and upload documents before final submission:

Step Endpoint
Read the draft GET /gproduct/bpv/draft
Save fields (only the fields sent are changed) POST /gproduct/bpv/draft/save
Upload a document (multipart/form-data, max 50 MB) POST /gproduct/bpv/upload
Discard the draft POST /gproduct/bpv/draft/discard

An upload returns an s3_key; add it to the matching list field (trademark_evidence_files, sec_arch_diagram_files, or security_certification_files) and save the draft. Send the full list of s3_key values each time — saving a list field replaces its previous value:

import requests
from trufo.util.credentials import load_session

session = load_session()  # api.trufo.ai; make_request() refreshes the access token on 401

session.make_request("/gproduct/bpv/draft/save", {
    "product_name": "<PRODUCT_NAME>",
    "product_url": "https://<your-domain>/",
    "name_has_trademarks": True,
})

with open("trademark-registration.pdf", "rb") as f:
    resp = requests.post(
        "https://api.trufo.ai/gproduct/bpv/upload",
        headers={"Authorization": f"Bearer {session.access_token}"},
        files={"file": f},
        timeout=120,
    )
resp.raise_for_status()

session.make_request(
    "/gproduct/bpv/draft/save",
    {"trademark_evidence_files": [resp.json()["s3_key"]]},
)

Prepare before submitting a BPV application:

  • Product name: the name that appears as CN on the product’s certificate, and the product URL.
  • Source types: the set of digitalSourceType values the product will declare. Declaring captured media or non-generative digital creation, or running part of the product on apps or devices you do not operate, also needs security architecture diagrams.
  • Trademarks: if the product name includes trademarks, a clearance attestation and supporting evidence.
  • Security posture: credential storage, scanning tools, access controls, and any ISO 27001 or SOC 2 certification with its documents.

The exact field schemas are in Certificates API — PV and BPV.

Submit and track approval

  1. An owner or admin reviews and submits the application at C2PA Signing API → Manage (under Branded Generator Products).
  2. Find the product and track its review:
from trufo.util.credentials import load_session

session = load_session()
oid = session.make_request("/org/info", {})["oid"]

for gp in session.make_request("/gproduct/list", {"oid": oid})["gproducts"]:
    if gp["branded"]:
        status = session.make_request("/gproduct/bpv/status", {"gp_id": gp["gp_id"]})
        print(gp["gp_id"], gp["name"], status["status"], status["bpv_active"])

When status is "approved" and bpv_active is true, use that gp_... value as branded_gp_id. The ID is also shown on the product card at C2PA Signing API → Manage. reviewer_notes carries reviewer feedback.


5. Move to Production

  1. Confirm OV is active and a C2PA Signing plan (c2pa_signing_api or c2pa_signing_api_branded) is subscribed (2. Trufo Account Setup).
  2. Create a c2pa-sign-prod key and store it as TRUFO_C2PA_SIGN_PROD_API_KEY.
  3. Switch to the production helpers and key:
from pathlib import Path

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

api_key = load_api_key(TrufoAPIKey.C2PA_SIGN_PROD)
assert api_key, "Set TRUFO_C2PA_SIGN_PROD_API_KEY or run: trufo set-api-key c2pa-sign-prod <KEY>"

signed_bytes = sign_c2pa_cloud(
    api_key,
    Path("input.jpg").read_bytes(),
    manifest_title="signed.jpg",
    ingredient_title="input.jpg",
    actions=[["publish", {}]],
)
Path("signed.jpg").write_bytes(signed_bytes)

Optional production arguments:

  • Branded signing: pass branded_gp_id="gp_..." (your approved BPV product ID).
  • EU processing: pass trufo_api_url=TRUFO_API_URL_EUROPE (from trufo.api.endpoints) to route Cloud signing to https://eu.api.trufo.ai.
  • CAWG organization identity: add assertions=[["cawg_identity", {"cawg_identity_id": "org_interim"}]] (requires cawg_cert_organization; see 7. CAWG Identity).
  • Local mode: use sign_c2pa_local() (or a c2pa-sign-prod key with the Docker image). Test keys are refused on production hosts in Local mode (410).
  1. Verify sample outputs at verify.trufo.ai or with c2patool / c2pa-rs against the C2PA Trust List (Verification).
  2. Handle non-fatal warnings (emitted as TrufoServerWarning in Python) and avoid blind retries of POST /c2pa/sign, which is metered on completion and not deduplicated (Error Handling).

Common production errors: 403 MissingOrganizationValidation (OV not active), 403 BPVNotActive: <reason> (the reason names what is not active), 404 GProductNotFound (unknown branded_gp_id), 403 C2PACreatedUserAssertionsNotAuthorized (created assertions without an authorized branded_gp_id).


Next Steps

Reference