certivu-python
Python SDK for Certivu — quantum-resistant trust infrastructure for AI-generated content.
Install
pip install certivu
Quick start
from certivu import CertivuClient
client = CertivuClient(
api_key="ctv_key_abc123",
generator_id="your-generator-uuid",
)
# Sign AI-generated content — images, audio, or text; format auto-detected
result = client.sign(content=image_bytes, model="stable-diffusion-xl")
# result.signed_content — bytes of the signed file (serve this, not the original)
# result.token — ctv_ provenance token
# result.format — 'image' | 'audio' | 'text'
# Sign audio or text explicitly
result = client.sign(content=pdf_bytes, model="gpt-4o", format="text")
# Verify — no API key needed, always free
result = client.verify(content=image_bytes)
if result.authentic and result.confidence == "high":
print(result.provenance.org, result.provenance.signed_at)
# Verify without re-uploading the image
status = client.get_token_status("ctv_7f3kx9mq2...")
# Batch verify
results = client.verify_batch([
{"content": image1_bytes},
{"content": image2_bytes, "token": "ctv_..."},
])
# Audit log
page = client.get_audit_log(page=1, limit=50)
Async
from certivu import AsyncCertivuClient
async with AsyncCertivuClient(api_key="ctv_key_abc123") as client:
result = await client.verify(content=image_bytes)
results = await client.verify_batch([{"content": img} for img in images])
Generator setup
-
Create a generator in the dashboard and select its supported formats (image, audio, text).
-
Copy the generator ID and your org API key.
-
Sign content — all cryptography (ML-DSA, watermarking, hashing) is handled server-side:
result = client.sign( content=file_bytes, model="stable-diffusion-xl", generator_id="gen_xyz", ) output_file.write(result.signed_content)
Confidence levels
| Confidence | Meaning |
|---|---|
high |
Watermark ✓ + Record ✓ + Signature ✓ — full chain intact |
medium |
Record ✓ + Signature ✓ — re-uploaded without watermark |
low |
Partial signals — something is off |
none |
Not signed by Certivu — no claim either way |
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
certivu-2.4.1.tar.gz
(11.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file certivu-2.4.1.tar.gz.
File metadata
- Download URL: certivu-2.4.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a2e848ba8daf38f9da7936f9892c4760e9fa1281434cfab668a2d01b6f00260
|
|
| MD5 |
27c510d5c7d19a4712d93431eeaccff2
|
|
| BLAKE2b-256 |
0fb432709554287600050303f39c79f6b149376ed59d6e65627c225596315427
|
File details
Details for the file certivu-2.4.1-py3-none-any.whl.
File metadata
- Download URL: certivu-2.4.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
693738c204bf692c8cb34de33ce98df51213999e0bd46451959dc76d9f421baf
|
|
| MD5 |
3e5c70b7ce81e47a65470b2052f16e7f
|
|
| BLAKE2b-256 |
44acb4ee126388668e32740d004b7af3f443b23544d9d81f6076a15dfce7cd94
|