In short.
This OpenRouter guide is for developers who want to use OpenRouter from the Codex desktop app, but they must configure the provider and make an API key available outside their terminal. Its most useful details concern user-level configuration, desktop environment variables and background processes that retain old settings. It also describes model switching, provider failover and usage controls, without demonstrating their behavior or establishing prices, supported app versions or compatibility for individual models. No commands, application sessions or API requests were executed.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete captured page at [https://openrouter.ai/docs/cookbook/coding-agents/codex-desktop.md], including its setup instructions, configuration table, authentication notes, stated benefits, privacy notice and background-process warnings. Linked pages, policies, downloads and model catalogs are excluded. No commands, application sessions, API requests, coding tasks or failover scenarios were executed; operational compatibility, performance and costs remain unverified.
The overview
Identity
Codex Desktop App is an OpenRouter documentation page explaining how to route desktop Codex requests through OpenRouter. The original source is [https://openrouter.ai/docs/cookbook/coding-agents/codex-desktop.md]. The resource is a setup guide, rather than an application, model or installable integration package.
The page describes Codex as shipping inside the ChatGPT desktop app for macOS and Windows. That product relationship and platform availability are statements from this page; they are not independently corroborated by the supplied evidence.
Assessment
The guide provides a concrete configuration example and explains two practical failure points: provider settings must be placed in the user-level configuration, and desktop processes need their own access to the API-key environment variable. It also explains why reopening a window may leave old settings active.
It is useful for understanding the configuration steps and diagnosing authentication problems. It does not establish that the instructions work with a particular app release, that every listed model setting is supported, or that provider failover succeeds during an actual coding task.
Users
The intended readers are developers using desktop Codex who want access to OpenRouter models, centralized spending controls or request-level usage visibility. Beginners receive a numbered setup path, but still need to edit a TOML configuration file and manage operating-system environment variables.
Experienced users will find details about the Responses API transport, model aliases, shared configuration and model-catalog warnings. The guide offers little help with choosing a model for a particular programming language, repository or coding task.
Capabilities
The documented integration lets users select OpenRouter as the model provider and change models through the configuration file. The page gives exact model identifiers and tilde aliases as examples, and describes adjusting reasoning effort.
OpenRouter presents provider failover after unavailability or rate limits, team spending limits, credit allocation and an Activity Dashboard as benefits. These are provider claims in the guide; their coverage, restrictions and reliability are not demonstrated. No coding-quality, speed or cost comparison is supplied.
Using it
Requirements
The guide calls for a desktop app installation and sign-in, an OpenRouter account and API key, and access to the user-level Codex configuration. It identifies ~/.codex/config.toml on macOS and %USERPROFILE%\.codex\config.toml on Windows. It states that project-scoped provider settings are ignored.
The desktop process must be able to read OPENROUTER_API_KEY. Minimum operating-system versions, supported app releases, account-plan requirements and the credits needed to begin are not specified. Because the page says the desktop app, CLI and IDE extension share this configuration, changing it may also affect those other interfaces.
Mechanism
The configuration selects openrouter as model_provider and defines its endpoint as [https://openrouter.ai/api/v1]. The provider block names OPENROUTER_API_KEY through env_key, sets wire_api to responses and sets supports_websockets to false. In plain terms, Codex reads the key from its process environment and sends model requests to OpenRouter using the Responses API.
The page says env_key authentication does not fetch the OpenRouter model catalog, so non-OpenAI models may display an unknown-model metadata warning. It points to a command-based authentication alternative that refreshes the catalog, but the implementation of that alternative is on an excluded linked page.
Setup
The documented sequence is to install the desktop app, sign in, create an OpenRouter API key and edit the user-level Codex configuration. Its example sets model_provider to openrouter, model_reasoning_effort to medium and model to openai/gpt-6-astra, followed by the provider settings described above. The model identifier is a source example, not evidence of current availability.
For macOS, the guide uses launchctl setenv to expose OPENROUTER_API_KEY to applications in the user session. It warns that this setting disappears after logout or reboot. For Windows, it uses setx to create a persistent user-level environment variable that subsequently started processes inherit.
The app must then be fully quit and reopened. If old settings persist, the page recommends checking for leftover ChatGPT or Codex processes. It specifically warns that process names alone are insufficient: confirm the parent application or OpenAI publisher before ending a process.
Example
An illustrative use follows the page's example: select openai/gpt-6-astra in the user configuration, expose OPENROUTER_API_KEY to the desktop session, restart the app and open a new Codex chat. The documented expected result is that requests pass through OpenRouter and become visible in its Activity Dashboard at [https://openrouter.ai/activity].
This illustrates the intended connection, not an observed result. The evidence contains no completed coding task, generated patch, request receipt, token count or measured response time.
Assessment & evidence
Limitations
The setup depends on user-level configuration and the environment inherited by desktop processes. A shell-profile export alone does not reach the app according to the guide, macOS session variables are temporary, and lingering background processes can retain old keys or settings.
Although the page says the model field accepts any OpenRouter model ID, it supplies no compatibility matrix for individual models, reasoning-effort values or coding-agent features. It documents only the responses wire protocol with WebSocket support disabled. Supported app versions and end-to-end behavior remain unverified.
Reasoning
The guide's strongest practical contribution is explaining the boundary between terminal settings and desktop-process settings. That distinction accounts for authentication failures that can persist even when the configuration file appears correct.
Its usefulness depends on the reader's goal. It provides specific instructions for connecting an existing desktop coding interface to OpenRouter, but supplies insufficient evidence for choosing a model, predicting task quality or estimating total cost. The shared configuration also makes the effect on existing CLI and IDE use relevant before applying changes.
Alternatives
The page identifies the Codex CLI and IDE extension as other interfaces that read the same local configuration. It explains that terminal processes inherit shell-profile settings, which may make the CLI more convenient for someone already managing API keys in a shell.
The CLI setup guide is linked at [https://openrouter.ai/docs/cookbook/coding-agents/codex-cli.md], but its contents are excluded here. The supplied page offers no detailed comparison of those interfaces, other coding assistants or direct-provider configurations.
Evidence
The evidence consists of the complete selected documentation page, retained as selected-page.txt from [https://openrouter.ai/docs/cookbook/coding-agents/codex-desktop.md]. It includes the quick start, configuration reference, authentication note, stated benefits, privacy statement and troubleshooting instructions.
The source revision is sha256:74b8d92acfcce184d57d0cf431efa688918b2a590b21d9751ef1b859c08c2b99. Linked documentation, policies, model listings and downloads are references only; their contents are not evidence for this report. No application behavior or request outcome was observed.
Access & freshness
Costs
The page describes credits, spending limits and dashboard cost tracking, but gives no model prices, minimum funding amount, routing fees or worked cost example. The cost of using this configuration is unknown from the supplied evidence.
Any desktop-app subscription requirement and its relationship to OpenRouter billing are also unspecified. Spending controls can help manage usage, but the page does not quantify their settings or establish a total budget for a coding task.
Rights
The supplied page contains no explicit redistribution licence for its documentation or configuration examples. It also does not establish commercial-use rights or ownership terms for generated code.
OpenRouter states that it does not log source-code prompts unless prompt logging is enabled. The linked privacy policy at [https://openrouter.ai/privacy] is outside the supplied evidence. Full retention terms, downstream provider handling and organizational data-use obligations therefore remain unknown.
Freshness
The supplied capture is dated 2026-11-24T18:10:21.218Z. The page contains no explicit publication date, update date or supported app-version range, so the capture timestamp does not establish when its instructions were last validated.
Model identifiers, aliases, application packaging and configuration behavior can change. The examples should be understood as details in this captured page; their current availability and compatibility were not checked.
Actions
Before applying the guide, confirm that the installed app supports the documented custom-provider settings, check the intended model's availability and prices, and consider other Codex interfaces using the same configuration. Keep the API key private and ensure the desktop process can read the intended OpenRouter key.
After configuration, fully restart the app and check whether a new task appears in the OpenRouter Activity Dashboard. If authentication fails, check the environment variable and user-level configuration before investigating confirmed app background processes. A dashboard entry would establish that a request reached OpenRouter; it would not by itself establish coding quality, failover reliability or compatibility with every model.
