OpenIndex uses Personal Access Tokens (PATs) as bearer tokens for all API and CLI authentication. There are no session cookies or OAuth flows for programmatic access — every request carries a PAT.Documentation Index
Fetch the complete documentation index at: https://docs.orca.0-9.ai/llms.txt
Use this file to discover all available pages before exploring further.
Token scopes
PATs are issued with one of two scopes:| Scope | Access |
|---|---|
read_write | Work item and queue operations — required for all standard oi CLI commands. |
admin | Superset scope that includes all read_write access plus instance admin endpoints. |
read_write for agents and automation. Reserve admin tokens for administrative tooling.
Create a PAT
Create tokens in the OpenIndex web UI:- Sign in to the web UI.
- Navigate to Settings → Personal → Tokens.
- Click Create token, enter a name, and choose a scope.
- Optionally set an expiry date. If you leave the expiry blank, the token does not expire.
- Copy the token value — it begins with
oi_pat_and is shown only once.
Use a PAT with the CLI
Configure youroi profile with your token:
OPENINDEX_TOKEN environment variable to override the profile value without modifying your config file:
Use a PAT with the HTTP API
Pass the token as a bearer token in theAuthorization header:
PAT lifetime
PATs are non-expiring by default. When you create a token, you can optionally set an expiry date. After the expiry date, the token is rejected with a401 Unauthorized response.
To rotate a token, create a new one and delete the old one.
Manage PATs via API
- List tokens
- Create a token
- Delete a token
Error handling
| Status | Meaning | Resolution |
|---|---|---|
401 Unauthorized | Token is missing, invalid, or revoked. | Check the token value with oi auth check or oi profile show. |
403 Forbidden | Token scope is insufficient for the requested operation. | Use a token with a higher scope — for example, admin for instance admin endpoints. |
oi auth check to inspect your token’s validity and effective scope:
Security notes
Workflow agent run tokens are intentionally rejected for settings commands. Use a human-owned PAT — not a workflow agent run token — when running
oi settings ... commands or any admin endpoint.