Skip to main content

API Keys

What are API Keys

API Keys are secure tokens used to authenticate requests to Orq.ai. Each key is scoped to a single project and carries a set of permissions that control what it can do. Two key types are available, chosen by the key’s owner.

User keys

Tied to a specific user account and project. Automatically revoked if the user is removed from the organization or project. Use user keys for personal use and local development.

Service account keys

Not tied to any individual user, with a lifecycle independent of user membership. Only workspace admins can create service account keys. Use service account keys for production systems, so access does not break when a team member leaves.

Viewing API Keys

Navigate to Settings > Organization > API Keys to see all keys across projects. The table shows the following columns: Use the menu to filter by Type or Permissions.

Creating an API Key

1

Open the creation panel

Navigate to Settings > Organization > API Keys and select Create API key.
Create API key panel showing fields for owner, name, project, permissions, and expiration.

The API key creation panel.

2

Choose an owner

Select You to create a User key, or Service account to create a key not tied to any individual user.
3

Set name and project

Enter a Name for the key and select the Project it will have access to.
4

Set permissions

Choose a permission preset. See Permissions below.
5

Set expiration (optional)

Set an Expiration date if the key should automatically become inactive after a certain date.
6

Create and copy the key

Select Create API key. A Save your key dialog appears showing the token and its permissions summary.
Save your key dialog showing the API key token with a Copy button and a Permissions summary reading Read and write API resources.

The Save your key dialog appears once after creation.

Click Copy to copy the token.
The token is only shown once. Store it securely before closing this dialog. It cannot be retrieved afterwards.
To cap a key’s cost, token, or requests-per-minute usage, attach a Budget to it. Budget limits reset on the configured period. See Rate limits & quotas for what the gateway enforces at each layer.

Permissions

With Restricted, set the permission for each resource individually: None, Read, or Write.
Write permission automatically includes Read where Read is available for the endpoint.

Managing Keys

API Keys management table listing keys with columns for name, type, status, permissions, and created by.

The API Keys management table showing all keys, their type, status, permissions, and actions.

Select the menu on any key to access the following actions:
  • Edit: update the name, permissions, or expiration date. The owner type cannot be changed after creation.
  • Duplicate: opens the creation panel pre-filled with the key’s current settings.
  • Delete: permanently removes the key. This cannot be undone.
A Revoked status means the key belonged to a user who was removed from the organization or project, or it has been revoked manually. Revocation is permanent.

Management Keys

Overview

Management Keys are only available to workspace admins. The Management Keys page is not visible to non-admin members.
Management Keys are workspace-scoped tokens for authenticating workspace administration operations. They can manage API keys, Budgets, Projects, and Smart Routers.
Management Keys cannot be used to query models or agents. Use a standard API Key for inference and product endpoints.

Use cases

  • Automating workspace provisioning via the API.
  • Delegating API key rotation to a deployment pipeline without granting full admin access.
  • Letting a billing automation script read and update Budgets without exposing API key management.

Workspace administration endpoints

Standard API keys are project-scoped. Use a Management Key for these workspace administration endpoints: Notifiers are intentionally not listed here: their routes are project-scoped and do not require a Management Key. Project-scoped API keys can access the Notifiers API for their selected project.

View Management Keys

Navigate to SettingsOrganizationManagement Keys to view all keys in the workspace.
Management Keys list with columns for Created date, Name, Status, Permissions, and Created by.

The Management Keys list showing key name, status, permission mode, and creator.

Click any row to open the edit panel and update the key’s name, permissions, or expiration date. Hover a row and click for additional options:
  • Edit: open the edit panel to update the key’s name, permissions, or expiration date.
  • Duplicate: create a new key with the same permissions.
  • Delete: permanently remove the key from the workspace.

Create a Management Key

1

Open the creation panel

Navigate to SettingsOrganizationManagement Keys and click New key.
Create new key dialog showing Name field, Permissions toggle with All, Restricted, and Read only options, API keys and Budgets capability rows, and an Expiration date field.

The Create new key dialog with fields for name, permissions, per-capability access, and expiration date.

2

Enter a name

Enter a Name for the key (required, max 128 characters).
3

Set permissions

Select a Permissions mode, default is All. See Permission modes below.
4

Set expiration (optional)

Set an Expiration date if the key should stop authenticating after a certain date.
5

Create and copy the key

Click Create key. A Save your key panel appears showing the token.
The token is only shown once. Store it securely before closing this panel. It cannot be retrieved afterwards.

Permission modes

Capabilities

Management Keys are not available through MCP. Use the REST API to manage keys programmatically.

Manage keys programmatically

Create, update, revoke, and delete API Keys and Management Keys with the API instead of the console. The full endpoint reference is on the API Keys reference and Management Keys reference pages.

Authenticating with a Management Key

Key management requests authenticate with a Management Key, never an API key. API Keys are project-scoped inference credentials and cannot administer keys.
  • Pass a Management Key as the bearer token, or as the SDK API key.
  • A Management Key with the api-key write grant can list, create, update, revoke, and delete API Keys.
  • Managing Management Keys requires the management-key grant, which is not part of the All or Read only presets. Grant it explicitly to a Management Key that must administer other Management Keys.
The SDK exposes these operations as api_keys / apiKeys and management_keys / managementKeys: API Keys SDK, Management Keys SDK.

Key lifecycle in code

These examples use a Management Key as ORQ_API_KEY. Create a project-scoped key with restricted permissions:
Disable, revoke, or delete an existing key:
To rotate a key, create a replacement key with the same configuration, then revoke the old one. Rotation is create followed by revoke; there is no dedicated rotate endpoint.

Permission model

permission_mode selects the preset: With PERMISSION_MODE_RESTRICTED, the access map assigns a level to each domain: ACCESS_LEVEL_NONE, ACCESS_LEVEL_READ, or ACCESS_LEVEL_WRITE. Write includes read. REST JSON accepts the enum names; the SDKs type the map as integers and use the numeric values: The capability catalog lists the domains a key can be granted: GET /v2/api-keys/capabilities returns each domain with its id, display name, group, and read / write availability. Use the catalog to discover grantable domains at runtime instead of hard-coding the list.

The secret is returned once

The create response returns the raw token exactly once, in the sk-orq-<id>-<secret> format. Store it immediately: the API stores only a displayable token_prefix and a hash of the secret, so list and retrieve responses never include the token.
The token is only returned in the create response. Store it securely and treat it like a password; it cannot be retrieved afterwards.

Cost, token, and rate limits

Keys do not carry limit fields. Attach cost, token, and requests-per-minute limits with a Budget scoped to the key. Budgets are workspace resources and require a Management Key; regular API Keys cannot manage them.

Example: provision a per-customer key with a spend cap

Create a key scoped to the customer’s project, then attach a monthly spend cap as a Budget scoped to that key: