> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.drazill.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.drazill.com/_mcp/server.

# AI & agents

These docs are built to be read by machines as well as people. Every page is generated
from the same CI-gated contract the exchange runs on, so what an agent reads here cannot
drift from the code that serves its requests. This page is the map of the
machine-readable surface — and the safety rules an agent should carry into any Drazill
integration.

> **Warning**
>
> Drazill settles real money. Whatever tool or agent you use, the rule is the same:
> **never put a `drzl_live_` key in a browser, a notebook, or any client you don't
> control.** Build and test against **staging** (`https://staging.drazill.com`) with
> `drzl_test_` paper keys first. The AI assistant on this site is configured to enforce
> exactly this in every answer.

## Page actions — copy, Markdown, and one-click agent hand-off

Every page carries a **page-actions** menu (top-right) with:

* **Copy page** / **View as Markdown** — grab the current page as clean Markdown to paste
  into any model's context.
* **Ask AI** — open the on-site assistant (see [Ask Fern](#ask-the-docs-ask-fern) below).
* **ChatGPT** / **Claude** — open the page in that assistant with the content preloaded.
* **Claude Code** / **Cursor** — open the page *and register this site's documentation
  MCP server* in your editor, so the agent can search the whole docs set, not just the
  page you're on.
* **VS Code** — open the page's Markdown in your editor.
* **Download OpenAPI spec** — a direct link to the pinned, versioned contract
  (`GET https://api.drazill.com/api/v1/openapi/v1.json`, ETag-cached). Generate a client
  in any language from it.

## The documentation MCP server

This site hosts a **Model Context Protocol** server at:

```
https://drazill.docs.buildwithfern.com/_mcp/server
```

Add it to Claude Code, Cursor, or any MCP-capable client (the **Claude Code** and
**Cursor** page actions register it for you) and your agent can search and cite these
docs while it works.

> **Note**
>
> **What this MCP server is — and isn't.** It is a **documentation** server: it searches
> and answers questions *about* the docs (endpoints, concepts, error codes, webhook
> shapes). It does **not** execute Drazill API calls, hold keys, or move money — it has
> no access to your account. A hosted API MCP server (one that *calls* Drazill endpoints
> on your behalf) is **not** offered today; if that changes it will be documented here
> and announced in the [changelog](/changelog/overview). Until then, agents call the API
> the normal way — over HTTP with an `X-API-Key` header, using the reference this server
> points them at.

## llms.txt and per-page Markdown

For agents that prefer to pull context directly rather than through MCP:

* **`https://drazill.docs.buildwithfern.com/llms.txt`** — an index of the documentation in the
  [llms.txt](https://llmstxt.org/) format, auto-generated by Fern. Nested sections expose
  their own scoped index (for example `…/webhooks/llms.txt`), so an agent can load just
  the slice it needs.
* **Per-page Markdown** — every page is available as raw Markdown via the **View as
  Markdown** / **Copy page** actions above. This is the honest, context-window-friendly
  way to feed a specific page to a model.

> **Info**
>
> There is **no `llms-full.txt`** on this site. Fern deliberately does not concatenate the
> whole site into one file — for a reference this size it would blow past most model
> context windows and be of little use. Point your agent at the scoped `llms.txt` for the
> area it cares about, or hand it individual pages' Markdown, instead.

## Ask the docs (Ask Fern)

The **Ask AI** action opens an on-site assistant that answers from these pages with
citations. It is configured with Drazill's safety mandate baked into its system prompt —
it will steer you to test keys and staging, warn on money-moving endpoints, and refuse to
invent behaviour that isn't documented. Reader queries are PII-masked before processing.

> **Note**
>
> Ask Fern runs on the docs' free **Hobby** plan, which meters AI usage at **250 credits
> per month**. If that proves tight we'll measure real usage before deciding on more — we
> never silently upgrade. See the owner runbook for the monthly credit check.

## Privacy & data on this documentation site

This site is public, marketing-class documentation. It is a **separate property** from the
Drazill app and is bound by the same truth-first, privacy-respecting rules:

* **No forms, no accounts, no PII capture.** The docs collect no personal data and have no
  login. The `ca-central-1` data-residency rule governs *user* data, which this site never
  holds.
* **Analytics.** Docs analytics are **not enabled today.** If they are turned on, the
  recorded plan is **PostHog pageview analytics only, with no session recording** — the
  vendor and data region are an owner decision recorded in the runbook, and nothing ships
  until it is ratified. What would be collected (page, referrer, coarse device class — no
  emails, names, or precise location) is stated here before any of it is switched on.
* **Ask Fern queries** are processed by Fern's AI search with PII masking on; do not paste
  secrets (like a real API key) into the assistant.

## Start here

#### [Quickstart](/quickstart)

First call in under a minute — unauthenticated market data, then a paper trade.

#### [Authentication](/authentication)

API keys, key classes, scopes, and why live keys never belong in a browser.

#### [API Reference](/api-reference)

Every REST operation, rendered from the OpenAPI contract. Download the spec above.

#### [Errors](/errors)

The full error catalog with remediation — grounded in the enforcement code.