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 Atlas in your terminal

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

Install Atlas

Related guides

Atlas with GPT-5.3 Codex Spark: Fast Interactive Edits in 2026

GPT-5.3 Codex Spark is the low latency Codex model: 128K context, 32K max output, $1.75 per Mtok input, $14 per Mtok output. Atlas setup and honest tradeoffs.

Atlas with NVIDIA Nemotron Nano 9B v2 in 2026

Nemotron Nano 9B v2 in Atlas, 2026: a dense 9B reasoning model at $0.06/$0.23 per Mtok on Vercel AI Gateway and Amazon Bedrock, free on the NVIDIA NIM tier.

Atlas with Qwen3-Coder 480B (Ollama): the self-hosted ceiling in 2026

Qwen3-Coder 480B (Ollama) in Atlas: 290GB of weights, roughly 292GB to serve, 256K tokens (262,144) of context. Free (self-hosted), but the hardware is not.

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: Reasoning You Can Deploy On-Prem (2026)

Command A Reasoning gives Atlas a 256K window at $2.50 / $10 per Mtok, and Cohere lets you run it on-prem or in a VPC. Reasoning with no price premium.

Atlas with GPT-5 Pro: The 272,000 Token Output Ceiling in 2026

GPT-5 Pro in Atlas: the only OpenAI model with a 272,000 token max output, priced at $15 per Mtok input, $120 per Mtok output on a 400K tokens window.

Atlas with GLM-4.5-Air: The 106B Self-Hostable Cheap Slot in 2026

GLM-4.5-Air drives Atlas at $0.20 per Mtok input and $1.10 per Mtok output on a 128K tokens (131,072) window. A 106B total / 12B active MIT-licensed MoE.

Atlas with Qwen Turbo: The $0.05 per Mtok Small Model Slot in 2026

Run Atlas on Qwen Turbo in 2026. Alibaba's cheapest reasoning tier gives 1M tokens (1,000,000) of context at $0.05 per Mtok input, $0.20 per Mtok output.

Browse this resource hub