Authentication
All API requests require a bearer token in theAuthorization header.
API Key Types
| Prefix | Environment | Cost | LLM Calls | Use For |
|---|---|---|---|---|
zt_live_ | Production | Real credits | Real agents | Live integrations |
zt_test_ | Sandbox | Free (0 credits) | Deterministic canned responses | Development, testing, CI |
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
| Tier | Requests/min | Concurrent Load Units |
|---|---|---|
| Free | 10 | 2 |
| Starter | 60 | 8 |
| Pro | 300 | 25 |
| Enterprise | Custom | Custom |
429 with a Retry-After header indicating seconds to wait.