Use Codex and Claude Code with Frugal Relay
Create an API key first. Use a key whose group allows the model you plan to run. Replace YOUR_FRUGAL_RELAY_API_KEY in either example with the full key shown in your dashboard.
Codex CLI
Section titled “Codex CLI”Use Codex CLI 0.156.0 or newer. Add the following to ~/.codex/config.toml (on Windows, %USERPROFILE%\.codex\config.toml). If the file already contains a provider or a [features] table, merge these entries into the existing tables rather than adding duplicate tables.
model = "gpt-6-sol"model_provider = "FrugalRelay"
[model_providers.FrugalRelay]name = "Frugal Relay"base_url = "https://frugalrelay.me/v1"model_catalog_url = "https://frugalrelay.me/v1/codex/models"wire_api = "responses"requires_openai_auth = falseexperimental_bearer_token = "YOUR_FRUGAL_RELAY_API_KEY"
[features]api_key_model_discovery = trueRestart Codex after editing the file. Run codex debug models to check the catalog, then use /model in a new session. If your key does not allow gpt-6-sol, select an available model and update the model line.
The Codex catalog endpoint reads model metadata from the official OpenAI Codex catalog and returns only models available to your key. New upstream catalog entries can appear after Codex refreshes its list, but a model must also be enabled on your Frugal Relay route. The regular /v1/models endpoint remains the OpenAI-compatible model list.
Claude Code
Section titled “Claude Code”Add this to ~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json). Merge the env fields if you already have settings in this file.
{ "env": { "ANTHROPIC_BASE_URL": "https://frugalrelay.me", "ANTHROPIC_AUTH_TOKEN": "YOUR_FRUGAL_RELAY_API_KEY", "ANTHROPIC_MODEL": "claude-sonnet-5" }}Restart Claude Code, then run /status to confirm the gateway URL and auth token are active. The Claude Code base URL is the service root, without /v1; Claude Code appends the Anthropic API path itself. Change ANTHROPIC_MODEL if your key uses another Claude model. See Claude Code’s gateway setup guide for its credential and settings behavior.
Keep local configuration files private because they contain your API key. Model availability and prices depend on the selected key and route; check the live pricing page before choosing a model.