Guides
Configure and update API Keys
A 51cowork API Key authenticates model calls; it is not an account-management token.
Key creation, listing, and deletion follow the current Dashboard. Verify replacement configuration before deleting an old Key.
- Create
- Dashboard
- Copy
- Store safely once
- Update
- Verify replacement
- Store
- Secret / local file
Environment variables
Terminal
bashexport COWORK_GATEWAY_URL="https://api.51cowork.com"
export COWORK_API_KEY="<key-from-dashboard>"
export COWORK_MODEL="<model-from-v1-models>"Environment variables are useful for local tests and service injection. Production should use a Secret Manager or deployment Secret.
Configuration files
- Claude Code uses user-level settings.json.
- Codex uses config.toml and auth.json.
- OpenCode uses user-level opencode.json.
- Save and update API Keys in the model settings of Cursor, Cherry Studio, and WorkBuddy.
- Restrict each file so only the current user can read it.
Key update checklist
- 1Create or select a replacement Key in Dashboard.
- 2Update every Secret.
- 3Fully restart clients that cache credentials.
- 4Send a minimal request and verify it in Usage.
- 5Delete the old Key after migration is complete.
