All use cases
OAuth
For app buildersLet users sign in with their AnyRouter account
Your app gets a temporary inference-only key. Their balance pays. You never store a raw provider secret.
01
The problem
What this is for
Shipping your own LLM keys means you eat every user's bill. Asking them to paste an OpenAI key is a bad secret-handling story.
02
What to do
Three steps, then copy
- 1.Register your app and implement the OAuth 2.1 + PKCE consent flow.
- 2.Exchange the code for a short-lived sk-ar-v1 key scoped to that user.
- 3.Call models on their behalf — start with anyrouter/free or anyrouter/auto.
Consent endpoint
text
https://anyrouter.dev/oauth/consentReady to try it
The guide has the full walkthrough. Sign up if you still need a key.
Related
Next playbooks
One AI SDK provider for the whole catalog
Install @anyr/ai-sdk-provider. generateText and streamText take a catalog id — including anyrouter/free.
OpenOne API in front of every provider dialect
OpenAI /chat/completions, Anthropic /messages, and a Responses API — same key, same catalog.
OpenAUTO
Start on anyrouter/free or anyrouter/auto
Two built-in virtual models: Go+ free failover (anyrouter/free) and stable paid failover (anyrouter/auto). Do not pick a flaky SKU for your first request.
Open