Prerequisites
- An API key (Quickstart, Step 1).
- Optional: rule packs activated in Policy. Note their ids from
GET /api/rulepacks/if you want to narrowvalidation_scope.
The pattern
Code
What the customer sees
Gotchas
- Sync can fall back to async. Check
modein every response. For long answers, use the async flow in Long-Form Content. - Fail open or fail closed. Set a client timeout. If ZeroDrift is unreachable, decide once whether your bot fails open (send the reply) or fails closed (send the fallback). Regulated deployments fail closed.
- Streaming. Enforce the complete reply, then stream it. Do not stream tokens to the customer before the verdict.
- Latency. Typical Flagship (Anchor 3.0) latency is 1.63 seconds. See the Anchor 3.0 benchmark for published quality and latency. Measure your own path for the reply lengths you serve.
- Completed envelope. Live jobs finish as
status: "completed"with the verdict underresult. See Act on Each Verdict.
Next
Act on Each Verdict
Thresholds, logging, and a human review queue.
Per-Tenant Rulepacks
Different rules per customer when one bot serves many tenants.

