Integrations

Using Atlas with OpenRouter in 2026

Updated 6 min read

Atlas connects to OpenRouter in two ways. OpenRouter gives Atlas one key for hundreds of models plus a hosted MCP server, so you can route the plan step and the edit step to different models without installing anything locally. Add the MCP server with atlas mcp add openrouter --url https://mcp.openrouter.ai/mcp then atlas mcp auth openrouter. For inference, point Atlas's provider at baseURL https://openrouter.ai/api/v1 with OPENROUTER_API_KEY. Cap spend in OpenRouter's own per-key limits rather than trying to enforce it from atlas.json.

What the Atlas and OpenRouter integration does

OpenRouter gives Atlas one key for hundreds of models plus a hosted MCP server, so you can route the plan step and the edit step to different models without installing anything locally. In 2026 OpenRouter is a model gateway, which means one credential replaces a drawer full of provider keys.

Two distinct capabilities ship under the same account. OpenRouter is a gateway for inference, which is what one key for hundreds of models means in practice. OpenRouter also runs a hosted MCP server, which gives Atlas tools rather than tokens. You can adopt either half on its own. Adopting both means a single OpenRouter account backs both the models Atlas thinks with and one of the servers it calls, and there is nothing to install on your machine for either.

Adding OpenRouter's hosted MCP server to Atlas

Add OpenRouter's hosted MCP server with atlas mcp add openrouter --url https://mcp.openrouter.ai/mcp then run atlas mcp auth openrouter. Those 2 commands complete the setup, because the server is hosted at mcp.openrouter.ai and the authentication happens through an OAuth consent screen in the browser.

atlas mcp add openrouter registers the endpoint, and atlas mcp auth openrouter starts the OAuth flow. Nothing installs on your machine for either step, which is exactly the property that makes OpenRouter a clean fit when Atlas runs inside a container: no npx, no Docker image, no Node runtime requirement, no local process to keep alive. The consent screen is also where the key's limits are decided, which the next section covers.

Configuring OpenRouter as an inference provider in Atlas

For inference, point Atlas's provider at baseURL https://openrouter.ai/api/v1 with OPENROUTER_API_KEY. OPENROUTER_BASE_URL overrides the default if you need to send traffic somewhere else, but the standard configuration is those two values and nothing more.

This is the inference half of the integration, and it is separate from the MCP server at https://mcp.openrouter.ai/mcp. The API endpoint is OpenAI-compatible, so Atlas needs no adapter: set baseURL to https://openrouter.ai/api/v1, supply OPENROUTER_API_KEY, and Atlas can request any model OpenRouter routes to. OPENROUTER_BASE_URL exists as an override for the unusual case where the default endpoint is not the one you want.

Routing the plan step and the edit step to different models

One OpenRouter key gets Atlas hundreds of models in 2026, so route the plan step to a reasoning model and the edit step to a cheaper one. Planning is where model quality shows up most, and mechanical edits are where paying for a frontier model buys you the least in return.

The cost profile of an agent loop is lopsided. A plan is written once and shapes everything after it, so a weak plan wastes every edit that follows. The edits themselves are numerous, repetitive, and heavily constrained by the plan that produced them. Routing accordingly is what a gateway is for: with one OpenRouter key, switching the model for a given step is a configuration change rather than a new account, a new credential, and a new base URL.

Capping spend, and running OpenRouter from inside a container

Cap spend in OpenRouter's own per-key limits, the same place the 10 dollar default cap lives, rather than trying to enforce it from atlas.json. Nothing installs locally, which also makes OpenRouter a clean fit when Atlas runs inside a container with no Node runtime or Docker daemon.

Spend control belongs at the gateway because the gateway is the thing that meters the money. A limit expressed in a client config is advisory at best, while a per-key cap in OpenRouter is enforced at the point of billing and survives any misconfiguration on the Atlas side. The container property follows the same logic: with the hosted MCP server at https://mcp.openrouter.ai/mcp and a hosted API at https://openrouter.ai/api/v1, an Atlas container needs only outbound HTTPS and a key.

