Claude Code & Codex CLI Base URL config generator

Pick a tool, your OS and an endpoint. Get copy-paste env vars, ~/.claude/settings.json, ~/.codex/config.toml or SDK snippets for any API relay, gateway or self-hosted proxy (LiteLLM, one-api, new-api, your own).

๐Ÿ”’ Privacy: this page makes no network requests. Everything is generated by JavaScript in your browser. If you type a real key it never leaves this tab and is not saved in the URL. Safer still: keep the placeholder and paste your key into the file yourself. Source.
Stays in this tab. Never put a real key in a shared screenshot or repo.

Which URL goes where?

ClientSettingWhat it appendsTypical value
Claude CodeANTHROPIC_BASE_URL/v1/messageshttps://gateway.example.com (no /v1)
Codex CLI[model_providers.<id>] base_url/responseshttps://gateway.example.com/v1
OpenAI SDKsbase_url / baseURL / OPENAI_BASE_URL/chat/completions, /modelshttps://gateway.example.com/v1

Rule of thumb: a 404 almost always means the prefix is wrong (missing or doubled /v1). Check your gateway's docs for its exact paths. To test an endpoint from the terminal, try llm-endpoint-check; for a step-by-step guide with troubleshooting see Claude Code & Codex CLI with a custom Base URL.