0byte docs
Cryptographic proofs of origin for AI content — stamp what you generate, and analyze anything to check its origin, even from a screenshot. One REST API and a Python SDK, no models to host.
Overview
0byte gives every AI generation a perceptual fingerprint and a signed, public proof of origin — stamp at generation, then check anything later. Two verbs cover the flow:
- Stamp — mint a cryptographic proof of origin the moment content is generated.
- Analyze — check any content for AI origin: a neural classifier, metadata, and a registry lookup that recovers the original proof when one exists — even after re-encoding or a screenshot.
Quickstart
Install the Python SDK:
pip install 0byteThen stamp a generation, and analyze anything to check its origin — even a screenshot:
from zerobyte import Client
client = Client(api_key="0b_key_...")
# 1 · Stamp an AI generation → a signed proof of origin
proof = client.stamp(
content=open("art.png", "rb").read(),
content_type="image/png",
provider="openai",
model="dall-e-3",
)
print(proof.verify_url) # https://0byte.tech/proof/0b_...
# 2 · Analyze anything later to check its origin — even a screenshot
result = client.analyze(open("downloaded.png", "rb").read())
print(result.verdict, result.confidence) # "ai_generated" 0.94Need an API key?
Stamp and analyze require a key. Grab one from your dashboard — join the waitlist for access. Proof lookups and transparency are public.Authentication
Stamp, analyze, and key-management requests authenticate with a bearer token:
Authorization: Bearer 0b_key_...Public by design
Proof lookup and the transparency endpoints need no key — anyone can independently check a record, which is the whole point of a public registry.Rate limits
| Tier | Limit | Scopes |
|---|---|---|
| Free | 60 req/min | analyze · stamp |
| Dev | 300 req/min | analyze · stamp |
| Pro | 1,000 req/min | analyze · stamp |
Over the limit returns 429 RATE_LIMITED.
How it works
0byte never embeds anything in your media. Instead it derives a perceptual fingerprint and stores it with a signed record, so origin survives screenshots, re-encoding, and metadata stripping.
Stamp
At generation, hash the content and sign a proof of origin into the registry.
Analyze
Fingerprint any file, run a neural classifier and metadata checks, and match it against the registry to recover its proof.
Fingerprinting
0byte matches content with perceptual hashing rather than exact byte matching. Two visually-identical images produce near-identical fingerprints, so a match holds even after JPEG re-encoding, cropping, resizing, or a screenshot — the cases where embedded metadata and watermarks usually break.
analyze compares fingerprints by similarity distance; the returned confidence reflects how close the match is.Transparency log
Every proof is batched into a signed Merkle tree roughly every 60 seconds and the root is published. Anyone can request an inclusion proof to confirm a specific record was committed to the log and never altered — no blockchain, just Ed25519 signatures over an append-only tree.
Python SDK
A thin, dependency-light client — under 1 MB installed, no ML on your side.
pip install 0byteStamp
proof = client.stamp(
content=image_bytes,
content_type="image/png",
provider="stability",
model="sdxl-turbo",
)
print(proof.id) # "0b_a1b2c3d4-..."
print(proof.fingerprint) # perceptual content hash
print(proof.verify_url) # public proof pageAnalyze
result = client.analyze(open("photo.png", "rb").read())
print(result.verdict) # "ai_generated"
print(result.confidence) # 0.94
print(result.ai_probability) # 0.97Look up a proof
proof = client.get_proof("0b_a1b2c3d4-...")
print(proof.provider) # "stability"
print(proof.model) # "sdxl-turbo"
print(proof.signature) # Ed25519 signatureAPI reference
All endpoints live under https://api.0byte.tech and return JSON.
Stamp
/v1/stampAPI keyCreate a signed proof of origin for a piece of generated media.
| Field | Type | Description |
|---|---|---|
contentreq | string | Base64-encoded media (max 50 MB). |
content_typereq | string | MIME type — image/png, image/jpeg, video/mp4, audio/mp3. |
providerreq | string | AI provider, e.g. openai, stability. |
modelreq | string | Model identifier, e.g. dall-e-3, sdxl-turbo. |
metadata | object | Optional JSON stored with the proof. |
curl -X POST https://api.0byte.tech/v1/stamp \
-H "Authorization: Bearer 0b_key_..." \
-H "Content-Type: application/json" \
-d '{
"content": "<base64_encoded_media>",
"content_type": "image/png",
"provider": "openai",
"model": "dall-e-3",
"metadata": {"prompt_hash": "abc123"}
}'Analyze
/v1/analyzeAPI keyDetect whether an image is AI-generated. Runs the neural classifier, checks metadata, and queries the registry, then returns a weighted verdict.
| Field | Type | Description |
|---|---|---|
contentreq | string | Base64-encoded image. |
content_typereq | string | image/png, image/jpeg, or image/webp. |
curl -X POST https://api.0byte.tech/v1/analyze \
-H "Authorization: Bearer 0b_key_..." \
-H "Content-Type: application/json" \
-d '{
"content": "<base64_encoded_image>",
"content_type": "image/png"
}'verdict—ai_generated,likely_real, oruncertain.confidence— 0–1, weighted across all signals.registry_match— the proof, if the content was found in the registry.
Get proof
/v1/proofs/:idPublicFetch a specific proof by its ID.
curl https://api.0byte.tech/v1/proofs/0b_a1b2c3d4-...API keys
/v1/keysAPI keyManage keys programmatically. The raw key is returned once, on create.
curl -X POST https://api.0byte.tech/v1/keys \
-H "Authorization: Bearer 0b_key_..." \
-H "Content-Type: application/json" \
-d '{"name": "production"}'GET /v1/keys— list keys (raw keys are never returned).DELETE /v1/keys/:id— revoke a key (not your own or the last one).
Transparency
/v1/transparency/*PublicIndependently confirm that a proof was committed to the signed log.
Tree head — GET /v1/transparency/head
curl https://api.0byte.tech/v1/transparency/headInclusion proof — GET /v1/transparency/inclusion/:id
curl https://api.0byte.tech/v1/transparency/inclusion/0b_a1b2c3d4-...Error codes
| Code | Status | Meaning |
|---|---|---|
| AUTH_MISSING | 401 | No Authorization header |
| AUTH_INVALID | 401 | API key is invalid or revoked |
| SCOPE_DENIED | 403 | Key lacks the required scope |
| RATE_LIMITED | 429 | Too many requests for your tier |
| INVALID_BASE64 | 400 | Content is not valid base64 |
| INVALID_IMAGE | 400 | Content is not a valid image |
| PAYLOAD_TOO_LARGE | 413 | Content exceeds the 50 MB limit |
| PROOF_NOT_FOUND | 404 | No proof with that ID |
| NOT_YET_ANCHORED | 404 | Proof not yet in the log (wait ~60s) |
| KEY_NOT_FOUND | 404 | No API key with that ID |
| CANNOT_DELETE_SELF | 400 | Can’t revoke the key you’re using |
| LAST_KEY | 400 | Can’t revoke the last remaining key |
Ready to stamp your first generation?
Get an API key and ship provenance in an afternoon.

