OpenRouter()

Every model OpenRouter fronts, with your own key. Costs go direct to OpenRouter at their rates — no markup, nothing on your Axon balance.

export default defineProfile({
    providers: [OpenRouter()],
})

One key reaches hundreds of models across every major vendor, which makes this the widest single provider you can declare. The tradeoff against a direct vendor route is an extra hop and OpenRouter's own routing decisions between you and the model.

TUI model palette showing OpenRouter models

Credentials

Vaulted. Connect once from the terminal and it works on every machine you sign in from — including deployed agents, which use the same connection.

:provider openrouter connect      # paste your key from openrouter.ai/keys
:provider openrouter disconnect

The key is stored in your account vault and minted per request, so rotation never rebuilds a driver. An OPENROUTER_API_KEY in the agent's environment takes precedence when set.

Options

OpenRouter(options?: ProviderOptions)
OptionDefaultDescription
keyvault, then OPENROUTER_API_KEYYour own key, passed directly
urlOpenRouter's APIEndpoint override
slotsunboundedCeiling on concurrent calls

Model ids

OpenRouter's own vendor/slug form, which is also Axon's canonical id:

export default defineAgent({ model: "openrouter:anthropic/claude-sonnet-4.6" })

Suffixed variants (:batch, :free, :nitro) are OpenRouter purchasing options rather than models, and are reachable here but on no direct vendor route.