keys
API keys let CI and scripts call Octri without signing in. On its own, octri keys lists them, with each one's name, prefix, expiry and when it was last used, and flags any that have expired. Use one by setting OCTRI_API_KEY. See API keys.
Some dashboard features only answer a signed-in session, not an API key, such as the docs studio and MCP settings. Sign in with auth login for those.
bash
octri keys [list | create <name> | revoke <keyId> --yes]octri keys create <name>
Creates a key and prints it. It's shown once, so store it then, such as in your CI's secrets.
Arguments
<name>stringrequiredWhat the key is for, such as github-actions.
Flags
--expires <date>stringWhen it stops working, such as 2027-01-01. Without it, it doesn't expire.
octri keys revoke <keyId> --yes
Revokes a key. Anything using it stops working at once. Without --yes it only warns you.
Arguments
<keyId>stringrequiredThe key, from the list.
Flags
--yesbooleanrequiredConfirms it.
Examples
List keys
bash
octri keysOutput
✔ Loading API keys
API keys (0)
No API keys yet. Run `octri keys create <name>`.Use a key in CI
bash
export OCTRI_API_KEY="$OCTRI_CI_KEY"
octri sdk build --lang go --detachRelated
octri auth token: Print the session's bearer token, for calling the API yourself.- API keys