Setup

  1. 01Add OpenRouter's hosted MCP server with atlas mcp add openrouter --url https://mcp.openrouter.ai/mcp then atlas mcp auth openrouter
  2. 02Read the OAuth consent screen: it issues a key with a 7-day expiry and a 10 dollar spend cap by default, and both are editable at approval time.
  3. 03For inference, point Atlas's provider at baseURL https://openrouter.ai/api/v1 with OPENROUTER_API_KEY; OPENROUTER_BASE_URL overrides the default.
  4. 04Route the plan step to a reasoning model and the edit step to a cheaper one, since one key gets Atlas hundreds of models.
  5. 05Cap spend in OpenRouter's own per-key limits rather than trying to enforce it from atlas.json.
  6. 06Prefer OpenRouter when Atlas runs inside a container, since nothing installs locally.

Frequently asked questions

how do I connect Atlas to OpenRouter
Add OpenRouter's hosted MCP server with atlas mcp add openrouter --url https://mcp.openrouter.ai/mcp then atlas mcp auth openrouter. For inference, point Atlas's provider at baseURL https://openrouter.ai/api/v1 with OPENROUTER_API_KEY.
why did my OpenRouter key stop working after a week
The OAuth consent screen issues a key with a 7-day expiry by default. Both the expiry and the 10 dollar spend cap are editable at approval time, so set them deliberately.
how do I limit how much an AI coding agent spends
Cap spend in OpenRouter's own per-key limits rather than trying to enforce it from atlas.json. The gateway meters the billing, so the cap is enforced where the money is actually spent.
can I use different models for planning and editing
Yes. One key gets Atlas hundreds of models, so route the plan step to a reasoning model and the edit step to a cheaper one. Switching models becomes a configuration change.
what is the OpenRouter base URL for Atlas
https://openrouter.ai/api/v1, set as the provider baseURL with OPENROUTER_API_KEY. OPENROUTER_BASE_URL overrides the default when you need a different endpoint.
is there an OpenRouter MCP server
Yes, a hosted one at https://mcp.openrouter.ai/mcp. Add it with atlas mcp add openrouter and authenticate with atlas mcp auth openrouter. Nothing installs locally.
best model gateway for an AI agent running in a container
OpenRouter fits well, because nothing installs locally. The MCP server and the inference API are both hosted, so an Atlas container needs only outbound HTTPS and a key.

Try SeaShell in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install SeaShell

Related guides

Atlas with GPT-5.3 Codex Spark: Your Fast Coding Agent in 2026

Drive Atlas with GPT-5.3 Codex Spark, a fast, low-latency model from OpenAI. Ideal for focused coding tasks with a 128K context window and 32K output, available in 2026.

Atlas with NVIDIA Nemotron Nano 9B v2 in 2026

Atlas with NVIDIA Nemotron Nano 9B v2 in 2026: a cost-effective choice for subagent scaffolding, summaries, and titles. Get 131,072 tokens on Vercel AI Gateway for $0.06/$0.23 per Mtok.

Atlas with Qwen3-Coder 480B (Ollama) in 2026

Drive Atlas with Qwen3-Coder 480B (Ollama) in 2026 for a powerful, self-hosted AI coding agent. Leverage its 256K token context window and 290GB weights for zero data egress.

Atlas for Perl: A Terminal-Native AI Coding Agent for CPAN Distributions in 2026

Atlas is a terminal-native AI coding agent for Perl in 2026. It reads cpanfile deps and @EXPORT lists, writes Test2::V0 cases, runs prove -lr t/, and runs perltidy on the diff.

Atlas with Command A Reasoning in 2026

Explore Atlas with Command A Reasoning, Cohere's 256K context model for on-prem deployments. Ideal for secure, high-context coding tasks in 2026.

Atlas with GPT-5 Pro (2026)

Atlas with GPT-5 Pro in 2026 offers unparalleled 272K token output and a 400K context window for complex code generation. Understand its $15/$120 pricing and strategic use.

Atlas with GLM-4.5-Air in 2026

Explore GLM-4.5-Air's cost-effective performance with Atlas in 2026. This 12B active parameter model offers a 128K token context window for $0.20/Mtok input.

Atlas with Qwen Turbo in 2026

Discover how Atlas leverages Qwen Turbo from Alibaba in 2026. Get 1M token context for $0.05 input, $0.20 output, ideal for subagent tasks and cost-effective coding.

Browse this resource hub