# Quickstart

Base URL: `https://audit.45-94-66-237.sslip.io`. Auth: `Authorization: Bearer <key>` or `X-API-Key: <key>`.

1. **Get a key.** Humans: `POST /v1/keys` (opens a wallet with trial credit). Agents: `POST /v1/agent/signup` (capped trial key, expires in 7 days).
2. **Find an endpoint.** `GET /v1/catalog` or `GET /v1/catalog/search?q=audit` (no key needed).
3. **Quote it (free).** `POST /v1/quote/seo.audit` with the input. Validates input and returns `cost_usd`.
4. **Run it.** `POST /v1/run/seo.audit`.
5. **Re-read it free.** `GET /v1/results/{request_id}`.

```bash
KEY=$(curl -s -X POST https://audit.45-94-66-237.sslip.io/v1/keys -H 'Content-Type: application/json' -d '{"label":"me"}' | jq -r .key)
curl -s -X POST https://audit.45-94-66-237.sslip.io/v1/run/seo.audit \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{"domain":"example.com"}' | jq '{cost_usd, score: .output.summary.score}'
```

Every success returns the same envelope:

```json
{"ok": true, "request_id": "req_…", "endpoint": "seo.audit", "status": "succeeded",
 "cost_usd": 1.0, "items": 1, "latency_ms": 2140,
 "source": {"id": "site", "name": "First-party crawl", "kind": "first_party", "demo": false},
 "output": { "...": "the report" }}
```

Response headers: `X-Request-Id` (quote it to support), `X-RateLimit-*`, `Idempotency-Replayed` on replays, `Retry-After` on 202/429.
