Manage API Keys
Create, list, protect, and revoke workspace API keys from the terminal with the roboflow api-key command group.
Last updated
Was this helpful?
Was this helpful?
roboflow api-key get <key_id># Inherits the calling credential's scopes (a full-access key when the caller is full-access)
roboflow api-key create "my-app"
# Scoped key (repeat --scope; requires Advanced API Keys)
roboflow api-key create "inference-only" --scope model:infer
# Role preset - grant an RBAC role's scopes (built-in or custom role name);
# composable with explicit scopes. role:owner means full access.
roboflow api-key create "reviewer-bot" --scope role:reviewer --scope model:infer
# Folder-scoped + protected
roboflow api-key create "edge-device" --folder <folder_id> --protected
# Attach metadata (repeat --metadata; requires Advanced API Keys)
roboflow api-key create "ci-key" --metadata team=vision --metadata env=prodroboflow --json api-key create "ci-key" | jq -r .key > .env.key# Rename
roboflow api-key update <key_id> --name "renamed-key"
# Replace the key's scopes (repeat --scope)
roboflow api-key update <key_id> --scope model:infer --scope project:read
# Replace the key's metadata (repeat --metadata)
roboflow api-key update <key_id> --metadata team=vision --metadata env=prodroboflow api-key protect <key_id>roboflow api-key disable <key_id> # disable
roboflow api-key disable <key_id> --enable # re-enableroboflow api-key revoke <key_id> # prompts for confirmation
roboflow api-key revoke <key_id> --yes # skip the prompt (for scripts)roboflow api-key publishable
roboflow --json api-key publishable | jq -r .publishableKey