OpenRouter

How an agent gets a OpenRouter key through KeyKeeper, what to choose on openrouter.ai, and how KeyKeeper verifies it.

Template idopenrouter (also open-router)
Fieldopenrouter-api-key → OPENROUTER_API_KEY · secret
Key looks likeshown once when created
Created atopenrouter.ai
Verified by KeyKeeperGET https://openrouter.ai/api/v1/key — reads this key's limits and usage
Template checked2026-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

Sign in to OpenRouter
Choose the workspace
Set a credit limit and optional expiration
Copy the key, then approve the save in KeyKeeper's window.

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/key with the key in the Authorization header (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.