OpenRouter
Use models from OpenAI, Anthropic, Google, Meta and more in your site through one OpenRouter account, with one bill for all of them. It's the quickest way to add AI to your site when you don't have a key from a model provider yet.
Connect
You can sign in to OpenRouter or paste a key.
Sign in
- Open Settings > Connectors, click OpenRouter, then Connect.
- OpenRouter opens. Sign in, or create an account, and approve access.
OpenRouter makes a key for you, so there's nothing to copy. The OpenAI, Anthropic, Gemini and Groq connectors offer the same sign-in as Sign in with OpenRouter.
Paste a key
- Click Paste a key.
- On openrouter.ai/settings/keys, click Create API Key and copy it.
- Come back to WebTwizz. The key is picked up, checked with OpenRouter and connected.
If OpenRouter rejects the key, you'll see That key was not accepted. A key on OpenRouter's free tier shows Free tier on the account.
What you see
- Overview:
- The key works with a Working label, and Free tier for a key on OpenRouter's free tier. It's checked when you open it, and Check again checks it now. Usage opens your activity on OpenRouter. If OpenRouter turns the key down, it reads Not accepted: replace the key or check billing.
- Test message: Send sends one short message to your model and shows how long the reply took. It uses a few tokens, so it only runs when you press it. If it fails, it says why, like no credit left, a rate limit or a model the key can't use.
- Spend: what the key spent Today, This week and This month, and Limit left when the key has a spending limit.
- Model: the model you picked, by its name on OpenRouter, with its Input limit, Reply limit and Price per million tokens when OpenRouter lists them, or Free. If your key can't reach it, it says so: pick another under Settings.
- Live site errors: when your published site logs errors that mention OpenRouter, the latest ones, each with the page and when. Ask the AI to fix starts a new chat that asks the AI to find the cause and fix it. Show more loads older ones.
- Account: the key, with Replace key.
- Settings: Model, used whenever your app doesn't ask for a specific one. Let OpenRouter pick is recommended: OpenRouter chooses a model for each request. Or pick any model it offers, newest first, each with its price per 1M tokens, or Free, and its context size. The list is long, so type to find one.
What the AI can do
The AI checks that your key works and which models it reaches, then uses those exact model names in your code.
Secrets
OPENROUTER_API_KEY: your OpenRouter key, server-side onlyOPENROUTER_MODEL: the default model,openrouter/autounless you pick another
Good to know
- Replacing the key under Account switches every project that uses it.
- Removing OpenRouter from a project takes both secrets out. Your OpenRouter account and credits are untouched.