For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage API Keys

Create, list, protect, and revoke workspace API keys from the terminal with the roboflow api-key command group.

The roboflow api-key command group lets you manage your workspace's API keys from the terminal. It wraps the API key REST endpoints and uses the workspace and credentials from your CLI config (see Install and Set Up the CLI).

The full secret value is shown only when you create a key. Capture it immediately - list/get never reveal it again.

roboflow api-key --help
Command
Description

list

List the workspace's API keys.

get

Show details for one key.

create

Create a new key (prints the secret once).

update

Update a key's name, scopes, or metadata.

protect

Mark a key as protected.

disable

Disable or re-enable a key.

revoke

Permanently revoke a key.

publishable

Print the workspace publishable key.

Add --json (a global flag, before the command) to get machine-readable output for scripting, e.g. roboflow --json api-key list.

List keys

roboflow api-key list
roboflow api-key list --include-disabled --include-folders

Get one key

Keys are addressed by their keyId (the non-secret handle shown in list):

Create a key

The secret is printed once. To capture it in a script, use --json and pipe to jq:

Update a key

--scope replaces the key's existing scopes with exactly the set you pass, and --metadata replaces the key's metadata. Send --name on its own to rename without touching either.

Protect / unprotect a key

A protected key cannot be disabled or revoked via the CLI, API, or MCP. Unprotecting can only be done in the dashboard - there is intentionally no unprotect command, so an automated workflow can't remove the safety and revoke a production key in one step.

Disable / re-enable a key

Disabled keys are rejected by the API but can be re-enabled. A protected key cannot be disabled.

Revoke a key

Revoking is permanent. A protected key cannot be revoked from the CLI - unprotect it in the dashboard first.

Get the publishable key

The publishable key (rf_<workspaceId>) is non-secret and safe to embed in browser / inferencejs code. It is inference-only and cannot be created or revoked. See Manage API Keys (REST) for details.

Last updated

Was this helpful?