> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# For AI Agents

> Connect coding agents to ZeroDrift's machine-readable documentation, OpenAPI specification, and docs search MCP server.

Use these public, read-only surfaces to discover and query the ZeroDrift
documentation while you code. They are generated and hosted by Mintlify from
the same source as this site.

## Machine-readable documentation

| Surface | URL | Use it for |
| - | - | - |
| Documentation index | [`https://docs.zerodrift.com/llms.txt`](https://docs.zerodrift.com/llms.txt) | Discover every published page and its one-line description. |
| Full documentation | [`https://docs.zerodrift.com/llms-full.txt`](https://docs.zerodrift.com/llms-full.txt) | Load the complete documentation corpus into a single context. |
| Markdown pages | Append `.md` to any page URL, such as [`/quickstart.md`](https://docs.zerodrift.com/quickstart.md) | Read one page as Markdown without site navigation or presentation markup. |
| OpenAPI specification | [`https://docs.zerodrift.com/openapi.json`](https://docs.zerodrift.com/openapi.json) | Inspect the API contract or generate a client. |
| Documentation MCP | [`https://docs.zerodrift.com/mcp`](https://docs.zerodrift.com/mcp) | Search and retrieve published ZeroDrift documentation from an MCP client. |

> [!NOTE]
>
> The documentation MCP is distinct from [MCP Connectors](https://docs.zerodrift.com/connecting-mcp.md).
> The documentation MCP lets your coding agent read ZeroDrift's public docs.
> MCP Connectors let ZeroDrift import your policy documents from connected
> services.

## Add ZeroDrift guidance to your repository

Paste the following into your repository's `AGENTS.md` or `CLAUDE.md`:

```markdown theme={null}
## ZeroDrift integration

ZeroDrift Enforcement API. Base URL: https://api.zerodrift.ai. Authenticate with the `x-api-key` header using the `ZERODRIFT_API_KEY` environment variable. Never expose the key in source control, logs, client-side code, or prompts.

Enforce text: `POST /api/v3/content/validate` with `{content, model_engine: "anchor_3_0_mini"|"anchor_3_0"|"anchor_3_0_max", mode: "sync"|"async", validation_scope?: {rulepacks?, imports?, rules?, managed_only?}, metadata?}`. Default `model_engine` is Flagship (`anchor_3_0`; older notes called this Base). Mini is detection-only, runs unscoped against its frozen rulebook, and rejects `validation_scope`. A scope-less Flagship call stays on Flagship and checks active managed rules only; activated custom rules are not evaluated. Ask for `anchor_3_0_max` explicitly to enforce activated custom rules. Max returns per-line violations without a rewrite; `fix.suggested_text` is the rule's own fix note when present and otherwise empty. A Flagship request that explicitly names a `cust_*` rule is upgraded to Max (`engine_upgrade_reason: "custom_rules"`). See [Choose a model](/models). Quality and latency: https://zerodrift.com/model/anchor-3-benchmark

Sync mode returns the result inline when processing completes within the inline budget; otherwise it falls back to async mode. Custom rules need `anchor_3_0_max` for an inline sync verdict. Async mode returns `202` with `{job_id, poll.url}`; poll `GET /api/v3/jobs/{job_id}` until `status` is `completed` or `failed`.

Read the enforcement decision from `result.overall_status`: `approved` = Pass (deliver); `needs_changes` = Fix (apply `fix.suggested_text` only when `fix.action` is `replace`); `do not send` = Block (deliver a fallback, never the original). Treat `status` only as job lifecycle state. Escalate when `suggested_text` is empty, `action` is not `replace`, or your policy requires review. Public usage fields are `result.units` and `result.cost`, not raw token counts.

Rulepacks: `GET /api/rulepacks/`; use the returned `id` in `validation_scope.rulepacks`. Rules: `GET /api/policies/rules`; use `rule_id` in `validation_scope.rules` (custom IDs are prefixed `cust_`). Policies: `POST /api/policies/import`, poll the import, activate its rules, then use the import ID in `validation_scope.imports`.

Activity log (30 days): `GET /api/activities`. Rate limit: 10 requests per second with a burst of 50; back off on `429`.

Docs index: https://docs.zerodrift.com/llms.txt
Full docs: https://docs.zerodrift.com/llms-full.txt
OpenAPI spec: https://docs.zerodrift.com/openapi.json
Docs MCP: https://docs.zerodrift.com/mcp
```

## Start an integration

> **[Quickstart](https://docs.zerodrift.com/quickstart.md)**
>
> Follow the current onboarding flow, then ask your coding agent: “Add
> ZeroDrift enforcement to our support bot. Check each generated reply before
> sending it, apply safe fixes, block unsafe replies, and log escalations.”


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.