Skip to main content

Plans and quotas

Monthly call allowances per plan and how calls are counted.

View .md

This page is for developers who call the optional zn Cloud API from their own code. Just want to protect your coding agent? Open your own terminal (not the agent's chat), run npx -y zn-gate init, then npx -y zn-gate check. Step by step: Install.

Plan Price Calls / month Data
Free $0 10,000 Input not stored; decisions kept 90 days
Pro $19 / month, or $190 / year; overage $0.10 per 1,000 calls 250,000 Input not stored; decisions kept 90 days
Scale $99 / month, or $990 / year 2,000,000 Input not stored; decisions kept 90 days
Team (14-day trial) $19 per seat / month, or $15 per seat / month billed annually 50,000 per seat, shared across the organization Input not stored; decisions kept 90 days; Team audit events kept 180 days

The one exception is an opt-in mode that keeps a scrubbed excerpt of each input: see the privacy policy.

Every call runs the deterministic rules and Galvanize 3.1: there is no separate quota for the model. Long inputs count by size (below); inputs of more than 2,000 characters are scored in windows across the whole text (up to 20 windows), see Long inputs. Need more in a given month? Prepaid credits, or one-time credit packs: $10 (100,000 calls), $50 (500,000), $100 (1,000,000). Need SSO? Email sales@usezn.com. Need SIEM export? Contact us. Current prices: pricing.

How calls are counted

  • POST /analyze (and and /prod/analyze, used by zn-gate with ZN_STAGE=prod) is billed by size: one call up to 2,000 characters of input, one more for each extra 1,000 characters or part of them (20,000 characters = 19 calls). The response says how many calls it billed (billed_calls).
  • A hosted MCP analyze call counts once, whichever layer decided.
  • Retries are new requests and count again.
  • Local zn-gate checks (CLI, SDK, local MCP server) run on your machine and never count.

Your live usage is in the dashboard. The RateLimit-* headers on successful POST /analyze responses (not on GET /usage) show what is left in the current window.

Blocks by rules and by model

GET https://api.usezn.com/prod/usage returns your calls for the last 12 months (usage, one entry per month, newest first) and for the current month (currentMonth). It is what the dashboard reads. You can call it with your dashboard sign-in or with one of your full API keys (see Reading usage with an API key).

Since 14 October 2026 each month also says what decided its blocks:

Field Meaning
blockedByRules Blocks decided by the deterministic rules
blockedByModel Blocks decided by the model (Galvanize 3.1, or Galvanize-60M when it decides as the fallback)
decidedByComplete true when every call of the month is in this split; false when the month also has calls from before 14 October 2026, which count in blocked but in neither of the two fields above
decidedByTrackedSince At the top level of the response: the date the split started, "2026-10-14"

Months with no calls since that date have blockedByRules and blockedByModel set to null. A month with no calls yet shows 0 and 0.

Detailed usage and CSV export

GET https://api.usezn.com/prod/usage?view=detail returns your own usage in detail. It is what the usage page of the dashboard shows under "Usage details". It accepts the same credentials as GET /usage (your dashboard sign-in or a full API key) and, like it, only ever answers about the account the credential belongs to: no parameter or header can point it at another account.

curl -s "https://api.usezn.com/prod/usage?view=detail" \
  -H "Authorization: Bearer $ZN_API_KEY" \
  | jq '.detail.quota'

The answer is { "detail": { ... } }, all times in UTC:

Field Meaning
series.hourly The last 48 hours, one entry per hour (hour: YYYY-MM-DDTHH), oldest first, zeros included
series.daily The last 90 days, one entry per day (date)
series.monthly The last 12 months, one entry per month (month)
windows Totals for today, last7, month and total, each with clients (the client names your requests sent, top 10)
quota The quota the API enforces on you: used, limit, usedPct, scope (personal, or org for the shared quota of your Team organization), projectedMonthCalls, and exhaustion with exhaustionDay
coverage Since when each number is counted

Every entry of a series and every window carries the same numbers:

  • requests, calls (billed calls), allowed, blocked and blockPct (the share of requests blocked). The verdict is always allow or block.
  • byRules and byModel: who decided the blocks.
  • rejected429 (rate limited), rejected402, rejected400 and errors (500 and 503 answers).
  • latencyP50Ms and latencyP95Ms, from a histogram, so they are bucket bounds (25, 50, 100, 200 ms and so on), or null without data.
  • endpoints (v30 = /analyze, prod = /prod/analyze, mcp = the MCP server), channels (api, mcp, gate = zn-gate with the cloud enabled) and models (galvanize-3.1, galvanize-3, galvanize-60m, none for calls decided by the rules alone, unrecorded for older calls), each with requests, blocked and blockPct.

exhaustion is projected (the limit is reached around exhaustionDay at this month's rate so far), not_this_month, reached, no_use (no calls this month yet) or no_limit. The projection is linear: this month's calls per elapsed day, carried to the end of the month.

  • Team. Members see their own calls and their organization's shared quota, never the calls of other members.
  • Counts only. No prompt text, IP addresses, evidence records or evidence ids are part of this answer.
  • Retention. Hourly counters are kept for 400 days; daily and monthly counters for 730 days. They are stored under a keyed hash of your account (HMAC with a secret), not your email.
  • Coverage. Calls, verdicts, endpoint, model and latency go back to the start of your history. Channel, client, 400s and errors are counted from the day per-account counters started (November 2026); older days show 0 for them.

Add &format=csv for the same numbers as a CSV file (Content-Type: text/csv, downloaded as zn-usage-YYYY-MM-DD.csv): one row per hour, day, month and window, and one quota row. Text cells are quoted, and a cell that a spreadsheet could read as a formula is prefixed with '.

curl -s "https://api.usezn.com/prod/usage?view=detail&format=csv" \
  -H "Authorization: Bearer $ZN_API_KEY" -o zn-usage.csv

Any other format returns 400 with code invalid_format. Reading usage does not count as an API call.

Reading usage with an API key

You can read your usage from a script or a CI job with a full API key (the kind the dashboard creates). Send it as a bearer token:

curl -s https://api.usezn.com/prod/usage \
  -H "Authorization: Bearer $ZN_API_KEY"

ZN_API_KEY is your own key from the dashboard; keys start with zn_. Set it in your shell or in your CI secrets before you run the examples.

  • Read-only. A key can only call GET /usage. Any other method returns 405. Reading usage does not count as an API call and does not change the key's "last used" time.
  • Your own usage only. The response is about the account that owns the key. It is the same response your dashboard gets: same fields, same numbers. Nothing in the request can point it at another account.
  • Team. If you are a member of a Team organization, currentMonth.org shows the organization's pooled quota (used, limit, seats), exactly as in the dashboard. Your own calls stay in calls.
  • Daily. daily lists your own calls for the last 30 days (UTC), oldest first: one { "date": "YYYY-MM-DD", "blocked": n, "allowed": n } entry per day, with zeros for days without calls. dailyComplete is false when your history was too large to read in full, so the oldest days may be undercounted.
  • Analysis-only keys. A key limited to analyzing prompts cannot read usage: it returns 403 with {"error": "key_scope", "message": "This key can only analyze prompts."}. Use a full key from the dashboard. See Key scopes.
  • Errors. A revoked, unknown or malformed key returns 401 with {"error": "Invalid API key"}. Revoking a key in the dashboard cuts its access to usage at once. With a dashboard sign-in instead of a key, a missing or invalid token returns 401 with {"error": "Unauthorized"}, and a sign-in whose email is not verified returns 403 with {"error": "Verify your email address, then sign in again", "code": "email_not_verified"}.

Example: calls used and left this month.

curl -s https://api.usezn.com/prod/usage \
  -H "Authorization: Bearer $ZN_API_KEY" \
  | jq '.currentMonth | {callsUsed, callsLimit, left: (.callsLimit - .callsUsed)}'

Treat the key like a password: keep it in an environment variable or a secret store, not in your code.