Authentication
All API requests require a bearer token in theAuthorization header.
API Key Types
Getting a Key
- Sign up at developers.zebratruth.ai
- Navigate to Dashboard → API Keys
- Click Create Key and choose a name and environment (live or test)
- Copy the key immediately — it is shown only once
Validating Your Key
200 — Valid Key
401 — Invalid Key
Test Mode
Test keys (zt_test_...) return deterministic sandbox responses:
- No cost engine — no credits deducted
- No real LLM calls — responses are pre-built canned scenarios
- Deterministic — same input always produces the same output
- Responses include
_meta.mode: "test"so you can detect sandbox mode
Test Mode Response
Idempotency
All mutating endpoints (POST, DELETE) require anIdempotency-Key header:
- Generate a new UUID for each distinct request
- Reuse the same key to safely retry a failed request
- Prevents duplicate execution and double-charging
- Keys expire after 24 hours
Rate Limits
When rate-limited, the API returns
429 with a Retry-After header indicating seconds to wait.