Detect. Stamp. Verify.

Python SDK for AI content detection and provenance. Detect AI-generated images, stamp content at creation, and verify origin — all in a few lines of code.

What the SDK Does

  • Detects whether an image is AI-generated using neural classification
  • Stamps content at creation with a cryptographic proof of origin
  • Verifies any content against the global proof registry
  • Returns confidence scores, provenance chains, and registry matches

Under 1MB installed. No ML dependencies. No models to download.

Install

1pip install 0byte

Analyze Content

Pass any image to analyze(). The API runs the neural classifier, checks metadata, and queries the proof registry — then returns a single verdict.

1from zerobyte import Client 2 3client = Client(api_key="0b_key_...") 4 5# Check if an image is AI-generated 6result = client.analyze(open("image.png", "rb").read()) 7 8print(result.verdict) # "ai_generated" | "likely_real" | "uncertain" 9print(result.confidence) # 0.94 10print(result.ai_probability) # 0.97

Stamp Content

If you're building an AI platform, call stamp() after generating content. This creates a signed proof of origin and stores it in the registry.

1# Stamp content at the point of creation 2proof = client.stamp( 3 content=image_bytes, 4 content_type="image/png", 5 provider="stability", 6 model="sdxl-turbo", 7) 8 9print(proof.id) # "0b_proof_abc123" 10print(proof.fingerprint) # perceptual content hash 11print(proof.verify_url) # "https://0byte.tech/proof/0b_proof_abc123"

Verify Content

Check if any content has been stamped in the registry. Works even after screenshots, re-encoding, and compression.

1# Check if content exists in the registry 2result = client.verify(content=some_image_bytes) 3 4print(result.matched) # True / False 5print(result.confidence) # fingerprint similarity score 6print(result.proof) # full provenance chain if matched

Full API reference and cURL examples available in the documentation.