The Two Routes
Open-Source SDK (c2pa-python) | Managed Signing (trufo) | |
|---|---|---|
| Who builds the manifest | Your code | Trufo (in Cloud or Local mode) |
| Certificate | Yours — you procure, store, and renew it | Trufo’s, issued under the C2PA Trust List |
| Trusted by validators | After passing C2PA conformance and buying a certificate | From the first production call |
| Timestamping & OCSP | You configure a trusted TSA and OCSP stapling | Included automatically |
| Watermark soft binding | Separate integration and registry | One action in the same call |
| Best for | Teams where C2PA is a core product capability | Teams that need compliant output quickly |
Managed Signing with trufo
trufo is Trufo’s open-source Python SDK. Install it, save a test key from the Trufo Dashboard, and sign:
pip install trufo
trufo set-api-key c2pa-sign-test <your-api-key>
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)
signed_bytes = sign_c2pa_cloud_test(api_key, Path("input.jpg").read_bytes())
Path("signed.jpg").write_bytes(signed_bytes)
Switch to sign_c2pa_cloud() with a c2pa-sign-prod key for production output trusted by validators. See Setup and Cloud Signing.
Label AI Output
Register your AI system once, then reference its ai_system_id when signing. The output is signed with digitalSourceType = trainedAlgorithmicMedia in the format expected by validators and regulators. The AI Labeling topic guide has the full call.
To embed an invisible PawPrint watermark so the credential survives metadata stripping, add a single action:
signed_bytes = sign_c2pa_cloud_test(
api_key,
media_bytes,
actions=[["watermark", {}]],
)
Keep Media on Your Machine
In Local mode, media hashing, watermarking, and manifest assembly run on your own host and Trufo only signs the claim digest — your media files are never uploaded:
pip install "trufo[local-sign-only]"
Call sign_c2pa_local() in place of sign_c2pa_cloud() (or sign_c2pa_local_test() on the test host). For non-Python services, the same local engine ships as a Docker container (ghcr.io/trufo-ai/trufo-local:2.4). See Local Signing with Python and Local Signing with Docker.
Read a Manifest
To inspect a signed file from Python, use the open-source c2pa reader:
from c2pa import Reader
with Reader("signed.jpg") as reader:
print(reader.json())
Check the library’s documentation for the exact API in your installed version. For browser and CLI inspection, see How to Verify C2PA Content Credentials.
How to Choose
Build your own Generator Product if C2PA is part of what you sell, you must sign fully offline, or you want complete ownership of the signing software. Plan for C2PA conformance review (typically 6–16 weeks of engineering) plus HSM/KMS key management and certificate renewal; Trufo supplies the certificates and timestamping for that route.
Use managed signing if you need trusted, compliant output quickly without maintaining a conformance filing or signing stack. Pricing starts at $120/mo.