The Easiest Way to Set Up a Third-Party API in Codex and Claude Code: A GUI App
Configure a third-party Base URL, API key, and model in OpenAI Codex and Claude Code using our free open-source LLM API Config GUI for Windows and macOS.

Summary
- LLM API Config GUI is an open-source desktop assistant (Windows & macOS.
- Handles protocol differences automatically.
- Supports masked imports into CC Switch, direct Codex config.toml application with automatic backups, and live HTTP 401/403/404/429 connection diagnosis.
- Covers post-setup client gotchas including Codex Desktop Work mode auth blocks, missing custom model catalogs.
If you search for a GUI for Claude Code or OpenAI Codex, almost every tool you find is a full workspace replacement. Apps like Nimbalyst, Conductor, or CodePilot wrap the agent in a new chat window, add kanban boards, or manage parallel git worktrees. That is useful if you want a new IDE, but it does nothing for a simpler problem: you want to keep running codex and claude in your own terminal or editor, and you just want a graphical way to point them at a third-party API without fighting config.toml syntax, shell profiles, and mismatched Base URLs.
We built LLM API Config GUI to solve that exact problem. It is a free, open-source desktop configuration assistant for Windows and macOS (licensed under Apache-2.0) that lets you set your Base URL, API key, and model ID in one window, test the connection against your gateway before you touch your workflow, and apply the configuration either through CC Switch or directly to your local Codex config with an automatic backup.
On this page
Why Manual Third-Party API Setup Keeps Breaking
Pointing Codex and Claude Code at a custom gateway looks like a three-line change until you do it across both tools or switch between macOS and Windows. The two clients expect opposite URL conventions, read from different configuration layers, and fail silently when a key name is slightly off.
| Client | Required Protocol | Where Settings Live | Base URL Rule | Example (SeedRouter) |
|---|---|---|---|---|
| Codex CLI / Desktop | OpenAI Responses |
~/.codex/config.toml (%USERPROFILE%\.codex\config.toml on Windows) + OS env var |
Must include the /v1 version suffix |
https://seedrouter.net/v1 |
| Claude Code | Anthropic Messages |
~/.claude/settings.json (%USERPROFILE%\.claude\settings.json) or shell profile |
Must not include /v1 or /v1/messages |
https://seedrouter.net |
That Base URL split causes more 404 Not Found errors than any other mistake. Codex talks to an OpenAI-compatible Responses endpoint and needs /v1 at the end of base_url. Claude Code automatically appends /v1/messages to whatever you set as ANTHROPIC_BASE_URL. If you copy a /v1 URL from Codex into Claude Code, Claude requests /v1/v1/messages and fails immediately.
Configuration file formats are just as unforgiving. In Codex, third-party providers have to be declared in your global user-level ~/.codex/config.toml because project-local files cannot override provider routing or authentication. You have to link a top-level model_provider string to a matching [model_providers.<id>] table, declare wire_api = "responses", and pass the key through an env_key pointer.
In Claude Code, writing "model" at the top level of .claude/settings.json or setting ANTHROPIC_API_KEY (the variable used by the Python and TypeScript SDKs) often fails on third-party gateways. Claude Code's CLI looks for ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, and ANTHROPIC_MODEL inside the "env" object, and its background tasks still call Anthropic's default tier aliases unless you also map ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL, and ANTHROPIC_DEFAULT_OPUS_MODEL.
What LLM API Config GUI Actually Does (and What It Doesn't)
We designed LLM API Config GUI as a focused configuration and diagnostics utility, not a background daemon or chat wrapper. Once you finish configuring and testing your endpoint, you close the app and use Codex or Claude Code normally.
| Capability | How LLM API Config GUI Handles It | Important Boundary |
|---|---|---|
| Fast setup on an existing machine | Select your installed tools and click Configure API now to jump straight to Base URL, key, and model entry | Skipped environment checks are not marked as passed |
| New machine onboarding | Checks your local environment, previews installation commands, configures the API, and verifies the setup | Never modifies PATH or runs installs without your explicit confirmation |
| CC Switch integration | Generates a masked import preview and opens CC Switch to hand off the provider | You confirm and activate the profile inside CC Switch; our app never edits the CC Switch database directly |
| Direct Codex configuration | Expands manual setup, shows the exact config.toml template, backs up your old file, and applies the new config |
Backs up your existing config.toml before writing, rather than attempting a lossless merge of custom TOML keys |
| Live error diagnosis | Sends a real test request to your gateway and diagnoses 401, 403, 404, 429, and connection timeouts |
Test requests contact your selected provider and may consume a small number of tokens |
Because API keys are sensitive, the app never writes credentials to persistent browser storage or telemetry. Switching between tool tabs clears the input state in memory, and any repair or file change shows a preview before writing to disk. Be aware that if you click the copy button to grab a generated snippet, your operating system's clipboard history or cloud clipboard sync may retain the key until you clear it.
The project is sponsored by SeedRouter, which is pre-filled as the default preset so you can test unified OpenAI Responses and Anthropic Messages routing right away. You do not have to use SeedRouter—you can enter any third-party gateway or self-hosted endpoint that speaks the protocol your client requires. If you want to use a gateway on an Android phone too, see using your own gateway in Mika.
Step-by-Step: Configuring Codex and Claude Code in the GUI
Before starting, check which build you are running from the GitHub repository. If you already have Codex or Claude Code installed and want the Configure API now shortcut that skips environment onboarding, run the current source build rather than the older v0.2.0 installer (the repository was previously named llm-api-tutorial, and the Configure API now shortcut landed in source after v0.2.0). Running from source takes three commands if you have Node.js 20+ and Rust installed:
git clone https://github.com/easyrouter/llm-api-config-gui.git
cd llm-api-config-gui
npm ci
npm run tauri dev
Once the desktop window opens, the setup takes four steps:
- Pick your workflow and client. Select Codex, Claude Code, or both. If the CLI tools are already on your machine, click Configure API now to bypass the installation check. If you are on a fresh Windows or macOS machine, use the full environment-check path to verify Node, Git, and CLI paths first.
- Enter your Base URL, API key, and actual model ID. Match the Base URL to the client (
https://seedrouter.net/v1for Codex;https://seedrouter.netwithout/v1for Claude Code). Enter the exact model string your key has permission to call—do not rely on a generic placeholder name if your gateway expects a specific version ID likeclaude-sonnet-4-6orkimi-k3.1-pro(see our guide on running Kimi K3.1 Pro in Claude Code for an example of model mapping). - Run the connection check. Click test to verify the endpoint before writing any files. If the gateway returns
401 Unauthorized(bad key or wrong auth header),403 Forbidden(account lacks access to that model),404 Not Found(usually a trailing/v1/messagesin the Base URL or a typo in the model ID), or429 Too Many Requests, the GUI flags the exact cause right in the window. - Apply via CC Switch or direct template. If you use CC Switch to flip between multiple providers, review the masked import preview in the GUI, send it to CC Switch, and activate it there. For Codex without CC Switch, expand the manual setup panel, review the generated
config.tomlblock, and click confirm to back up your existing~/.codex/config.tomland write the new file. Restart your terminal or desktop client so the new configuration loads.
What a Passed Connection Test Does Not Catch (Client-Side Gotchas)
A green connection test in the GUI proves that your Base URL, API key, and model ID can complete a live request against your gateway at that moment. However, Codex and Claude Code both have client-side behaviors that only trigger during multi-turn agent sessions, tool calls, or desktop UI initialization. If your test passes in the GUI but the client misbehaves after you restart it, check these four places.
1. Codex Desktop Fails in "Work" Mode with Work browser access requires an authenticated account
When you run the Codex Desktop app purely on a third-party API key (BYOK) without an active ChatGPT OAuth session cached on the machine, sending a message in Work mode can fail immediately with Error submitting message: Work browser access requires an authenticated account (or Codex auth token is unavailable if Chrome Browser Use is enabled).
This happens because conversationDetailMode = "STEPS_PROSE" (the setting behind Work mode) initializes browser identity checks that require a first-party ChatGPT login token, blocking the entire turn before your third-party API is even called. Open your ~/.codex/config.toml (or %USERPROFILE%\.codex\config.toml) and change the desktop detail mode back to command steps:
[desktop]
conversationDetailMode = "STEPS_COMMANDS"
Fully quit and restart the Codex app, and message submission will work again. If you use CC Switch on Windows, switching the Codex mode from Direct to local Routing also avoids this block.
2. Custom Models Do Not Show Up in the Codex Picker
Starting with newer Codex builds (0.155.0+), custom providers authenticated with an API key no longer fetch remote model lists by default because api_key_model_discovery defaults to false. Your configured default model works, but the UI picker only displays built-in OpenAI names.
To make Codex pull your gateway's model list, enable discovery in ~/.codex/config.toml and point model_catalog_url at your provider's /v1/models endpoint:
model = "gpt-5.4"
model_provider = "seedrouter"
[features]
api_key_model_discovery = true
[model_providers.seedrouter]
name = "SeedRouter"
base_url = "https://seedrouter.net/v1"
model_catalog_url = "https://seedrouter.net/v1/models"
env_key = "SEEDROUTER_API_KEY"
wire_api = "responses"
requires_openai_auth = false
After editing config.toml, delete ~/.codex/models_cache.json and restart Codex. Codex caches the model catalog for five minutes and binds it to your bearer token, so switching keys or gateways without deleting models_cache.json will leave stale models in the dropdown. Also note that if your gateway rejects unsupported parameters like prompt_cache_retention during tool calls, you can fix that using our guide on Gateway 400 errors for prompt_cache_retention.
3. Claude Desktop's "Code" Tab Ignores .claude/settings.json
In Claude Code, your ~/.claude/settings.json works reliably for the terminal CLI (claude) and the VS Code extension. However, if you open the Code tab inside the official Claude Desktop app while logged into a normal Claude subscription, it spawns its internal CLI process with ANTHROPIC_BASE_URL=https://api.anthropic.com hardcoded in the process environment. Process variables override settings.json, so your traffic goes straight to Anthropic instead of your third-party gateway, and trying to override ANTHROPIC_BASE_URL in the local environment UI is blocked. If Claude Code still skips your gateway, our guide on fixing a Base URL that gets ignored covers the other causes.
To use a custom Base URL with Claude Code without fighting the desktop wrapper, either run claude from your terminal / IDE extension where ~/.claude/settings.json is respected, or enable Developer Mode inside Claude Desktop (Help -> Troubleshooting -> Enable Developer Mode, then Develop -> Configure Third-Party Inference) to point the entire desktop app at your gateway. When configuring .claude/settings.json for the CLI, always map the default tier variables so background sub-agents do not request model IDs your gateway doesn't host:
{
"env": {
"ANTHROPIC_BASE_URL": "https://seedrouter.net",
"ANTHROPIC_AUTH_TOKEN": "your-api-key-here",
"ANTHROPIC_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-7"
}
}
If you connect successfully but still hit 400 Bad Request responses during long coding sessions or agent checks, match the exact error string against our Claude Code API Error 400 troubleshooting guide.
4. Preserving Official Login When Switching in CC Switch
If you pair LLM API Config GUI with CC Switch and toggle between an official ChatGPT OAuth login and a third-party Codex key, upgrade CC Switch to v4.0.0 or later. Older v3.17–v3.20 builds had a known bug where hot-switching providers without a local proxy could either delete your ~/.codex/auth.json OAuth file even when "preserve official login" was checked, or overwrite a newly created blank provider with the previous provider's live config.toml values. CC Switch v4.0+ isolates provider switching to the endpoint, key, and model fields so your native login file stays intact.
Download the GUI and Verify Your Gateway
You can grab the source code or latest builds of LLM API Config GUI on GitHub. If you need a single API key that supports both OpenAI Responses for Codex and Anthropic Messages for Claude Code out of the box, you can generate a key at SeedRouter and use the built-in preset to get both tools running in under two minutes. And if you are testing a new third-party provider for the first time, once your connection test passes in the GUI, run through our checklist on how to verify that an LLM API relay really serves the model you pay for.