0, -1) that carry
special meaning.
For the why behind these fields — the least-agency model — start at
Scoped keys overview. This page is the lookup
table you keep open while you script key creation.
1. The token object reference at a glance
A freshly created key for a scheduled summarizer agent looks like this:The
key field is masked on every read — you see the brand prefix and
the last four characters, never the full secret. Plaintext is shown once,
at creation. See Key masking.2. Identity & lifecycle fields
These describe which key this is and where it is in its lifecycle.id — number
id — number
The key’s stable numeric identifier. Use it to address the key in
update and delete calls. Read-only.
name — string
name — string
A human label for the key, shown in the console and in logs. Name keys
after the agent that holds them — one key, one agent.
status — number
status — number
Enabled / disabled state.
1 means active; a disabled key is rejected
at auth without being deleted, so you can pause a key and re-enable it.key — string (masked)
key — string (masked)
The bearer secret, returned masked (
sk-orca-…****…). The full value
is shown only once, at creation. Treat it like a password.created_time / accessed_time — number
created_time / accessed_time — number
Unix timestamps (seconds) for when the key was minted and when it last
served a request.
accessed_time is your signal for a stale or unused
key worth revoking.expired_time — number
expired_time — number
Absolute expiry as a Unix timestamp. The sentinel
-1 means the key
never expires. Set a real timestamp to make a key auto-expire — the
right default for CI runs and ephemeral agents. See
Expiring keys.3. Spend & quota fields
These bound how much a key can consume before it stops working.| Field | Type | Meaning |
|---|---|---|
credit_limit_usd | number | Lifetime spend cap in USD. 0 = unlimited. |
unlimited_quota | boolean | When true, the key is not metered against a quota balance. |
remain_quota | number | Quota remaining on the key. |
used_quota | number | Quota consumed so far. |
4. Reach & scope fields
These cap what the key can reach — which models, from which addresses.model_limits / model_limits_enabled
model_limits / model_limits_enabled
model_limits is the list of models the key may call;
model_limits_enabled is the on/off switch. With the limit enabled, a
call to any model outside the list is rejected before it leaves the
gateway — the agent can’t switch to a pricier or more capable model.
See Model limits.allow_ips — string
allow_ips — string
An IP / CIDR allow-list, one entry per line. A request presenting
the key from any unlisted address is rejected at the auth layer; an
empty value means all addresses are allowed. See
IP allow-list.
environment — string
environment — string
A free-form deployment label (
prod, staging, dev, or anything you
choose) for organizing keys and filtering logs. Purely organizational —
it doesn’t change enforcement. See
Environments.group — string
group — string
The routing group the key resolves models through. Leave it at the
workspace default unless you’ve been given a specific group.
5. Policy attachment fields
The two most powerful fields on a key. Each binds the key to a workspace-scoped policy that governs its traffic — change the policy and every key attached to it picks up the change on the next request, no redeploy.| Field | Type | Binds the key to |
|---|---|---|
guardrail_id | number | A content guardrail that screens request and response text. |
firewall_policy_id | number | A firewall policy that governs the tool calls the key issues. |
is_firewall_gateway | boolean | Marks the key as a gateway-scoped token for the Firewall MCP / evaluate routes (not for inference). |
The sentinel for both attachments is
0 (unattached). But the two
planes resolve a disabled attachment differently:- A disabled
guardrail_idis the off switch — the key gets no guardrail, with no fallback to the workspace default. - A disabled
firewall_policy_idfalls back to the workspace default firewall policy.
6. Setting these fields
Every field above is configured in the console key editor (/console/token) — not through a relay key. Creating or editing a key
requires the Developer role or above; the is_firewall_gateway flag
requires Admin+.
A concrete least-agency key — set in the editor, read back as the object
above — caps one model, one source IP range, a weekly USD ceiling, an
expiry, and one guardrail plus one firewall policy. If the agent holding it
is hijacked via prompt injection, the
blast radius stops at exactly those bounds.
7. Related references
Scoped keys overview
The least-agency model and the hub for every key field.
Bind policies
How
guardrail_id and firewall_policy_id resolve to an active policy.Quota, cap & expiry
credit_limit_usd, expired_time, and the quota fields in depth.Least-agency checklist
Run every key through the same hardening pass.
