Skip to main content

Quick Start

1. Get Your API Key

Sign up at developers.zebratruth.ai and create an API key. Set it as an environment variable:
export ZEBRATRUTH_API_KEY=zt_live_your_key_here
Test keys (zt_test_...) return deterministic sandbox responses with no credit cost. Use them for development and integration testing.

2. Validate Your Key

curl https://api.zebratruth.ai/v1/whoami \
  -H "Authorization: Bearer $ZEBRATRUTH_API_KEY"
Response
{
  "tenantId": "tenant_abc",
  "tier": "starter",
  "creditsRemaining": 1420,
  "creditsTotal": 1665,
  "rateLimitPerMinute": 60
}

3. Run a Compliance Check

curl -X POST https://api.zebratruth.ai/v1/compliance/check \
  -H "Authorization: Bearer $ZEBRATRUTH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "jurisdictions": ["us", "eu"],
    "platforms": ["youtube", "instagram"],
    "content": {
      "text": "Try our guaranteed weight loss solution! Celebrity-endorsed results."
    },
    "mode": "fast",
    "responseMode": "sync"
  }'

4. Read the Results

Response
{
  "score": 35,
  "decision": "BLOCK",
  "checks": [
    {
      "agentId": "advertising-law",
      "checkName": "unsubstantiated-claim",
      "status": "block",
      "severity": "critical",
      "message": "'Guaranteed weight loss' violates FTC health claim rules",
      "recommendation": "Remove unsubstantiated health claims"
    }
  ],
  "annotations": [
    {
      "type": "text-span",
      "agentId": "advertising-law",
      "severity": "critical",
      "message": "'Guaranteed weight loss' violates FTC health claim rules",
      "suggestion": "Remove unsubstantiated health claims",
      "textLocation": {
        "start": 8,
        "end": 40,
        "matchedText": "guaranteed weight loss solution"
      }
    }
  ],
  "cached": false,
  "creditsCharged": 12,
  "versionInfo": {
    "engineVersion": "1.0.0",
    "rulesVersion": "2026-04-17"
  },
  "costBreakdown": {
    "totalCredits": 12,
    "agents": [...]
  }
}

Understanding the Response

FieldMeaning
score0-100 compliance score
decisionPUBLISH (80-100), HOLD (60-79), BLOCK (0-59 or critical severity)
checks[]Detailed findings from each agent
annotations[]UI-embeddable issue locations (text spans, video timestamps, image regions)
versionInfoEngine and rules versions (for comparing results over time)
cachedtrue if this is a cached result (0 credits charged)
creditsChargedCredits deducted for this request
costBreakdownPer-agent credit usage

Next Steps

Authentication

API key types, scopes, and security best practices

Annotations

How to map compliance results to your UI

Streaming

Get progressive results as each agent completes

Full API Reference

All endpoints, schemas, and examples