# OpenRouter (/docs/providers/openrouter)

The OpenRouter account answers through a key OpenRouter issues on the visitor's credits. The wallet lists it as OpenRouter under "With your plan", with the id `openrouter`.

## What the visitor needs [#what-the-visitor-needs]

An OpenRouter account with credits. OpenRouter binds the key it issues to the account's credits, and every answer is billed to them.

## Sign in [#sign-in]

1. In the wallet, the visitor picks OpenRouter under "With your plan".
2. Chrome's sign in window opens `https://openrouter.ai/auth` with a PKCE challenge, the wallet's callback address and the key label "AI Wallet".
3. The visitor signs in to OpenRouter and approves.
4. OpenRouter sends the window back to the wallet's callback address, `https://<extension id>.chromiumapp.org/callback`. Chrome closes the window and hands the address to the wallet.
5. The wallet trades the code and its PKCE verifier for a key at `https://openrouter.ai/api/v1/auth/keys`, and the account is connected.

Closing the window ends the sign in with "The sign in window was closed". The key stays in the vault until the visitor removes the account.

## Models [#models]

The wallet lists OpenRouter's whole catalog from `https://openrouter.ai/api/v1/models`, a public list asked without the key. OpenRouter's Auto Router, `openrouter/auto`, comes first, and the other models follow from newest to oldest. The wallet keeps the list for a day.

The catalog is too long to pick from on every site, so the visitor picks the model in the account's settings, under "Default model". The side panel shows no model buttons for sites on OpenRouter, and every site answers with that model. Without a choice, the account answers with `openrouter/auto`, the Auto Router, which picks the model for each prompt.

## Usage and limits [#usage-and-limits]

The wallet reads no usage header specific to OpenRouter. It reads `x-ratelimit-remaining-tokens` and `x-ratelimit-limit-tokens` on any answer that carries them, as it does for every account. Without them, the card keeps saying "Usage shows after the first answer", and Auto ranks the account among the accounts with no reading.

## Calls [#calls]

Answers come from `https://openrouter.ai/api/v1/chat/completions` in the OpenAI chat completions protocol, with the key and the header `X-Title: AI Wallet`. All four request options reach OpenRouter.
