Skip to main content

freshmint

Pythonic C2PA, sign every AI-generated image with verifiable provenance, no detection arms race, just cryptographic truth.

CI License: MIT Python 3.10+

7th sibling in the no-LLM-judge cluster. Where halluguard / imageguard / promptguard catch AI mistakes, freshmint shifts the conversation: stop asking "is this AI?", start cryptographically signing every output with what it actually is.


The problem detection can't solve

In 2026, no AI image detector reliably tells AI apart from real:

  • 2023 detectors: ~90% accurate
  • 2024: ~70%
  • 2025-2026: ~55-60% (coin flip)

Modern Flux / MJ v7 / gpt-image-2 outputs evade every classical signal (GAN artifacts, frequency analysis, CLIP fingerprints). Watermark attempts (C2PA, SynthID) only get adopted by a few large labs, open models bypass them.

Detection lost. Provenance can win.

What freshmint does

Adopts the C2PA standard (Coalition for Content Provenance and Authenticity, Adobe + Microsoft + Sony + Nikon + BBC + Truepic + Intel since 2021). Cryptographically signs every image / video / audio with:

  • Who made it (cert chain, optional pseudonymous identity)
  • What tool / device captured it
  • Whether AI was involved (and which model, prompt hash)
  • Edit history (each transformation logged)
  • Tamper detection (any pixel change after signing breaks the seal)

Verifiers (browsers, journalism tools, courts) read the manifest, see proof rather than guess.

Install

pip install freshmint

freshmint shells out to Adobe's c2patool for sign / verify, install it once on the host:

# Mac
brew install c2patool

# Linux / Windows: download a release binary
# https://github.com/contentauth/c2patool/releases
# and either put it on PATH or set FRESHMINT_C2PATOOL=/path/to/c2patool

The Python package itself has zero runtime dependencies.

Usage

from freshmint import AIAttestation, Manifest, sign, verify

# Sign, AI render side, be honest about it
manifest = Manifest(
    creator="sienna@nakata-app.com",
    title="Render of SKU-1002",
    ai_used=True,
    ai_attestation=AIAttestation(
        model="flux-pro-1.1",
        prompt_hash="sha256:abc...",
        source_image="SKU-1002.jpg",
        seed=4839,
    ),
)
signed_path = sign("render.png", manifest, signing_key="key.pem")

# Verify, any consumer side
result = verify(signed_path)
result.is_valid           # cryptographic signature OK
result.tampered           # bytes changed since signing
result.creator            # signer identity
result.ai_used            # was AI involved?
result.ai_attestation     # which model, what prompt, what source
result.actions            # full edit history
result.cert_chain_valid   # chain back to a trusted root CA

sign() falls back to c2patool's self-signed prototype cert when no cert= is passed, fine for development, swap in a real X.509 chain before shipping signed artifacts to consumers.

Why this approach actually works

  1. Standard exists. C2PA isn't speculation, Adobe Photoshop, Lightroom, Microsoft Edge, BBC, Sony Alpha cameras already write / read it.
  2. EU AI Act direction mandates AI-content disclosure. C2PA is the closest thing to a working compliance answer.
  3. Detection is dead. Every dollar spent on detection is wasted when the next model release breaks it. Cryptography doesn't break.
  4. Open ecosystem. Open-source verifier means any newsroom, any user, can check independently, no platform monopoly.

The market gap freshmint fills

Language C2PA SDK
Rust official (Adobe c2pa-rs)
JavaScript official (Adobe c2pa-js)
C++ / Swift via FFI
Python none, just an Adobe CLI binary.

Python developers (the ML / AI tooling crowd, the people who actually need to sign AI outputs) are stuck calling subprocess.run(["c2patool", ...]) and parsing JSON by hand.

freshmint = pythonic wrapper + sensible defaults + cluster-friendly extras (extra_assertions plumbing for halluguard / claimcheck / imageguard metadata).

Cluster fit

adaptmem, domain-tuned retrieval
halluguard, text hallucination guard
truthcheck, open-world fact check
promptguard, input gate (prompt injection)
imageguard, image hallucination
claimcheck, orchestration
freshmint, cryptographic provenance ← bu

Imageguard catches AI errors after the fact. Freshmint signs before distribution so consumers don't have to detect at all, they verify.

What v0.1 ships

  • Adobe c2patool 0.26+ subprocess wrapper with binary autodetect (env override → PATH → Homebrew → Linux package paths)
  • sign(path, manifest, signing_key, cert=...) end-to-end working (real binary roundtrip in CI / locally)
  • verify(path) returns a populated VerifyResult against the modern c2patool schema
  • Clear errors for missing binary, missing key, missing cert, c2patool non-zero exit
  • AI-attestation helpers (model, prompt hash, source image, seed)
  • Auto-synthesised c2pa.created action so default manifests pass C2PA validation (validation_state=Valid)
  • 21 unit + 3 integration tests, mypy --strict, ruff clean
  • Zero runtime dependencies

Roadmap

  • v0.2: detached manifests, batch sign helper, more extra_assertions bindings for cluster siblings.
  • v0.3: freshmint serve FastAPI daemon for batch signing.
  • v0.4: browser-extension companion verifier.
  • v1.0: pure-Python COSE / CBOR backend, drop the c2patool subprocess dependency. Public signatures stay stable across the swap.

License

MIT.

Security

See SECURITY.md. Don't open public issues for vulnerabilities.

Release files for freshmint 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for freshmint 0.1.1
File Size Uploaded
freshmint-0.1.1.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for freshmint 0.1.1
File Interpreter ABI Platform
freshmint-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / freshmint-0.1.1.tar.gz

Download URL freshmint-0.1.1.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
056a064d7438e7bbc436b9dfda4d4df573115e9fd31136493d5e5ffdb9c9b4d5
BLAKE2b-256 checksum
How to use checksums
37d8a0b92744218b58c09ba7139bcb60e17a70f4d89b98f4a5f0bce6cfcbfef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / freshmint-0.1.1-py3-none-any.whl

Download URL freshmint-0.1.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
486aff1b2117c2b6004e3462e86d6922f8b135eb2e9d41a25a58275a143b24cc
BLAKE2b-256 checksum
How to use checksums
e214a97985e065972c5f8188618a3ad7ec949d9080e341119b2b4ae2f0b0ae35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page