Skip to main content

Python SDK for Certivu — quantum-resistant trust infrastructure for AI-generated content

Project description

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

  1. Create a generator in the dashboard and select its supported formats (image, audio, text).

  2. Copy the generator ID and your org API key.

  3. 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

Project details


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.0.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certivu-2.0.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file certivu-2.0.1.tar.gz.

File metadata

  • Download URL: certivu-2.0.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for certivu-2.0.1.tar.gz
Algorithm Hash digest
SHA256 c797ebc2db92bd38b882b6b12315de396d95413231f2e2ef811e36fda93f030e
MD5 9cb0d9e33c1df2e087fd37b93c01c1ca
BLAKE2b-256 f682938a90509de6d8d6f600f3ecea9026b16312741e7ab00c2d0a65c40c4b7c

See more details on using hashes here.

File details

Details for the file certivu-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: certivu-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for certivu-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b721736db93a9d96ed7bb766cdf1d79df18a5c4c6be633dbe033f45f429db0
MD5 7e3ba29d0e99a488c6dbb13d2e97f569
BLAKE2b-256 ada0dbc94e413c74ecd2577bf9f9e340873d6805cc1b1de4ac981f568e88f3b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page