All use cases
For app builders
Let 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.
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.
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.
Next playbooks
- One AI SDK provider for the whole catalogInstall @anyr/ai-sdk-provider. generateText and streamText take a catalog id — including anyrouter/free.
- One API in front of every provider dialectOpenAI /chat/completions, Anthropic /messages, and a Responses API — same key, same catalog.
- Start on anyrouter/free or anyrouter/autoTwo built-in virtual models: free failover on every plan (anyrouter/free) and stable paid failover (anyrouter/auto). Do not pick a flaky SKU for your first request.