Skip to content

OpenRouter with Empryo

OpenRouter is built into Empryo. One OpenRouter key gives you models from many labs behind a single OpenAI-compatible API. Save the key once and switch between Claude, GPT, Gemini, Grok and open-weight models inside Empryo without separate accounts.

How you connect
API key
How you pay
One balance for models from many labs

What you get

Example models

  • anthropic/claude-opus-4.5
  • anthropic/claude-sonnet-4.5
  • anthropic/claude-haiku-4.5
  • openai/gpt-5.1
  • openai/gpt-5.1-mini
  • openai/o4-mini
  • google/gemini-2.5-pro
  • google/gemini-2.5-flash
  • x-ai/grok-4
  • deepseek/deepseek-v3.2
  • deepseek/deepseek-r1
  • qwen/qwen3-coder
  • moonshotai/kimi-k2
  • z-ai/glm-4.6
  • meta-llama/llama-4-maverick

When to use it

Pick OpenRouter when you want many models from one key. It offers models from Anthropic, OpenAI, Google, xAI, DeepSeek, Qwen, Moonshot, Z.ai, Meta and others, with one bill, and lets you try different models on the same task without new accounts. That fits Empryo's task router well: a strong model for code edits and a cheap one for research and compaction, all paid from one balance. It is also an easy way to reach open-weight models you may not have accounts for. The trade-offs: OpenRouter's pricing may differ from going direct to a lab, a third party sits between you and the model, and latency depends on which upstream provider serves the request. If you only use one lab's models, a direct key (Anthropic, OpenAI, Google) is simpler.

Set it up

OpenRouter is built into Empryo, so you don't need to write a custom provider block.

1. Get a keyLink to this section

Create an API key at openrouter.ai/keys. OpenRouter keys are prefixed sk-or-.

2. Save itLink to this section

bash
empryo --set-key openrouter sk-or-...

The key is stored in your OS keychain (Login Keychain on macOS, libsecret on Linux, DPAPI on Windows), with a file fallback. See configuration for backends and lookup order.

3. Pick a modelLink to this section

Launch Empryo, press Ctrl+L, and choose any OpenRouter model. Or set it as your default in ~/.empryo/config.json:

json
{
  "defaultModel": "openrouter/anthropic/claude-sonnet-4.5"
}

Empryo's OpenRouter model strings are openrouter/<vendor>/<model>, e.g. openrouter/openai/gpt-5.1, openrouter/google/gemini-2.5-pro, openrouter/x-ai/grok-4.

4. (Optional) Route different jobs to different modelsLink to this section

The single OpenRouter key powers every slot in Empryo's task router, so you can run a cheap model for research and a strong one for code edits, no extra keys:

json
{
  "taskRouter": {
    "ember":   "openrouter/anthropic/claude-sonnet-4.5",
    "spark":   "openrouter/deepseek/deepseek-v3.2",
    "compact": "openrouter/google/gemini-2.5-flash"
  }
}

Per-launch keyLink to this section

For one-off sessions or CI you can pass the key via env var instead of storing it:

bash
OPENROUTER_API_KEY=sk-or-... empryo

Inspect what's configured with empryo --list-providers and empryo --list-models openrouter.

Keys or subscriptions

OpenRouter connects the way marked below. You can mix ways across task-router slots.

  • API keyOpenRouterPaste a key once. Empryo keeps it in your system keychain, and you pay the provider for what you use.
  • Sign inApprove Empryo in your browser and use a plan or credits you already have. There is no key to copy.
  • On your machineRun open models on your own computer. No key, no per-token bill, and nothing has to leave your machine.
  • Any compatible APIOne block of JSON config turns any OpenAI-compatible endpoint into a provider, including your own server.