shinnslist

usage & billing LIVE

What counts as a billable read, what the free tier includes, and the exact shape of every quota, billing, and cost figure the api returns. Everything below describes code that is actually deployed — anything still planned is marked DRAFT.

modeled, never observed. Every cost figure the api returns carries "modeled": true: the $0.003/call price is the plan's pricing math, baked into the code comments as (M), not a price anyone has been charged. No real charges exist today. The free tier is hard-capped, so there is no mechanism that could charge you: when the cap is hit, calls stop, they do not bill. This page documents the metering the code actually performs, not a bill.

the billable read

One billable read = one signal × one parcel (PRICE_PER_CALL_USD = 0.003, functions/lib/v1.js). A POST /v1/signals/{signal}/evaluate with N parcels requests N calls; with one parcel it requests one.

surfacewhat consumes quotaquota pool
POST /v1/signals/{signal}/evaluateeach parcel in the request (1 signal × 1 parcel = 1 call)monthly v1 quota (1,000 calls/mo free)
GET /api/inteleach request (not each parcel)daily intel quota (25/day free, 5/day anonymous)
POST /api/keyseach issuanceissuance throttle (3 per IP per hour), not quota
mcp tools/callsame as the underlying v1 callmonthly v1 quota

/api/intel calls are ledgered (usage ledger, below) but do not touch the monthly v1 quota — they run on their own daily quota seam. Quotas for v1 are D1-backed when the binding is present (KV monthly counters as fallback); with neither bound, quota is reported but not enforced (dev mode — the quota block carries quota_enforced: false).

the free tier, today

what gets billed $0

The evaluator bills only completed evaluations. These never consume quota or dollars:

reading your usage — GET /api/keys/usage

The response carries two metering blocks, exactly as the code builds them:

{
  "ok": true,
  "tier": "free",
  ...
  "v1_monthly": {
    "plan": "free",
    "calls_used": 41,
    "calls_included": 1000,
    "resets_at": "2026-10-01T00:00:00.000Z",
    "modeled": true,               // (M) all cost figures are modeled, never observed
    "price_per_call_usd": 0.003,   // (M) modeled
    "used_value_usd": 0.123,       // (M) modeled value of calls consumed
    "included_value_usd": 3,       // (M) modeled value of the free tier
    "upgrade_math": "41/1000 calls used. Free tier: 1000 calls/mo, no card, at $0.003/call (M) = $3/mo modeled included value. Hard stop at cap — no overage billing, no surprise charges. Quota resets 2026-10-01T00:00:00.000Z.",
    "note": "v1 signal APIs: 1,000 calls/mo free (M), hard stop at cap — no surprise charges."
  }
}

The evaluate response carries its own billing block: calls_consumed, calls_estimated, cost_consumed_usd (modeled), and modeled: true. The estimate binds the charge — the number of parcels you send is the number you pay for (or consume from quota).

the 402 — quota exhausted

Exact shape from functions/lib/v1.js (errQuotaExhausted). It is a 402, not a 429, because it is not a rate problem — it is a cap problem:

{
  "ok": false,
  "error": "quota_exhausted",
  "message": "Monthly free-tier quota exhausted (1000/1000 calls). Hard stop at cap — no overage billing, no surprise charges. Quota resets 2026-10-01T00:00:00.000Z; upgrade raises the cap. No charge was made.",
  "modeled": true,
  "quota": { "calls_used": 1000, "calls_included": 1000, "resets_at": "2026-10-01T00:00:00.000Z", "price_per_call_usd": 0.003, "included_value_usd": 3 }
}

where metering lives

planned: paid billing DRAFT

There is no checkout, no invoice, and no charge flow anywhere in the codebase today. The $0.003/call seam exists only inside free-tier math: cost_cents = 0 on every ledger row, modeled: true on every cost figure. When the payments track ships, paid issuance, overage, and real charging land on this page with their real endpoints — until then, any price in a response body is math, not money.

planned: pro tier issuance DRAFT

pro is reserved for the payments track: POST /api/keys never issues it and no other issuance path exists. The pricing page's "$0.003 per extra API call on pro" is the modeled price, consistent with the (M) seam — it describes a tier nobody can buy yet.

planned: usage dashboard DRAFT

Until a dashboard ships, GET /api/keys/usage is the usage interface: poll v1_monthly.used / v1_monthly.remaining. No dashboard page, no emailed quota alerts, and no usage history endpoint exist yet — all not final.

next: api keys · rate limits · api reference · docs hub