NewPoint any agent at UberLLM — one key, every model, list price or less.

Codex CLI with UberLLM: run OpenAI’s coding agent on any model

Export UBERLLM_API_KEY, then add a [model_providers.uberllm] table to ~/.codex/config.toml with base_url https://api.uberllm.dev/v1, env_key UBERLLM_API_KEY and wire_api "responses", and set model_provider = "uberllm" plus the model id. UberLLM serves the Responses API Codex calls, so shell commands, file edits and multi-step tasks work on every chat model.

Steps

  1. Make a key on your keys page and add credit.
  2. Install Codex if you do not have it: npm install -g @openai/codex.
  3. Put the key in your shell profile (~/.zshrc or ~/.bashrc) and open a new terminal:
export UBERLLM_API_KEY="ull_..."
  1. Open ~/.codex/config.toml (create it if it is missing) and add:
model = "moonshotai/kimi-k3"
model_provider = "uberllm"
web_search = "disabled"

[model_providers.uberllm]
name = "UberLLM"
base_url = "https://api.uberllm.dev/v1"
env_key = "UBERLLM_API_KEY"
wire_api = "responses"
  1. Run codex in a project folder and give it a task.

Keep base_url ending in /v1: Codex adds /responses to it. env_key is the name of the variable, not the key itself.

Switch models

Pass -m for one session, for example codex -m deepseek/deepseek-v4.1-flash for a small fix, or change model in the file. Any chat model id from uberllm.dev/models works.

For scripts and CI, codex exec runs one task without the interactive screen:

codex exec --skip-git-repo-check "add a docstring to every function in utils.py"

Settings worth adding

  • model_context_window: Codex does not know the context size of models outside OpenAI's list and assumes 272,000 tokens. For a smaller model, set the number from its page on uberllm.dev/models (for example model_context_window = 131072), so Codex compacts the conversation before it runs out of room.
  • model_reasoning_effort: "low", "medium" or "high" is passed on to models that think (DeepSeek, Kimi Thinking, GLM, GPT-5). Leave it out for the model's default.
  • web_search = "disabled": Codex's web search runs on OpenAI's own servers, so it cannot run through another provider. With it off, the model is not offered a tool it cannot use.

What works

Every Codex tool is a normal function call from the API's side, so command runs, file edits, plans and MCP servers you add to Codex all work on any model that takes tool calls. Codex sends the whole conversation on every turn (store = false), so nothing is kept on UberLLM between calls. Each call shows in Dashboard → Activity under the app name codex, with its cost.

Troubleshooting

  • wire_api = "chat" is no longer supported: Codex 0.95 and later only speak the Responses API. Set wire_api = "responses".
  • 401 or "Missing environment variable: UBERLLM_API_KEY": the variable is not exported in the terminal Codex runs in. Open a new terminal after editing your profile, or run export UBERLLM_API_KEY=... first.
  • 404 on every turn: base_url is missing /v1. It must be exactly https://api.uberllm.dev/v1.
  • "Model metadata for … not found. Defaulting to fallback metadata": Codex prints this for every model outside OpenAI's own list. It is harmless; set model_context_window as above.
  • The model answers but never runs a command: pick a model from the first table. Small models drift out of Codex's tool format.
  • 402 insufficient credits: add credit on the credits page. For a hard ceiling, set a spend limit on the key.

Keep reading

Models that drive Codex well

All take tool calls, which Codex uses for every command and edit. The first is in the config below.

ModelModel id (paste this)Price now
Kimi K3moonshotai/kimi-k3$0.0032 in · $0.2475 out / 1M
DeepSeek V4.1 Flashdeepseek/deepseek-v4.1-flash$0.0070 in · $0.0783 out / 1M
GLM 5.3z-ai/glm-5.3$0.0023 in · $0.0469 out / 1M
Claude Sonnet 5.5anthropic/claude-sonnet-5.5$0.7610 in · $3.80 out / 1M
Qwen 3 Coder 480bqwen/qwen3-coder$0.0030 in · $0.0100 out / 1M
GPT-5.5openai/gpt-5.5$0.9625 in · $5.78 out / 1M
Claude Opus 5.5anthropic/claude-opus-5.5$1.58 in · $7.88 out / 1M
DeepSeek V4 Prodeepseek/deepseek-v4-pro$0.3016 in · $0.6032 out / 1M
MiniMax M3minimax/minimax-m3$0.2034 in · $0.8136 out / 1M

Prices at the last hourly build, no fee added · every model →

Cheaper models for small tasks and codex exec scripts

ModelModel id (paste this)Price now
DeepSeek V4.1 Flashdeepseek/deepseek-v4.1-flash$0.0070 in · $0.0783 out / 1M
GLM 5.3z-ai/glm-5.3$0.0023 in · $0.0469 out / 1M
Qwen 3 Coder 480bqwen/qwen3-coder$0.0030 in · $0.0100 out / 1M
DeepSeek V3.2deepseek/deepseek-v3.2$0.0026 in · $0.0038 out / 1M
GPT-OSS 120Bopenai/gpt-oss-120b$0.00014 in · $0.00060 out / 1M
Kimi K2 Thinkingmoonshotai/kimi-k2-thinking$0.0060 in · $0.0250 out / 1M

Prices at the last hourly build, no fee added · every model →

FAQ

Does Codex CLI work with UberLLM?

Yes. Add a model provider in ~/.codex/config.toml with base_url https://api.uberllm.dev/v1, env_key UBERLLM_API_KEY and wire_api "responses". UberLLM serves the Responses API (POST /v1/responses) that Codex calls, with streaming and tool calls.

Which models can I use in Codex through UberLLM?

Any chat model in the UberLLM catalog that takes tool calls, such as DeepSeek, GLM, Kimi, Qwen Coder, Claude and GPT. Set model to its id, for example deepseek/deepseek-v4.1-flash.

Do I need previous_response_id or stored responses for Codex?

No. Codex sends the whole conversation on every request with store set to false, so UberLLM keeps nothing between calls.