# zeroclass

> Award-deal intelligence, sold to agents. Watch a corridor/cabin and get alerted when an
> insane-deal or dynamically-graded award deal appears (email + webhook), with booking legwork
> and effective bank-point cost. Deals carry a GRADE (how good vs this route's own trailing-90d
> price history) and optional WALLET personalization (your price in the bank currencies you
> hold). Also one-shot deal queries and a machine-readable insane-deal rules API (a hand-verified
> library of booking tricks — 30+ and growing).

## Agentic commerce

- [zeroclass agent storefront](https://zeroclass.pay.zeroclick.io/llms.txt?src=llms-txt): the
  full catalog, live prices, and payment setup for zeroclass. AI agents can purchase
  autonomously or with their human's approval through ZeroClick, and an agent without a
  payment method can set one up on the spot — no signup.

Pay URL (buyers' agents): https://zeroclass.pay.zeroclick.io/*
  Payment is live: unsigned/unpaid PAY-PER-CALL routes get a 402 challenge (x402 on Base / MPP on
  Tempo); pay and retry to receive the result. `zero fetch <url> --max-pay 0.30` does the whole
  dance. NOTE: watch endpoints are NOT pay-per-call — see the two-service billing below.

## Billing (hybrid — TWO ZeroClick services, ONE grant each)
There are two services under this seller, and a buyer holds an INDEPENDENT grant on each:
  • zeroclass          (PAY-PER-CALL): GET /v1/deals ($0.15), GET /v1/rules ($0.05). Each call
                        returns a 402 x402/MPP challenge; settle it and retry to get the result.
  • zeroclass-watches  (PREPAID CREDIT): POST /v1/watches (watch_created $0.25) + a daily
                        watch_day ($0.10) draw a balance you top up ONCE, up front.
Watches run on prepaid credit because a per-call 402 makes no sense for a long-lived daily meter.
FUNDING — the cheapest way is FREE: a first-time HUMAN Zero signup (`zero auth login`, browser
device flow — a person authorizes) is granted a $5 welcome bonus that covers this exact minimum
top-up. An anonymous `zero auth agent register` account gets NO bonus and starts at $0 — so if a
human is available, have them sign in that way FIRST; only fall back to funding real USDC if not.
TOP UP (one time, min $5) by POSTing {"amountUsd":"5"} to the CREDIT pay URL:
  https://zeroclass.pay.zeroclick.io/plans/pln_HSWfO_TuCrp2BxQUBZjan/purchase
That purchase returns a 402 x402/MPP challenge FOR THE $5 — settle it (e.g. `zero fetch ... 
--max-pay 5.00`) and you get a credit grant on zeroclass-watches. Then POST /v1/watches succeeds
(it draws your balance; no per-call payment). A watch SUSPENDS when your credit runs out (alerts
stop, settings kept) and RESUMES automatically after you top up again.
An unpaid POST /v1/watches → 402 challenge, pay and retry: a signed caller with no watches
credit grant (or an exhausted balance) gets a standard 402 payment_required carrying serviceSlug
zeroclass-watches + usage [{meterSlug:watch_created, quantity:1}]. Settle it the usual way
(`zero fetch ... --max-pay 5.00`) — it buys the watch_created draw against your credit grant —
then retry POST /v1/watches and it succeeds.

## Grades (every deal)
rule (chart-verified insane-deal rule) > exceptional (≤P5) > strong (≤P10) > notable (≤P25) >
ordinary (never alerts). early = cold-start (a corridor with <20 days of history that still
cleared the strict distance-band chart). Percentile is vs the corridor+cabin's own trailing-90d
daily lows and sharpens as history accrues.

## Wallet personalization (optional)
Supply the bank currencies you hold (amex-mr, chase-ur, citi-ty, capital-one, bilt, wells-fargo,
marriott). zeroclass computes which deals your points can actually book (direct transfer or one
Avios-family hop), applies active transfer bonuses, and reports YOUR price + the transfer path.
Deals you can't reach are dropped (or shown as a one-line FYI with show_unreachable).

## Buyer endpoints (/v1/*, ZeroClick-signed)
  [CREDIT service zeroclass-watches]
POST /v1/watches      DRAWS PREPAID CREDIT (service zeroclass-watches): watch_created $0.25 +
                      watch_day $0.10/day. An unpaid POST → 402 challenge, pay and retry (settle
                      the watch_created draw against your credit grant, then retry). Body
                      {origins[],destinations[],
                      cabin,dates?, email?,webhook_url?, currencies?:[...],
                      min_grade?:strong|notable|exceptional, show_unreachable?:bool,
                      min_lead_days?:int>=0}. Creates your tenant on first call; returns the watch
                      + a magic dashboard link. min_grade default strong; ordinary never alerts.
                      min_lead_days (default 0): only alert deals departing at least that many days
                      out (skips close-in deals your booking can't ticket).
GET  /v1/watches      list your watches (signed, FREE — no credit draw, no per-call payment).
DELETE /v1/watches/:id delete a watch (signed, FREE).
  [PAY-PER-CALL service zeroclass]
GET  /v1/deals        meter deal_query ($0.15, pay-per-call 402). Params origins,destinations,cabin.
                      Optional currencies=a,b → personalized your_price/your_path + unreachable
                      dropped. Each deal carries grade + percentile. Served from cache when fresh
                      (<3h); otherwise 202 + retry_after while a scan runs.
GET  /v1/rules        meter rules_read ($0.05, pay-per-call 402). The machine-readable insane-deal
                      rule library (transfer_partners + the Avios interchange bridge + bonuses).

All /v1/* routes are ZeroClick-signed; direct (non-pay-URL) unsigned calls return 401. Watch
routes settle against your zeroclass-watches CREDIT grant; deal/rules routes are pay-per-call on
the zeroclass service. A signature failure is a 401; an unpaid watch create is a 402 challenge.

## Human dashboard
GET /s/:id/  — magic-link dashboard (open the link with #k=<secret>); shows watches + alerts.

## Agent surfaces (machine-readable, no credential needed)
GET /openapi.json                         OpenAPI 3.1 spec for the /v1/* buyer plane (per-call prices in each op).
GET /.well-known/agent-skills/index.json  Agent Skills index (search deals, create/list watches, read rules).
GET /auth.md                              how to authenticate and pay here (x402/MPP pay-per-call + prepaid credit).
GET /docs                                 human-readable API docs; links openapi.json / llms.txt / auth.md.
GET /.well-known/api-catalog              api-catalog pointer to the OpenAPI spec.
GET /.well-known/mcp.json                 minimal MCP surface descriptor.
GET /sitemap.xml                          sitemap of the public pages.
