Cohere API keys come in two kinds, trial and production, and both are managed at dashboard.cohere.com/api-keys. Trial keys are free but rate-limited; production keys are paid, need a team Owner to complete the Go to Production form, and can only be deleted by an Owner. The Cohere Python SDK reads the key from CO_API_KEY.
Cohere key types
| Type | Prefix | Secret? | Scope | Expiry |
|---|---|---|---|---|
| Trial key Cohere's rate-limit page says trial keys are limited to 1,000 API calls a month. | — | Yes | Free evaluation use with low rate limits | — |
| Production key Available after a team Owner completes the Go to Production form; the team can then create any number of production keys. Newer model variants such as Command A Reasoning behave like trial keys even on production; contact sales before production use. | — | Yes | Paid use with higher rate limits | — |
How to create a Cohere key
- Sign in to the Cohere dashboard.
- Open
dashboard.cohere.com/api-keys. - Create a trial key, or a production key once an Owner has completed the Go to Production form.
- Copy the key when it is created. Full production keys are viewable only at creation.
- Set it as
CO_API_KEYso the SDK can read it without the key appearing in code.
Limiting what the key can do
Cohere API keys are not scoped to individual endpoints. Control comes from team roles and billing: Users can view, create, copy and rename trial keys and make production keys, while only Owners can generate, rename and delete production keys. A maximum billing amount can be set per key in the dashboard, and requests fail with a 402 once it is reached.
How to rotate a Cohere key
- Create a new key on the API keys page.
- Deploy it wherever
CO_API_KEYis read and confirm requests succeed, for example with the check-api-key endpoint. - Ask a team Owner to delete the old production key.
Cohere API keys have no built-in overlap window; the old key keeps working until it is deleted.
How to revoke a Cohere key
- Open
dashboard.cohere.com/api-keys. - Delete the key. Only team Owners can delete production keys.
- Requests with a deleted or expired Cohere API key return HTTP 401.
If your Cohere key leaked
- Ask a team Owner to delete the exposed Cohere API key on the API keys page.
- Create a replacement key and deploy it.
- Check usage and billing in the dashboard for activity you do not recognise.
- Set a maximum billing amount on the replacement key.
- Turn on GitHub push protection; GitHub secret scanning detects Cohere API keys before they are pushed.
Environment variables and CLI
Cohere's SDKs and docs read the key from CO_API_KEY.
Things that catch people out
- Trial keys are limited to 1,000 API calls a month and 20 requests a minute on chat models.
- A per-key maximum billing amount returns 402 once reached; the capacity resets at the start of the next month.
- Full production keys are shown only when created, though every team member can see which keys exist.
Common Cohere authentication errors
no api key supplied
HTTP 401. The request did not include a Cohere API key.
invalid api token
HTTP 401. The Cohere API key is invalid or has been deleted.
Your API key has expired. Please create a production key at dashboard.cohere.com or reach out to your contact at Cohere to continue usage.
HTTP 401. The key has expired.
Using your Cohere key with AI agents
A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.
BotPassword works this way. For a Cohere key, these intents fit:
| Intent | What BotPassword does |
|---|---|
run_with | Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output. |
http_request | Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused. |
store_secret | Saves a value the agent already holds as a new vault item. |
capture_secret | Planned, not built yet: will read a newly created key straight from the page or command output into the vault. |
Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents
Frequently asked questions
Where do I get a Cohere API key?
Create a trial or production key at dashboard.cohere.com/api-keys.
What is the difference between Cohere trial and production keys?
Trial keys are free and rate-limited; production keys are paid with much higher limits and need an Owner to complete the Go to Production form first.
Is the Cohere API free?
Trial keys are free but limited to 1,000 API calls a month.
What environment variable does the Cohere SDK use?
The Cohere Python SDK reads CO_API_KEY, so code calling cohere.Client() does not need the key in source.
Who can delete a Cohere production key?
Only team Owners can generate, rename and delete production keys.
Can an AI agent use my Cohere key without seeing it?
Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a .env file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with run_with, http_request, store_secret, so the agent gets the result and never the value.