Browse docs

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.

Base URLhttps://api.0byte.techREST + Python SDK

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:

bash
pip install 0byte

Then 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.94

Need 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:

text
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

TierLimitScopes
Free60 req/minanalyze · stamp
Dev300 req/minanalyze · stamp
Pro1,000 req/minanalyze · 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.

The registry lookup inside 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.

See the transparency endpoints to check inclusion yourself.

Python SDK

A thin, dependency-light client — under 1 MB installed, no ML on your side.

bash
pip install 0byte

Stamp

python
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 page

Analyze

python
result = client.analyze(open("photo.png", "rb").read()) print(result.verdict) # "ai_generated" print(result.confidence) # 0.94 print(result.ai_probability) # 0.97

Look up a proof

python
proof = client.get_proof("0b_a1b2c3d4-...") print(proof.provider) # "stability" print(proof.model) # "sdxl-turbo" print(proof.signature) # Ed25519 signature

API reference

All endpoints live under https://api.0byte.tech and return JSON.

Stamp

POST/v1/stampAPI key

Create a signed proof of origin for a piece of generated media.

FieldTypeDescription
contentreqstringBase64-encoded media (max 50 MB).
content_typereqstringMIME type — image/png, image/jpeg, video/mp4, audio/mp3.
providerreqstringAI provider, e.g. openai, stability.
modelreqstringModel identifier, e.g. dall-e-3, sdxl-turbo.
metadataobjectOptional 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

POST/v1/analyzeAPI key

Detect whether an image is AI-generated. Runs the neural classifier, checks metadata, and queries the registry, then returns a weighted verdict.

FieldTypeDescription
contentreqstringBase64-encoded image.
content_typereqstringimage/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, or uncertain.
  • confidence — 0–1, weighted across all signals.
  • registry_match — the proof, if the content was found in the registry.

Get proof

GET/v1/proofs/:idPublic

Fetch a specific proof by its ID.

curl https://api.0byte.tech/v1/proofs/0b_a1b2c3d4-...

API keys

POST/v1/keysAPI key

Manage 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

GET/v1/transparency/*Public

Independently confirm that a proof was committed to the signed log.

Tree head — GET /v1/transparency/head

curl https://api.0byte.tech/v1/transparency/head

Inclusion proof — GET /v1/transparency/inclusion/:id

curl https://api.0byte.tech/v1/transparency/inclusion/0b_a1b2c3d4-...

Error codes

CodeStatusMeaning
AUTH_MISSING401No Authorization header
AUTH_INVALID401API key is invalid or revoked
SCOPE_DENIED403Key lacks the required scope
RATE_LIMITED429Too many requests for your tier
INVALID_BASE64400Content is not valid base64
INVALID_IMAGE400Content is not a valid image
PAYLOAD_TOO_LARGE413Content exceeds the 50 MB limit
PROOF_NOT_FOUND404No proof with that ID
NOT_YET_ANCHORED404Proof not yet in the log (wait ~60s)
KEY_NOT_FOUND404No API key with that ID
CANNOT_DELETE_SELF400Can’t revoke the key you’re using
LAST_KEY400Can’t revoke the last remaining key

Ready to stamp your first generation?

Get an API key and ship provenance in an afternoon.

Get access