---
name: anyapi-operator
description: Sell through AnyAPI as an operator - register a self-hosted HTTPS endpoint for a catalog API, verify the gateway's HMAC-signed requests, pass conformance and an unpaid shadow trial, then earn USD on every request your lane wins. This skill covers the operator REST API, the signing scheme, the lane lifecycle, and the payout rules.
homepage: https://getanyapi.com
---

# AnyAPI - operator onboarding (sell APIs)

AnyAPI is a marketplace on both sides. This skill is the SELLER side: you host an HTTPS
endpoint that serves one catalog API's canonical schema, the AnyAPI gateway sends you
signed requests, and you earn a share of every confirmed sale in **USD**. The buyer-side
skill (calling APIs) is at https://getanyapi.com/SKILL.md.

Your public identity is your **operator id** (`op_...`). Customers always see AnyAPI as
the provider; the operator id exists for routing, earnings, and pins.

## 1. Auth

Every operator route lives under `https://api.getanyapi.com/v1/operator` and authenticates
like the rest of /v1: `Authorization: Bearer aa_live_...` (an API key on the account that
owns the operator profile) or a dashboard session. All routes are scoped to the authed
account; you can never see or touch another operator's lanes.

## 2. The operator API

Profile:

- `POST /v1/operator/profile` body `{"displayName": "..."}` - become an operator
  (idempotent). Returns `{id, displayName, status, commissionBps, payoutsEnabled,
  createdAt}`. Status starts `pending`; a human at AnyAPI approves each new operator
  once before lanes serve paid traffic.
- `GET /v1/operator/profile` - your profile; 404 means not an operator yet.

Endpoints (lanes):

- `POST /v1/operator/endpoints` body
  `{"sku": "...", "baseUrl": "https://...", "path": "/run", "pricing": {"usdPer1k": 5}}`
  - register a lane on a catalog SKU (SKUs: `GET https://api.getanyapi.com/catalog`).
  Base URL must be HTTPS, port 443, public host, no embedded credentials. Price is USD
  per 1k requests, minimum $0.01. Returns `{secret, endpoint}` - **the HMAC signing
  secret is shown exactly once; store it now.**
- `GET /v1/operator/endpoints` - list your lanes.
- `GET /v1/operator/endpoints/{id}` - one lane's detail: status, price, pending price,
  trial usage, conformance report, trial quality, health, and the status timeline.
- `POST /v1/operator/endpoints/{id}/conformance` - run the conformance suite now
  (see lifecycle below). Returns the per-check report.
- `POST /v1/operator/endpoints/{id}/price` body `{"usdPer1k": ...}` - reprice.
  Decreases apply immediately; increases apply after a 24h delay; at most 2 changes per
  lane per rolling 24h (429 when exceeded).
- `POST /v1/operator/endpoints/{id}/rotate-secret` - mint a replacement signing secret
  (returned once). The old secret stays valid for a 24h dual-secret window.
- `POST /v1/operator/endpoints/{id}/pause` - stop serving from this lane.

Earnings and payouts:

- `GET /v1/operator/earnings` - `{availableUsd, pendingUsd, monthUsd, monthRequests,
  winRatePct, byApi[], daily[]}`. Each `byApi` row shows gross, your share, and the
  platform fee, split by YOUR profile's `commissionBps` (default 1000 = 10%; never
  assume the default - read the profile).
- `POST /v1/operator/payout-account` - returns the hosted Stripe Connect onboarding URL
  (KYC, bank, and tax are handled there; a human must complete it).
- `GET /v1/operator/payouts` - withdrawal history.
- `POST /v1/operator/payouts` body `{"amountUsd": ...}` - withdraw from the available
  balance. Free, $50 minimum; the first payout unlocks 30 days after approval.

## 3. Your endpoint contract

The gateway POSTs the SKU's canonical input as JSON to your registered path (default
`/run`). Respond 2xx with JSON that validates against the SKU's canonical output schema
(read it from `GET https://api.getanyapi.com/v1/apis/{sku}`). More fields are welcome,
missing declared fields fail. Return the schema's `found: false` shape for a legitimate
no-result; non-2xx / invalid output / timeout counts as a failed attempt and fails over.
Budgets: respond within 15s, body under 8 MiB. Redirects are never followed.

### Verifying the signature (required)

Every gateway request carries:

- `X-AnyAPI-Operator` - your operator id
- `X-AnyAPI-Timestamp` - unix seconds
- `X-AnyAPI-Nonce` - random 128-bit hex, unique per request
- `X-AnyAPI-Signature` - HMAC-SHA256, lowercase hex

Recompute over the canonical string (five dot-joined parts):

    <timestamp>.<nonce>.<method>.<path>.<sha256hex(body)>

where method is `POST`, path is your registered path, and `sha256hex(body)` is the
lowercase-hex SHA-256 of the raw body bytes. HMAC-SHA256 that string with your signing
secret, compare to the header in constant time, reject timestamps older than ~5 minutes,
and cache nonces for the freshness window to block replays. Reject failures with 401 and
never process an unverified body. Copy-paste verification code (TypeScript, Python, Go):
https://getanyapi.com/docs/sell/operator-endpoint-contract

## 4. The lane lifecycle

    draft -> conformance -> trial -> canary -> live

1. **Register** - the lane starts as `draft`.
2. **Conformance** ("CI for your scraper") - trigger it via the API. The gateway fires
   the SKU's schema examples as signed requests and checks HTTP 2xx, the 15s latency
   budget, the body cap, schema-valid output, and found:true. Pass -> `trial`; fail ->
   back to `draft` with the report saved (fix and re-run, unlimited retries).
3. **Shadow trial** (unpaid) - real customer traffic is mirrored to your lane, capped at
   500 mirrored calls; customers never see your output and nothing is billed. Every
   mirror is judged automatically (deterministic parity, then an LLM judge for the
   ambiguous tail). Promotion is automatic at >= 95% pass over >= 200 comparisons
   spanning >= 7 days with zero fabrication/injection flags.
4. **Canary, then live** - both are routable: you serve real traffic and earn from the
   first request you win. Sustained quality auto-promotes canary -> live; failure spikes
   quarantine the lane, and automatic re-probes recover it.

Routing is cheapest-first among routable lanes, so your price is your lever for traffic.

## 5. Money rules (all USD)

- You set the customer list price in USD per 1k requests (min $0.01/1k).
- Per-sale commission from your profile's `commissionBps` (default 10%); your share and
  the platform fee are itemized on every earnings row.
- Price decreases immediate; increases after 24h; max 2 changes per lane per 24h.
- Earnings accrue on confirmed sales, including free-tier-funded and agent-paid traffic.
  Months finalize 7 days after they end; finalized balance is withdrawable.
- Withdrawals: free, $50 minimum, via Stripe Connect; first payout unlocks 30 days after
  operator approval.

## 6. Onboarding checklist (what to actually do)

1. `POST /v1/operator/profile` with a display name.
2. Read your SKU's input/output schema from `GET /v1/apis/{sku}`.
3. Deploy the endpoint: verify signatures, serve the canonical schema over HTTPS:443.
4. `POST /v1/operator/endpoints` and store the returned secret.
5. `POST /v1/operator/endpoints/{id}/conformance` until every check passes.
6. Wait out the shadow trial (poll the endpoint detail for trial quality).
7. Have the human finish Stripe Connect onboarding via `POST /v1/operator/payout-account`.
8. Withdraw with `POST /v1/operator/payouts` once >= $50 is available.

Human-readable docs: https://getanyapi.com/docs/sell/become-an-operator
Dashboard: https://getanyapi.com/dashboard/sell
