API keys
- cmd
hev login
Club Kit issues one customer-facing hev_ key per machine or member via
hev login (/cli/exchange) and Club Kit Settings. That single key authenticates
both your team’s shared hev layer archive and your
organization’s hosted /v1/inference/* access through hev kit.
One unified hev_ key
Club Kit keys use the hev_ prefix (hev_<32 base62 chars>) and are backed
directly by Layer’s ApiKey lifecycle. There is no separate duplicate Kit auth
secret registry to synchronize or revoke independently.
| Prefix | Issued by | Accepted on | Notes |
|---|---|---|---|
hev_ | hev login (/cli/exchange) and Club Kit Settings | Layer storage, /v1/* API, and /v1/inference/* | Unified key carrying both storage namespaces and org inference entitlement. |
hvl_ | Legacy Layer key minting | Layer storage (and /v1/inference/* if entitled) | Legacy Layer keys remain accepted by Layer without disruption. |
hk_ | Legacy Club Kit key minting | Non-inference /v1/* routes only during migration window | Returns Deprecation: true and Sunset headers until LEGACY_HK_SUNSET_AT. Rejected on /v1/inference/*. |
Hosted /v1/inference/* always requires a hev_ key. Running hev login
upgrades an existing hk_ machine cleanly without affecting org data.
Protected org OpenRouter entitlement
Each organization’s hev_ keys carry a Layer entitlement,
inference.<org-target>, that points to a server-only secretRef
({ name, key: "api_key" }) referencing that organization’s provisioned
OpenRouter credential.
secretRefis never returned to clients. Normal Layer key metadata (GET /v2/keys*and unauthenticated/v2/keys/authenticate) stripssecretRef. Only authorized Club Kit serving and provisioning components resolve it server-side (via authenticated/v2/keys/verify).- Zero secret exposure on API and telemetry surfaces.
GET /v1/whoami,GET /v1/usage, server logs, session traces, and error responses never exposesk-or-v1-...keys,secretRefobjects, or OpenRouter management hashes. - Zero global or factory fallback. If an organization is disabled,
unprovisioned, suspended, or budget-exhausted,
/v1/inference/*fails closed. Club Kit never falls back to another organization’s credential or a shared factory OpenRouter key.
Org OpenRouter budgets, resets, BYOK and /v1/usage
All authorized hev_ keys in an organization share one org-owned OpenRouter
credential and budget. Budgets are admin-managed and never mutable by client
keys.
Budget settings
Organization administrators configure OpenRouter limits with:
limit: spend cap in USD (for example, an illustrative admin-configured cap such aslimit = 100).limit_reset: reset cadence —"daily"at00:00 UTC,"weekly"on Mondays at00:00 UTC,"monthly"on the 1st of the month at00:00 UTC, ornullfor a lifetime cap.include_byok_in_limit: whether bring-your-own-key (BYOK) usage counts toward the org limit.
# Illustrative admin-configured org budget parameters (server-managed, not client config)
limit = 100
limit_reset = "monthly"
include_byok_in_limit = false
Reading usage with GET /v1/usage
GET /v1/usage separates Layer storage metrics from cached provider-reported
inference usage rather than maintaining a duplicate Club Kit spend ledger:
- Layer storage section:
searches,stored_bytes, andretention. - Inference section (cached 30–60s from OpenRouter):
limit,limit_remaining,limit_reset,include_byok_in_limit,usage,usage_daily,usage_weekly,usage_monthly,disabled, andsynced_at, plus astalefreshness indicator when an upstream refresh is rate-limited or temporarily unavailable.
{
"storage": {
"searches": 420,
"stored_bytes": 184549376,
"retention": "90d"
},
"inference": {
"limit": 100,
"limit_remaining": 74.35,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.65,
"usage_daily": 3.10,
"usage_weekly": 11.40,
"usage_monthly": 25.65,
"disabled": false,
"synced_at": "2026-11-24T12:00:00Z",
"stale": false
}
}
Lifecycle: rotation vs. revocation vs. org suspension
Key rotation, individual key revocation, and organization suspension are distinct operations with narrow blast radii:
| Action | Effect on this hev_ key | Effect on sibling org hev_ keys | Effect on org data & OpenRouter budget |
|---|---|---|---|
Rotate a hev_ key | Mints a new hev_ Layer ApiKey bound to the same inference.<org-target> entitlement and revokes the old hev_ key. | Unchanged — sibling keys stay active. | Preserves org trace/board data, the org’s OpenRouter credential, budget, and usage history. |
Revoke a hev_ key (hev logout or key revoke) | Immediately terminates access (401) to both Layer storage and /v1/inference/*. | Unchanged — sibling keys stay active. | Preserves org trace/board data and org OpenRouter budget. |
| Suspend an org | Hosted inference stops immediately (403) locally first, then disables the org OpenRouter key upstream (disabled: true). | Hosted inference stops (403) for every key in the org. | Member hev_ keys are not destroyed; unsuspending restores access cleanly. |
Migration from hk_ and clean rollback
Upgrade a machine from hk_ to hev_
Run hev login on the machine to mint a hev_ key and update [kit].key in
~/.hev/config.toml:
hev login
During the bounded migration window (until LEGACY_HK_SUNSET_AT), existing
hk_ keys continue to work on non-inference /v1/* routes and return
Deprecation: true and Sunset headers so automation can detect stale keys.
Hosted /v1/inference/* does not accept hk_ keys; hev kit
guides you to run hev login instead.
Clean rollback
If you need to stop using Club Kit hosted inference on a machine, roll back locally without affecting teammates or org budgets:
- Revoke this machine’s key: run
hev logout. Only this machine’shev_key is revoked; sibling keys and the org’s OpenRouter budget stay intact. - Switch
hev kitto direct OpenRouter or Codex (unscoped mode): when[[foh.key_scopes]]is not configured, exportOPENROUTER_API_KEY=sk-or-...for direct OpenRouter calls, or select acodex/...model backed bycodex login. - Leave scoped multi-workspace mode:
[[foh.key_scopes]]putshev kitinto exclusive scoped mode where onlyscope/<name>/<model>targets are registered (unscoped slugs andcodex/...models are rejected while scopes remain configured). To roll back to unscoped[kit].key/HEV_API_KEY, directOPENROUTER_API_KEY, orcodex-sub, remove (or comment out)[[foh.key_scopes]]in~/.hev/config.tomland restarthev kit. Rolling back never revokes sibling keys or mutates org OpenRouter budgets. See Scoped inference inhev kit.