Documentation

Everything you need to integrate 0byte into your AI pipeline.

Overview

0byte creates cryptographic proofs of origin for AI-generated content. The API has two sides:

  • Stamp — create a proof when content is generated (requires API key)
  • Verify — check any content against the registry (public, no key needed)

Base URL: https://api.0byte.tech


Authentication

Stamp requests require an API key passed as a Bearer token:

1Authorization: Bearer 0b_key_...

Verify, proof lookup, and transparency endpoints are public — no authentication required.


Python SDK

Install the SDK:

1pip install 0byte

Stamp content

1from zerobyte import Client 2 3client = Client(api_key="0b_key_...") 4 5# After generating content with any AI provider 6proof = client.stamp( 7 content=image_bytes, 8 content_type="image/png", 9 provider="stability", 10 model="sdxl-turbo", 11) 12 13print(proof.id) # "0b_a1b2c3d4-..." 14print(proof.fingerprint) # perceptual content hash 15print(proof.verify_url) # "https://0byte.tech/proof/0b_a1b2c3d4-..."

Verify content

1result = client.verify( 2 content=some_image_bytes, 3 content_type="image/png", 4) 5 6print(result.matched) # True / False 7print(result.confidence) # 0.0 — 1.0 8print(result.proof) # original proof if matched

Look up a proof

1proof = client.get_proof("0b_a1b2c3d4-...") 2 3print(proof.provider) # "stability" 4print(proof.model) # "sdxl-turbo" 5print(proof.signature) # Ed25519 signature

API Reference

Health Check

GET /v1/health — Returns server status, public key, and index size. No auth required.

Stamp

POST /v1/stamp — Create a proof of origin. Requires API key.

Request:

1curl -X POST https://api.0byte.tech/v1/stamp \ 2 -H "Authorization: Bearer 0b_key_..." \ 3 -H "Content-Type: application/json" \ 4 -d '{ 5 "content": "<base64_encoded_media>", 6 "content_type": "image/png", 7 "provider": "openai", 8 "model": "dall-e-3", 9 "metadata": {"prompt_hash": "abc123"} 10 }'

Response:

1{ 2 "id": "0b_a1b2c3d4-...", 3 "fingerprint": "f0e1d2c3b4a59687", 4 "provider": "openai", 5 "model": "dall-e-3", 6 "content_type": "image/png", 7 "timestamp": "2026-03-12T10:30:00Z", 8 "signature": "base64_ed25519_signature...", 9 "signing_key_id": "3e1b03b9", 10 "verify_url": "https://0byte.tech/proof/0b_a1b2c3d4-...", 11 "metadata": {"prompt_hash": "abc123"} 12}
  • content — base64-encoded media (max 50MB)
  • content_type — MIME type (image/png, image/jpeg, video/mp4, audio/mp3)
  • provider — AI provider name (e.g. openai, stability, anthropic)
  • model — model identifier (e.g. dall-e-3, sdxl-turbo)
  • metadata — optional JSON object stored with the proof

Verify

POST /v1/verify — Check content against the registry. No auth required.

Request:

1curl -X POST https://api.0byte.tech/v1/verify \ 2 -H "Content-Type: application/json" \ 3 -d '{ 4 "content": "<base64_encoded_media>", 5 "content_type": "image/png" 6 }'

Response:

1{ 2 "matched": true, 3 "confidence": 0.95, 4 "proof": { 5 "id": "0b_a1b2c3d4-...", 6 "fingerprint": "f0e1d2c3b4a59687", 7 "provider": "openai", 8 "model": "dall-e-3", 9 "content_type": "image/png", 10 "timestamp": "2026-03-12T10:30:00Z", 11 "signature": "base64_ed25519_signature...", 12 "signing_key_id": "3e1b03b9", 13 "verify_url": "https://0byte.tech/proof/0b_a1b2c3d4-..." 14 } 15}

Matching uses perceptual fingerprinting — works even after re-encoding, cropping, or screenshotting. Confidence is a similarity score from 0.0 to 1.0.

Get Proof

GET /v1/proofs/:id — Fetch a specific proof by ID. No auth required.

Request:

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

Response:

1{ 2 "id": "0b_a1b2c3d4-...", 3 "fingerprint": "f0e1d2c3b4a59687", 4 "provider": "openai", 5 "model": "dall-e-3", 6 "content_type": "image/png", 7 "timestamp": "2026-03-12T10:30:00Z", 8 "signature": "base64_ed25519_signature...", 9 "signing_key_id": "3e1b03b9", 10 "verify_url": "https://0byte.tech/proof/0b_a1b2c3d4-...", 11 "metadata": {} 12}

API Keys

Manage API keys programmatically. All key management endpoints require authentication.

Create Key

POST /v1/keys — Create a new API key. The raw key is returned once.

1curl -X POST https://api.0byte.tech/v1/keys \ 2 -H "Authorization: Bearer 0b_key_..." \ 3 -H "Content-Type: application/json" \ 4 -d '{"name": "production"}'
1{ 2 "id": "a1b2c3d4-...", 3 "name": "production", 4 "created_at": "2026-03-12T10:30:00", 5 "key": "0b_key_new_raw_key_here" 6}

List Keys

GET /v1/keys — List all API keys (raw keys are never returned).

1curl https://api.0byte.tech/v1/keys \ 2 -H "Authorization: Bearer 0b_key_..."

Revoke Key

DELETE /v1/keys/:id — Revoke an API key. Cannot revoke your own key or the last remaining key.

1curl -X DELETE https://api.0byte.tech/v1/keys/a1b2c3d4-... \ 2 -H "Authorization: Bearer 0b_key_..."

Transparency Log

Every proof is batched into a signed Merkle tree every 60 seconds. These endpoints let anyone independently verify that a proof was included in the log.

Tree Head

GET /v1/transparency/head — Get the latest Merkle tree root.

Request:

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

Response:

1{ 2 "tree_id": 42, 3 "root_hash": "a1b2c3d4e5f6...", 4 "tree_size": 128, 5 "published_at": "2026-03-12T10:31:00Z" 6}

Inclusion Proof

GET /v1/transparency/inclusion/:proof_id — Verify a proof exists in the transparency log.

Request:

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

Response:

1{ 2 "proof_id": "0b_a1b2c3d4-...", 3 "leaf_hash": "abc123...", 4 "leaf_index": 7, 5 "tree_id": 42, 6 "root_hash": "a1b2c3d4e5f6...", 7 "tree_size": 128, 8 "published_at": "2026-03-12T10:31:00Z", 9 "inclusion_path": [ 10 {"hash": "def456...", "direction": "left"}, 11 {"hash": "789abc...", "direction": "right"} 12 ] 13}

Error Codes

CodeStatusDescription
AUTH_MISSING401No Authorization header provided
AUTH_INVALID401API key is invalid or revoked
INVALID_BASE64400Content is not valid base64
INVALID_IMAGE400Content is not a valid image
PAYLOAD_TOO_LARGE413Content exceeds 50MB limit
PROOF_NOT_FOUND404No proof exists with that ID
NOT_YET_ANCHORED404Proof not yet included in transparency log (wait ~60s)
KEY_NOT_FOUND404No API key exists with that ID
CANNOT_DELETE_SELF400Cannot revoke the key you are authenticating with
LAST_KEY400Cannot revoke the last remaining API key