# Connect OpenRouter

Sign in once in your browser and the card shows your balance, daily spending and forecast.

**Shows:** your US$ balance (or key limit/usage), daily spend and exhaustion forecast.

## Step by step

1. Open **Settings › Connections › + Add** (or click **Connect…** from the card menu `⋯` or tray menu).
2. Sign in to OpenRouter in your browser and authorize.
3. Return to QuotaDesk.

## Where the data comes from

OpenRouter's official MCP (`mcp.openrouter.ai/mcp`). The OAuth token is stored in `%LOCALAPPDATA%\com.quotadesk.opensource.dev\quotadesk.sqlite3`, protected with **Windows DPAPI** so only your Windows user on this machine can read it.

## Switch accounts

Card menu (`⋯`) › **Switch account…** or **Settings › Connections › Manage**. It clears the current session and opens browser OAuth.

## Troubleshooting

| Message | What to do |
|---|---|
| *Connect or re-authorize OpenRouter…* | Login expired or revoked. Connect again. |
| *Could not read the OpenRouter balance* | Network or service error. QuotaDesk retries automatically and keeps the last reading. |

## The login lasts 7 days

OpenRouter does not renew OAuth grants automatically: after one week, the card prompts you to reconnect (*Authorization expired*). Choose **Connect OpenRouter** again. The token created has a US$ 0 spend limit on purpose: it can only inspect balance, never spend.

## Organization accounts and personal keys

If a key belongs to an organization workspace where you are not an admin, OpenRouter may deny the organization-wide `get-credits` tool. In that case, QuotaDesk automatically falls back to `get-current-key` on the official MCP to read your key's limit, remaining balance and spend. If neither returns accessible balance data, connect your personal (`Default`) workspace or request organization admin access.

## Disconnect

Open **Settings › Connections › Manage** and click **Remove** on the OpenRouter connection. To revoke access remotely as well, remove the authorization in your OpenRouter settings.
