OpenRouter
Run Everruns agents across OpenRouter's multi-vendor model catalog with one key, plus provider routing, fallbacks, and capacity controls.
Everruns runs agents on OpenRouter’s model catalog through its OpenAI-compatible Responses API. One OpenRouter key gives you access to a large multi-vendor catalog, plus routing controls that decide which upstream provider actually serves each request.
What you get
Section titled “What you get”- One key, many models: a single provider exposing OpenRouter’s full catalog.
- OAuth one-click connect: authorize in the browser instead of copy-pasting an API key. See Connecting below.
- Actual-cost reporting: OpenRouter returns the real money spent per generation, which Everruns records as authoritative cost. See Actual cost below.
- Built-in server tools: let the model use OpenRouter-executed tools such as
web_searchandweb_fetchwithout wiring up a separate integration. See Server tools below. - Provider routing: order, allow/deny lists, data-retention and zero-data-retention policies, and price/throughput sorting.
- Capacity strategy: use OpenRouter’s shared capacity, prefer your own bring-your-own-key (BYOK) providers first, or require BYOK-only routing.
- Routing presets: high-level intents such as cheapest-with-tools, lowest-latency, or reasoning-required that compile into the underlying routing flags.
- Capability profiling: OpenRouter’s richer
/modelsmetadata is parsed into capability profiles, so reasoning support surfaces correctly even for models without a built-in profile. - Session grouping & logs: Everruns forwards its session id so all generations from one session group together in OpenRouter’s dashboard, where you can inspect traces and forward them to observability tools. See Logs, traces, and observability below.
Connecting
Section titled “Connecting”Providers are configured by organization admins under Models → Providers → Connect provider → OpenRouter. Under How to connect, pick one of two ways:
OAuth (recommended)
Section titled “OAuth (recommended)”Choose Sign in with OpenRouter, click Continue to OpenRouter and
authorize in the browser. OpenRouter’s
one-click PKCE flow returns a
user-controlled API key that Everruns stores org-wide, no key copy-pasting, and
no app registration. The consent screen’s key label is preset to
Everruns <organization name>, which is also the name of the key OpenRouter
creates. An admin authorizes once; everyone in the org then uses the
models the provider serves against the single stored credential. The key is
encrypted at rest and never returned by the API.
OpenRouter’s callback URL must be HTTPS on port 443 or 3000 for non-localhost deployments.
API key
Section titled “API key”Choose Paste an API key and paste a key from the OpenRouter keys page.
To rotate the credential later, click the key button on the provider’s card. The same drawer shows the current credential and offers Sign in again with OpenRouter or Paste a different API key.
Either way, save and Everruns discovers available models and their capability profiles automatically.
Routing controls
Section titled “Routing controls”OpenRouter-specific routing (model fallbacks, provider ordering, capacity strategy, and presets) is configured per agent and applied only to OpenRouter requests, direct OpenAI or other providers ignore these extensions. BYOK-only routing requires you to list at least one upstream provider, and fails closed if none is configured.
Server tools
Section titled “Server tools”OpenRouter can run provider-executed server tools: web_search,
web_fetch, datetime, image_generation, and more, during a generation.
OpenRouter executes them server-side and folds the results into the same answer,
so your agent gets built-in web reach without a separate search
integration or an extra round-trip through Everruns.
Enable them per agent with the OpenRouter Server Tools capability. The capability is a harmless no-op on non-OpenRouter providers, so it is safe to leave on for agents that may switch providers. Because the model gains provider-executed web access, the capability is rated High risk, grant it only to agents you trust with outbound web access.
Actual cost
Section titled “Actual cost”OpenRouter’s API reports the real money spent per generation, not just an
estimate. Everruns records this as the generation’s authoritative
actual_cost_usd (sourced from OpenRouter’s usage.cost, reconciled against the
generation endpoint
when needed) alongside its own estimated cost. Budgets debit the actual cost when
present and fall back to the estimate otherwise, so spend tracking and
budgeting reflect what OpenRouter actually charged.
Low balance
Section titled “Low balance”When a request does not set a token limit, OpenRouter reserves the model’s full
output limit against your credits and rejects the call with HTTP 402 (“can only
afford N tokens”) if the balance cannot cover it. Set Max output tokens under
More on the agent (max_output_tokens in the API, --max-output-tokens in the CLI) to
a value below that number so each call fits. Everruns sends it as max_tokens
and never asks for more than the model’s own output limit.
Logs, traces, and observability
Section titled “Logs, traces, and observability”Everruns forwards its session id to OpenRouter, so every generation from one Everruns session groups together in OpenRouter’s dashboard. OpenRouter’s own activity logs show each request’s trace, often enough to debug a run without leaving OpenRouter. When you need richer tracing, OpenRouter can forward your generations to external observability tools such as Braintrust or LangSmith; configure that on the OpenRouter side. This complements Everruns’ own Framework context inspection rather than replacing it.