All console actions here live in the Keys screen (
/console/token)
and run on your session / access token — not the relay key. Creating,
editing, disabling, or deleting a key requires the Developer role or
above. Only /v1/* inference calls use the sk-orca-… relay key.1. Why rotate, and why never in place
A key on OrcaRouter is an immutable identity, not just a string — it carries its own model allow-list, IP allow-list, spend cap, expiry, and policy attachments. You cannot change the secret material of an existing key; the credential and the constraints are issued together at creation. So “rotating” means issuing a successor and migrating onto it. Do it:- on a fixed cadence for any production credential (quarterly is a common baseline);
- the moment a key is suspected leaked — though for a confirmed leak, cut it off first and rotate second (see Leaked key response);
- whenever the key’s owner (an employee, a vendor integration, a decommissioned agent) changes.
2. The rotate api key sequence
The whole point is a clean overlap: the new key works before the old one stops. Four steps.Create the successor key
Mint a new key with the same scope as the one you’re replacing —
the same
model_limits, allow_ips, credit_limit_usd, expired_time,
and the same guardrail_id / firewall_policy_id. Copy the plaintext
immediately. Rotation is the ideal moment to tighten scope too: drop
a model the agent no longer uses, or narrow the IP allow-list.Migrate traffic
Deploy the new
sk-orca-… to every caller — config, secret manager,
CI variable, agent runtime. Roll it out the same way you ship any
secret change. Both keys are live at this point, so deployments can be
staggered without an outage.Verify the new key is carrying load
Confirm the successor is actually serving traffic before you touch the
old one. Watch the new key’s
used_quota climb while the old key’s
flattens — the per-key usage is your cutover signal.3. A concrete rotation, via REST
Everything below is a console action — these management routes run under your session (UserAuth), not the relay key. Suppose you’re replacing the
key for a scheduled summarizer agent. Create the successor with the
same scope:
"data": "sk-orca-…"). Copy
it, deploy it to the summarizer, and confirm the new key is serving before
moving on.
When the old key (id 481) shows no traffic, disable then delete it:
Enabled (1), Disabled (2), Expired (3), or
Exhausted (4). Disabling sets it to Disabled; every request the key
makes is then rejected while its config, attachments, and history stay
intact. Deleting is permanent — the credential can never authorize a
request again, and a deleted key is not recoverable.
You can do all of this without the API — the Keys screen has New
key, a per-key Disabled toggle, and Delete (single or batch).
The REST form above is for scripting scheduled rotations.
4. Rotating policy-bound and gateway keys
A key’s guardrail and firewall attachments live on the key, so the successor must carry the sameguardrail_id
and firewall_policy_id to enforce the same posture. Two things to know:
The policies survive rotation — only the binding moves
The policies survive rotation — only the binding moves
Guardrails and firewall policies are workspace-scoped, named resources
shared across keys. Rotating a key doesn’t touch the policy itself;
you’re just re-pointing a fresh key at the existing
guardrail_id /
firewall_policy_id. The policy keeps governing traffic uninterrupted.Gateway-scoped keys need Admin and an extra copy discipline
Gateway-scoped keys need Admin and an extra copy discipline
A key with
is_firewall_gateway set drives the
Firewall gateway
routes (/api/v1/firewall/*). Minting one, and re-revealing its
plaintext, both require Admin. Because you can’t casually re-read
its secret, capture the new gateway key’s plaintext at creation and
store it in your secret manager before you cut over.5. Emergency rotation (suspected leak)
If you think a key is exposed, the order flips: stop the bleeding first, migrate second.- Disable the suspect key right away so it can’t authorize anything while you investigate — or delete it outright if the leak is confirmed.
- Mint the successor and roll it out as in §2.
- Review what the leaked key did before you cut it: filter the request logs by that key (token) to scope the blast radius.
6. Next steps
Manage keys
The create / disable / revoke lifecycle these steps build on.
Bind policies to a key
Carry the same guardrail and firewall policy onto the successor.
Expiring keys
Set an expiry so keys rotate themselves on a deadline.
Leaked key response
The emergency path when a credential is exposed.
