OpenRouter Beta
4 min read
OpenRouter is a gateway: with a single key and a single balance, your agents can use models from many providers. Each connection carries the model it uses, so to use two different models you create two connections.
Works best with Claude
OpenRouter only guarantees that agents work with Claude models. Other models may handle a conversation well and fail when using tools or launching subagents. Start with a Claude model and try the others on an agent that is not in production.
Before you connect it
Add credit
OpenRouter charges per use from a prepaid balance. Top it up in Settings > Credits.
Create a key
In Settings > Keys, create a key for Kujira. It is only shown once.
Limit what that key can do
In Settings > Privacy > Guardrails you can give the key a spending limit and a list of allowed models or providers. It is how you cap what your agents spend and, if you use the automatic router, decide which models it chooses from.
Which model the connection carries
| Option | What to enter | When to choose it |
|---|---|---|
| A specific model | The OpenRouter identifier, for example anthropic/claude-sonnet-5. | The recommended option: you know which model answers and what it costs. |
| The automatic router | openrouter/auto, or any other OpenRouter router (openrouter/auto-beta, openrouter/free…) | OpenRouter picks the model for each request based on the task. By default it favours cheaper models. |
| A preset | @preset/ followed by its name | You reuse a configuration saved in OpenRouter: fallback models, providers, or parameters. |
If you use the automatic router
Limit the key's allowed models to Anthropic's in its guardrails. That way the router only chooses among Claude models, which are the ones that work reliably with agents.
Create the connection
In Settings > Models > OpenRouter, click Add connection.
Name the connection
The name is required and is what you will see when choosing it on an agent. If you will have several, say which model each one carries: “OpenRouter · Sonnet”, “OpenRouter automatic”.
Paste the key
The service endpoint comes filled in. Change it only if you route through your own proxy.
Pick the model
Type to search the ones OpenRouter serves and pick it from the list. Below it you will see how much context it holds: we read that figure from OpenRouter's catalogue, so you don't need to know it.
You can also type openrouter/auto or a preset, as in the table above. Kujira will then ask you for the context window — optional — because it cannot know it: each answer may come from a different model, and the limit is set when the agent starts. Without it, the agent summarizes the conversation at 200,000 tokens. If you limited your key to bigger models, enter the window of the smallest one you allow.
Assign the connection to the agent
In the agent's Configuration > Model, choose that connection in the Connection dropdown. Since the connection carries its own model, that is the one it runs. If the agent is running, it restarts on its own when you save.
What the agent knows about its model
The agent knows it runs through OpenRouter and on which model. If you ask it, it tells you the connection and, with the router, which model answered its last message: it does not introduce itself as Claude when it is not.
The connection sets the model, so the agent cannot change it from the conversation. If you want another one, change the connection's model or give the agent a different connection.
Cost
OpenRouter charges your balance the rate of the model that answers, and Kujira works out each agent's spend with that same rate — the one OpenRouter publishes for each of its models. It works for any of them: Claude, DeepSeek, Llama or whichever you pick. The figure you see in the panel is what you will be charged, give or take rounding.
The automatic router works the same way: each answer may come from a different model, and each one is counted at the rate of whichever answered.
Kujira re-reads OpenRouter's rates several times a day, so a price change is picked up on its own. The official figure is always in your OpenRouter dashboard.
Common errors
The first message fails
Check the model identifier: it must match OpenRouter's exactly, including the provider prefix (anthropic/).
OpenRouter has no way to serve that model
The model does not exist, or the key's guardrails allow no provider that serves it. Check the identifier and the list of allowed models and providers.
The agent stops answering
Check the balance and the key's spending limit. When they run out, OpenRouter rejects requests until you top up or raise the limit.
It fails when using tools
With a model that is not Claude, try a Claude model before checking anything else. If you use the router, limit the allowed models to Anthropic's.
See Models for how each agent's connections and models are chosen.