Skip to main content

API keys

Keys are minted from the accounts dashboard — there is no API for minting keys (mint flow requires a logged-in human). Sign in to accounts.zerowidth.ai, open Workspace → API keys, click New API key.

Two kinds of key

Pick the kind at mint time. The kind drives what the key can see.

userkind

Member-minted personal key. Sees the same flows you see when signed in via the dashboard — your PRIVATE flows plus everything visible to the workspace. Auto-revoked when you leave the workspace or delete your account. Any workspace member can mint their own user key.

workspacekind

Admin-minted, full-workspace reach. Sees every flow in the workspace including PRIVATE flows owned by other members. Used for shared infrastructure — CI runners, production services, ZeroWidth-side integrations. OWNER or ADMIN required to mint, because the gate is admin trust.

The shape that makes a workspace key surprising: someone with a leaked workspace key has the reach of an admin. Hand them out deliberately. Each row in the dashboard shows who minted the key, for traceability.

Scopes

Every key carries a scope allowlist. Each endpoint declares the scope it requires; the auth layer rejects the request if the key doesn't carry it. Scopes are forever-stable strings — they will never be renamed once shipped.

ScopeWhat it allows
workbench:flows:runExecute Workbench flows via POST /1.0/flows/:flowUuid/runs.
workbench:flows:readList flows + read definitions, metadata, run history. (Endpoints coming.)
workbench:flows:writeCreate, update, duplicate, delete flows. (Endpoints coming.)
workbench:knowledge_bases:readList knowledge bases + read one in full — reference.
workbench:knowledge_bases:searchRetrieve chunks from a knowledge base — search. Separate from read because semantic search spends inference credit per query.
workbench:knowledge_bases:writeCreate knowledge bases + add documents (ingestion spends credit).
caliper:datasets:readList datasets + read items and metadata. (Endpoints coming.)
caliper:datasets:writeCreate, update, delete datasets and their items. (Endpoints coming.)
caliper:reviews:readRead reviews, rubric snapshots, per-item ratings. (Endpoints coming.)
caliper:reviews:writeCreate reviews, submit ratings, manage reviewers. (Endpoints coming.)
caliper:evals:readRead an eval + its bound dataset items — the CI scoring loop.
caliper:evals:writeSubmit eval runs for scoring.
compass:pages:readRead Compass pages, search, and connections — via the MCP server.
compass:pages:writeCreate Compass pages and typed connections — via MCP.

Quick-pick templates in the mint UI:

  • Run flowsworkbench:flows:run. The safe default for a key that only needs to invoke flows.
  • CI evalscaliper:evals:read + caliper:evals:write. For scoring in CI.
  • Full access — every scope. For trusted infrastructure where granularity isn't worth the bookkeeping.

Cost cap

Every key has an optional lifetime spend ceiling in USD. The system sums the cost of every run made by the key; once the running total reaches the cap, new runs are denied with 402 plan_limit. The cap is the leaked-key safety net — if a key ends up in a public repo, it burns at most this amount before stopping.

New keys default to $10. Set to Unlimited (null) explicitly for trusted infrastructure. The dashboard displays running spend ($X.XX of $Y.YY) per key.

Revocation

Workspace admins can revoke any key. Members can revoke their own personal keys. Revocation is immediate — the next request returns 401 auth_invalid. The revoked key is retained in the dashboard so historical run logs still show which key produced them; you cannot un-revoke.

4 min read