Skip to main content

kennmarq

Mark AI pictures, songs and clips for the EU AI Act and California's AI Transparency Act in one call. Each gets an invisible watermark (TrustMark for pictures, AudioSeal for sound, Video Seal for frames), and signed, time-stamped C2PA Content Credentials that say it was made with AI. Kennmarq.com helps you meet the Act's marking duty (Art. 50(2)) and the Code of Practice's two-layer measure; you stay responsible for your system.

pip install kennmarq                 # the cloud API: no dependencies
pip install "kennmarq[local]"        # local mode: files never leave your machine
pip install "kennmarq[safety]"       # the safety check on your machine too

A free key comes with 1,000 marks a month and every feature: kennmarq.com. The SDK reads it from KENNMARQ_API_KEY.

Cloud

from kennmarq import Kennmarq

k = Kennmarq()
result = k.mark("render.png", "render.marked.png", source="created", model="FLUX.1 schnell")
print(result.mark_id, result.watermark_id, result.marks_used)

The picture goes to Kennmarq.com's servers in Zurich, which mark it in memory and keep nothing.

Add label=True to draw the EU's visible AI label ("AI GENERATED", or "AI MODIFIED" for edits) into a picture or every frame of a clip, before the watermark; deepfake=True turns it on by itself, and label_language, label_position, label_size and label_style shape it (docs). Labels are drawn in the cloud.

Songs and clips

song = k.mark("track.mp3", "track.marked.mp3", model="Song Model 2")
print(song.marks_counted, song.audio_watermark)   # five marks per started minute; "claimed"

clip = k.mark("clip.mp4", "clip.marked.mp4", check="ai-act")   # waits for the job, then downloads
print(clip.watermark_id, clip.marks_counted)      # five marks per started second

Songs (MP3, WAV, M4A, up to 15 minutes) carry Meta's AudioSeal in the sound, shaped so no one hears it; clips (MP4 at up to 1080p, 4,500 frames: 2.5 minutes at 30 frames a second) carry Video Seal in every frame and AudioSeal in their sound. Both are marked in the cloud. A clip is a job: mark() waits for it and downloads the marked clip; mark(..., wait=False) returns at once, and wait_for(mark_id, dest) finishes later.

Local mode

result = k.mark_file("render.png", "render.marked.png", source="created", model="FLUX.1 schnell")

The watermark and the Content Credentials are made on your machine. Only the manifest goes to Kennmarq.com: about 13 KB of claim and assertions, never pixels. Kennmarq.com signs and time-stamps it, and the SDK puts it back in your file. Before writing anything, the SDK checks the file reads as signed by Kennmarq.com, with a validated time-stamp and the watermark in place; if not, it raises InvalidSignedFile and writes nothing. Each file counts one mark.

  • Credentials your file already carries (from an upstream model's API, say) are kept as an ingredient, as the Code of Practice asks. They travel with the manifest, with any thumbnail their signer put in them; keep_input_credentials=False keeps and sends none.
  • The watermark's model (TrustMark Q, 65 MB) downloads once, to ~/.cache/kennmarq/models or KENNMARQ_MODELS_DIR, and is checked against its pinned SHA-256.
  • Where c2pa-python has no build for your system (Windows, for now), mark_file makes the watermark on your machine and sends the watermarked picture to the cloud for its manifest (mode == "hybrid").
  • Without a key, watermark_file() adds the watermark and the IPTC AI label alone, with no Content Credentials.

The safety check

answer = k.check("render.png", policy="ai-act")              # cloud: two marks
answer = k.check("render.png", policy="ai-act", local=True)  # here: nothing sent, nothing counted
if answer["verdict"] == "block":
    ...

It screens a picture for what the AI Act's new bans are about (Art. 5(1)(ba) and (bb)): sexual content with someone who appears to be a child, and with a realistic face, which needs the person's consent. ai-act blocks the first and flags the second; safe-only also blocks anything explicit. It returns a verdict and a reason, never an age or an identity. It's a risk signal with published error rates (docs), not a guarantee: you decide, and stay responsible. Locally its models download once (about 2.3 GB). mark() and mark_file() take check= too: a block raises ContentBlocked and nothing is marked.

Check a file

k.verify("render.marked.png")    # free, no key needed

What its Content Credentials and its watermark say, and the credential the watermark leads to when the metadata was stripped.

Errors

API errors raise KennmarqError with the API's code, status and request_id (docs). ContentBlocked carries the check's answer in safety.

MIT-licensed. The paid part is Kennmarq.com's signature, the time-stamps and the stored credentials. The face model and the prompt embeddings bundled for the safety check carry their own licences: THIRD_PARTY_NOTICES.md.

Metadata

Release files for kennmarq 0.2.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 kennmarq 0.2.1
File Size Uploaded Provenance Actions
kennmarq-0.2.1.tar.gz 364.4 kB Without provenance Details for kennmarq-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 732.2 kB

Release files / kennmarq-0.2.1.tar.gz

Download URL kennmarq-0.2.1.tar.gz
Size 364.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5ca728aba7e98a779ba5a042f8965f0ff8334c416fd1886ea3c3a8c9dbb71ed9
BLAKE2b-256 checksum
How to use checksums
1d0ee2c9440751cbcd51e919cf4602ec3220face9d08e03de9dac30a34eaeafc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / kennmarq-0.2.1-py3-none-any.whl

Download URL kennmarq-0.2.1-py3-none-any.whl
Size 367.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
797c845d3971f4df13fa8e142bd103083abeffe17e4a125359c8aa379d84a3b0
BLAKE2b-256 checksum
How to use checksums
0551cdb2b2b3e06735c997123feb33054e220869a6539d469fad633cbbe49840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for kennmarq 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

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