OpenRouter
How an agent gets a OpenRouter key through KeyKeeper, what to choose on openrouter.ai, and how KeyKeeper verifies it.
| Template id | openrouter (also open-router) |
|---|---|
| Field | openrouter-api-key → OPENROUTER_API_KEY · secret |
| Key looks like | shown once when created |
| Created at | openrouter.ai |
| Verified by KeyKeeper | GET https://openrouter.ai/api/v1/key — reads this key's limits and usage |
| Template checked | 2026-09-15 |
What the agent does
keykeeper providers show openrouter
keykeeper save --provider openrouter --from-clipboard --create --purpose "what this task does"
keykeeper run -c openrouter -- <your command>--provider openrouter fills in the credential id and the field. The environment
variable is the one OpenRouter's own tools read, so nothing has to be mapped.
What only you can do
What to choose
Create a separate key for this project with the lowest practical credit limit and an expiration.
The agent is told the same thing. It opens the page for you and says what to pick; it never logs in, passes 2FA or pays on your behalf.
What KeyKeeper checks
- Before writing: the value must look like a OpenRouter key (shown once when created). A wrong paste is refused before anything is stored, and the agent is told why — without the value.
- After saving: KeyKeeper itself sends
GET https://openrouter.ai/api/v1/keywith the key in theAuthorizationheader (reads this key's limits and usage). The agent receives accepted, rejected or could not reach — never the value.
Endpoints
The key is a bearer token for these endpoints. keykeeper run sets only the variables above;
point your client at the base URL yourself.
- OpenAI —
https://openrouter.ai/api/v1
Rotation and expiry
No universal expiry policy was confirmed for this credential type. Record the date shown by the provider, or leave it unknown. Rotate or revoke at openrouter.ai.