# Bring Your Own Key

Canonical page: `https://nanthai.tech/features/byok`

Tier: Free

Connect your OpenRouter account and pay only for what you use — no markup.

Edge uses a bring-your-own-key model. You connect your OpenRouter account and every token is billed at OpenRouter's listed rate. You can even add your own provider keys for direct rate control.

## How it works

1. **Create an OpenRouter account** — Head to openrouter.ai and sign up. Add credits to your account — you can start with as little as $5.
2. **Connect to Edge** — In Edge, go to Settings and tap "Connect OpenRouter". A secure OAuth flow links your account — no API key copy-pasting required.
3. **Start chatting — pay only for tokens** — Every message is billed at OpenRouter's listed rate for the model you choose. NanthAI adds zero markup. You see the exact cost per message.
4. **Optionally add provider keys** — For even more control, add your own AWS Bedrock, Google AI, or Azure OpenAI keys to OpenRouter. When you use a model hosted by that provider, your key is used and you pay your negotiated rate.

## What you can do

- **Zero markup** — NanthAI doesn't add any fee on top of OpenRouter's model pricing. Every token costs exactly what OpenRouter lists — nothing more.
- **Secure OAuth connection** — Connect via a standard OAuth flow using PKCE. Your credentials never touch NanthAI's servers. Revoke access at any time from OpenRouter.
- **Bring your own provider keys** — Add your AWS Bedrock, Google AI, or Azure OpenAI keys on OpenRouter. When Edge uses a model from that provider, your key is honoured and billed at your direct rate.
- **150+ models, one account** — Your OpenRouter account gives you access to ChatGPT, Claude, Gemini, Llama, Mistral, and hundreds more — all through a single connection.
- **Real-time cost visibility** — See your OpenRouter credit balance directly in Edge. Get low-balance alerts before you run out so you're never interrupted mid-conversation.
- **Full control over spending** — Set spending limits on OpenRouter. Choose cheaper models for casual chats and premium models for important tasks. You're always in control.
- **OpenRouter dashboard** — View detailed token-level usage, cost breakdowns by model, and billing history directly on openrouter.ai. Complete transparency.
- **Disconnect any time** — Disconnect your OpenRouter account from Edge whenever you want. Your conversations stay intact — only the API connection is removed.

## How provider keys work

OpenRouter supports a Bring Your Own Key model. When you add a provider API key (AWS Bedrock, Google AI, Azure OpenAI) to your OpenRouter account, any request to a model hosted by that provider uses your key instead of OpenRouter's default routing. This means:

- You pay your negotiated rate with the cloud provider — often lower than list price for enterprise accounts.
- Traffic routes through your cloud account, which may be required for data residency or compliance.
- You keep the same seamless Edge experience — no configuration changes needed in the app.

More information: https://openrouter.ai/docs/guides/overview/auth/byok

## Perfect for

- Developers who already have an OpenRouter account and want to use it with a polished AI chat interface.
- Cost-conscious users who want transparent, per-token pricing with no hidden fees or subscriptions.
- Enterprise teams who need to route AI traffic through their own AWS Bedrock or Azure accounts for compliance.
- Power users who switch between models frequently and want a single billing dashboard for all of them.

## Related features

- Pro vs Free (`/features/pro-vs-free`)
- Participant Options (`/features/participant-options`)
- Chat Defaults & Favorites (`/features/chat-defaults`)
