Developers

API keys

Create, copy, use, and revoke workspace API keys for Cogno CLI workers.

Settings / API Keys6 min read

Use API keys to authenticate Cogno CLI workers for a workspace. API keys are created in the app, copied once, and revoked from workspace settings.

What an API key is for

Current workspace API keys use the worker scope. They are intended for CLI and worker daemon authentication.

Use caseSupported
Authenticate cogno login --token <key>Yes
Run the root cogno worker daemon for a workspaceYes
Replace a browser session for a worker daemonYes
General public API accessNot documented here

Create a key

  1. Open the Cogno app.
  2. Select the workspace.
  3. Open Settings > API Keys.
  4. Select Create.
  5. Enter a name, such as MacBook worker or CI worker.
  6. Select Create.
  7. Copy the raw key immediately.

The raw key is shown once. After closing the dialog, Cogno only shows key metadata and a prefix.

Use the key with the CLI

Run:

cogno login --token <key>
cogno

Then open Settings > Workers. The worker should appear after it registers and starts sending heartbeats.

Key format and limits

PropertyValue
Prefixcogno_wk_
Scopeworker
Active key limit25 per user per workspace
Raw key storageRaw key is not shown again after creation
List viewShows name, prefix, created date, and last used date when available

Naming keys

Use names that make revocation decisions obvious.

Good nameReason
alice-macbook-workerIdentifies owner and device.
buildkite-prod-workerIdentifies service and environment.
migration-laptop-2026-06Identifies temporary use.

Avoid names like test, key, or worker when more than one person operates the workspace.

Store the key

Treat the raw key like a password.

  • Store it in a local secret manager, CI secret store, or environment variable.
  • Do not paste it into task comments, docs, chat, tickets, or screenshots.
  • Do not commit it to a repository.
  • Create separate keys for separate machines or services.
  • Revoke temporary keys when the task is complete.

Revoke a key

  1. Open Settings > API Keys.
  2. Find the key by name or prefix.
  3. Select the revoke icon.
  4. Confirm Revoke.

Revocation is immediate and irreversible. Workers using that key lose access immediately. Create a replacement key before revoking when continuity matters.

Rotate a key

  1. Create a new key.
  2. Copy and install the new key on the worker machine or service.
  3. Restart the worker.
  4. Confirm the worker appears in Settings > Workers.
  5. Revoke the old key.

Troubleshooting

SymptomCheck
The raw key is goneCreate a new key. Existing raw keys cannot be viewed again.
Create failsCount active keys for your user in this workspace. The limit is 25.
Worker does not appearRun the root cogno worker daemon, then check Settings > Workers.
Worker was connected and stoppedConfirm the process is still running and the key was not revoked.
Revoke affected the wrong workerCreate a new key for that worker and log in again with cogno login --token <key>.

LLM handoff

When asking an assistant to help with API key setup, provide:

  1. Workspace name or ID.
  2. Key name and visible prefix, never the raw key.
  3. Command you ran.
  4. Worker output or visible error text.
  5. Whether the key was just created, rotated, or revoked.

Use Copy for LLM for the workflow. Remove secrets before sharing terminal output.

API keys | Cogno