API Reference

Complete API endpoint reference with request/response schemas

POST/api/v1/sign

Add quantum-resistant watermark to media file

Authentication Required

Authorization: Bearer YOUR_FIREBASE_TOKEN

Request Workflow

# 1) Initiate session (preferred protocol: signed URL)
curl -sS -X POST https://api.zry.dev/api/v1/uploads/initiate \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"filename":"image.jpg","contentType":"image/jpeg","sizeBytes":123456,"protocol":"signed"}' \
  | tee /tmp/sign-session.json

# 2) Upload file directly to cloud storage
UPLOAD_URL=$(jq -r '.uploadUri' /tmp/sign-session.json)
curl -sS -X PUT "$UPLOAD_URL" \
  -H "Content-Type: image/jpeg" \
  --data-binary @image.jpg

# 3) Complete session (optional metadata update)
SESSION_ID=$(jq -r '.sessionId' /tmp/sign-session.json)
curl -sS -X POST "https://api.zry.dev/api/v1/uploads/$SESSION_ID/complete" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sizeBytes":123456}'

# 4) Process session via /api/v1/sign
curl -sS -X POST https://api.zry.dev/api/v1/sign \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{"sessionId":"$SESSION_ID","metadata":{"title":"Product","creator":"Your Company"},"returnUrl":true}"

Direct multipart uploads are no longer accepted; always upload via session + JSON payload.

Response 200 OK

{
  "success": true,
  "downloadUrl": "https://storage.googleapis.com/tenant-bucket/watermarked/...",
  "fileName": "image.jpg",
  "layersApplied": ["c2pa", "quantum", "invisible"],
  "manifestId": "urn:uuid:123e4567-e89b-12d3-a456-426614174000",
  "processingTime": 28473
}
POST/api/v1/verifyPublic

Verify watermarked file and detect layers

Request Example

curl -X POST https://api.zry.dev/api/v1/verify \
  -F "file=@watermarked.jpg"

Response 200 OK

{
  "success": true,
  "filename": "watermarked.jpg",
  "fileSize": 245678,
  "fileType": "image/jpeg",
  "valid": true,
  "manifest": {
    "@context": "https://c2pa.org/specifications/2.2/context.json",
    "claim_generator": "multi-layer-watermarking-system/1.0"
  },
  "layersDetected": ["c2pa", "quantum", "invisible"],
  "confidence": 0.95,
  "ownership": {
    "valid": true,
    "creator": "Your Company",
    "confidence": 0.95
  }
}
POST/api/v1/layers/detectPublic

Detect which watermark layers are present

Request Example

curl -X POST https://api.zry.dev/api/v1/layers/detect \
  -F "file=@watermarked.jpg"

Response 200 OK

{
  "success": true,
  "layersDetected": ["c2pa", "quantum", "invisible"],
  "details": {
    "c2pa": {
      "present": true,
      "manifestId": "urn:uuid:...",
      "confidence": 1.0
    },
    "quantum": {
      "present": true,
      "algorithm": "ML-DSA-65",
      "confidence": 0.95
    },
    "invisible": {
      "present": true,
      "method": "rust-dct",
      "confidence": 0.92
    }
  }
}
GET/api/v1/healthPublic

Check API and microservices health status

Request Example

curl https://api.zry.dev/api/v1/health

Response 200 OK

{
  "status": "healthy",
  "services": {
    "transform": "healthy",
    "media": "healthy",
    "video": "healthy",
    "crypto": "healthy",
    "text-detection": "healthy"
  },
  "timestamp": "2025-01-06T12:00:00Z"
}

📘 Interactive API Reference

Explore our complete API documentation with interactive examples:

The OpenAPI spec includes:

  • • Complete endpoint documentation (watermarking, API keys, usage, webhooks, jobs)
  • • Request/response schemas for all endpoints
  • • Authentication schemes (API key and Bearer token)
  • • Error codes and tier restrictions
  • • Rate limit and quota information

Use the Developer Documentation for integration guides and code examples.

Questions? Email developers@zry.dev