# Quickstart

## Access paths

`GET /take` and `POST /render-html` accept three access paths, checked in this order:

1. **x402** — send an `X-Payment` header (pay-per-call, no signup, testnet-settled).
2. **API key** — send `X-Api-Key: <key>` or `?access_key=<key>`.
3. **Keyless** — no credential, IP-rate-limited, only when the operator has `KEYLESS_ENABLED=true`.

An invalid API key always fails with 401 and never falls through to keyless, even when keyless is
enabled — a typo'd paying key should never silently downgrade to a lower tier.

## Take a screenshot

```
curl "https://api.example.com/take?url=https://example.com" -o screenshot.png
```

## Get text + metadata in one call

```
curl "https://api.example.com/take?url=https://example.com&response_format=json"
```

## Render inline HTML

```
curl -X POST https://api.example.com/render-html \
  -H "Content-Type: application/json" \
  -d '{"html": "<html><body><h1>Hello</h1></body></html>"}' \
  -o out.png
```

## Authentication

Provide a valid API key via the `X-Api-Key` header or `?access_key=` query param. See
`/openapi.json` for the full parameter reference with worked examples on every field.

## Rate limits

Each API key has a per-second rate limit and a daily call cap. `GET /usage` reports the current
key's usage for the day. Exceeding either returns 429 with a `retry_after_s` field.
