Integration · coding agent

Codex CLI on llmbox

Codex CLI is OpenAI's coding agent for the terminal. Add llmbox as a provider in config.toml to use GPT, DeepSeek, Gemini and Qwen with one API key. Pay per token.

  • OpenAI Responses API
  • Provider in config.toml
  • One API key
~/.codex/config.toml
Responses
base_url
https://llmbox.cc/v1
env_key
LLMBOX_API_KEY
wire_api
responses
model
codex -m <ID>
  • openai/gpt-6.1-sol
  • deepseek/deepseek-v4-pro
  • openai/gpt-6-sol
  • qwen/qwen3.8-max
  • + 10 more

Setup

Set up Codex CLI

  1. Install Codex

    Install Codex CLI from npm on macOS, Linux and Windows.

  2. Add the provider

    Define llmbox in ~/.codex/config.toml (example below) and store your API key from the dashboard in an environment variable:

  3. Run with a model

    Set the model in config.toml or with the -m flag, using an ID from the table below.

    Full guide

Models

Models with Responses API support

Codex works over the Responses API, so the table lists the models that support it.

Full catalog
ModelModel in CodexInput, 1MOutput, 1M
GPT-6.1 Solopenai/gpt-6.1-sol$1.80$5.00
GPT-6 Solopenai/gpt-6-sol$1.60$4.00
DeepSeek V4 Prodeepseek/deepseek-v4-pro$0.19$0.555
DeepSeek V4.1 Flashdeepseek/deepseek-v4.1-flash$0.10$0.27
Gemini 3.8 Flashgoogle/gemini-3.8-flash$0.225$1.125
Qwen3.8 Maxqwen/qwen3.8-max$0.225$0.7875

Prices are per million tokens, from the catalog.

Config file

Provider in config.toml

The llmbox provider name is arbitrary — it lives only in your config. Codex reads the API key from the environment variable named in env_key.

Example in the docs
~/.codex/config.toml
model_provider = "llmbox"
model = "openai/gpt-6.1-sol"
[model_providers.llmbox]
name = "llmbox"
base_url = ""
env_key = "LLMBOX_API_KEY"
wire_api = "responses"

How it works

Works like a built-in provider

Codex tools

Terminal commands and file edits via apply_patch work as usual. Web search works on GPT models, and search results are billed as input tokens.

Usage in your dashboard

Track each request's model, tokens and cost in your dashboard. Set a spending limit for each API key.

Long sessions use more tokens

Codex sends the session history with every request, so longer tasks use more input tokens. Compare model prices in the catalog.

Scenarios with Codex CLI

Questions

FAQ

Which models work in Codex via llmbox?

Models that support the Responses API: GPT, DeepSeek, Gemini Flash and Qwen from the table above. See the catalog for the full list and prices.

Which API key does Codex use?

Your llmbox API key from the dashboard. Codex reads it from the environment variable named in env_key. No ChatGPT subscription needed.

Does Codex web search work?

Yes, on GPT models. Search results are billed as input tokens.

How are Codex requests billed?

Agent requests are billed per token at catalog rates and deducted from your llmbox balance. Pay as you go, with no subscription.

Connect Codex CLI to llmbox

Create an API key in your llmbox dashboard after signing up.

Codex CLI is an open-source project by OpenAI under the Apache 2.0 license.