# Cohere API keys: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/cohere
Last checked: 2026-11-08

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`.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| Trial key | — | Yes | Free evaluation use with low rate limits | — |
| Production key | — | Yes | Paid use with higher rate limits | — |

## How to create a Cohere key

1. Sign in to the Cohere dashboard.
2. Open `dashboard.cohere.com/api-keys`.
3. Create a trial key, or a production key once an Owner has completed the **Go to Production** form.
4. Copy the key when it is created. Full production keys are viewable only at creation.
5. Set it as `CO_API_KEY` so 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

1. Create a new key on the API keys page.
2. Deploy it wherever `CO_API_KEY` is read and confirm requests succeed, for example with the check-api-key endpoint.
3. Ask a team Owner to delete the old production key.

## How to revoke a Cohere key

1. Open `dashboard.cohere.com/api-keys`.
2. Delete the key. Only team Owners can delete production keys.
3. Requests with a deleted or expired Cohere API key return HTTP 401.

## If the key leaked

1. Ask a team Owner to delete the exposed Cohere API key on the API keys page.
2. Create a replacement key and deploy it.
3. Check usage and billing in the dashboard for activity you do not recognise.
4. Set a maximum billing amount on the replacement key.
5. Turn on GitHub push protection; GitHub secret scanning detects Cohere API keys before they are pushed.

## Environment variables

- `CO_API_KEY`

## Gotchas

- 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.

## Using this key with AI agents (BotPassword)

- `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.

## FAQ

### 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.

## Sources

- https://docs.cohere.com/docs/rate-limits
- https://docs.cohere.com/docs/the-cohere-platform
- https://docs.cohere.com/reference/teams-and-roles
- https://docs.cohere.com/v1/reference/errors
- https://docs.cohere.com/v1/reference/check-api-key
- https://docs.cohere.com/docs/create-client
- https://github.com/cohere-ai/cohere-python
- https://docs.github.com/en/code-security/secret-scanning/introduction/supported-secret-scanning-patterns
