Skip to content

AI Providers & Models3 min read

OpenRouter

One key, hundreds of models

OpenRouter is an aggregator: one account, one API key, and a catalog of hundreds of models from many labs — Anthropic, OpenAI, Google, Mistral, Meta, and more — all behind a single endpoint. For Nexgile Code users it is the fastest way to experiment across vendors without juggling half a dozen provider accounts.

  1. Sign up at openrouter.ai (Google or GitHub sign-in works).
  2. Create a key on the keys page (openrouter.ai/keys).
  3. Add credits — OpenRouter is prepaid; model usage draws down your balance at each model’s listed rate.
  1. Open Settings → Providers and choose OpenRouter.
  2. Paste the key into OpenRouter API Key. Once a valid key is set, your remaining credit balance is displayed right next to the field — handy for keeping an eye on spend without leaving the editor.
  3. Pick a model and save.

Optional: Use custom base URL replaces the default https://openrouter.ai/api/v1 if you route through a proxy.

Unlike fixed-roster providers, the OpenRouter model list is fetched live from the service, so new models appear in the picker as soon as OpenRouter lists them — no product update needed. The model picker is searchable; type a fragment like sonnet, gpt, or gemini to filter. Model ids use the vendor/model convention:

anthropic/claude-sonnet-4.5 (the default)
openai/gpt-4o
google/gemini-2.5-pro

Browse the full catalog with pricing and context sizes at openrouter.ai/models.

  • Prompt caching works through OpenRouter for the model families that support it — notably the Anthropic Claude line (3.x through Opus 4.6 / Sonnet 4.6 / Haiku 4.5) and several Google Gemini Flash/Pro models. Cache reads bill at the reduced rate the underlying lab charges.
  • Thinking controls carry through for hybrid reasoning models: Claude 4.x-family and Gemini 2.5-family entries expose the reasoning budget controls, and :thinking variants always reason. See Model Behavior & Costs.
  • Image input follows the underlying model’s capability, as reported by the catalog.
  • Trying many models. Comparing how three different models handle your codebase is three profile switches, not three vendor signups.
  • Access without accounts. Some models are otherwise gated behind separate platforms; OpenRouter puts them behind the key you already have.
  • Fallbacks. Keep an OpenRouter profile as a standby: if your primary provider has an outage or you hit a rate limit mid-task, switch the active configuration profile and continue the same conversation.
  • Long-tail and open-weight models. The catalog reaches far beyond the majors.
Provider: OpenRouter
API Key: sk-or-v1-… (balance appears next to the field)
Model: anthropic/claude-sonnet-4.5
Rate limit: 0s (raise per profile if you hit provider quotas)

Save variants of this profile per model you use regularly — or-sonnet, or-gemini-pro, or-cheap-flash — and pin them to modes as needed; switching profiles mid-task keeps the conversation intact.

  • 401 errors: the key is wrong or was revoked — paste a fresh key from the OpenRouter dashboard.
  • Requests suddenly failing mid-task: usually an exhausted prepaid balance; the balance readout next to the API key field confirms it. Top up and tell the agent to continue.
  • A model is missing from the picker: the catalog is live — refresh the settings view; if it’s still absent, OpenRouter no longer lists it (or your account can’t access it).
  • Model behaves differently than via the vendor directly: OpenRouter may route a model id to different backing hosts; check the model’s page on the OpenRouter site for routing details.