CLI / CODEX

Codex CLI

Configure Codex CLI with the Responses API for personal terminal tasks.

!

Production integration docs · examples use router-api.mengbi-ai.net and a personal API key placeholder.

01 /

Prepare

Prepare Codex CLI with a personal Mengbi Router key and a current model ID.

Prepare 1

Use the Codex CLI configuration supported by your current installation.

bash
npm install -g @openai/codex
codex --version
02 /

Configure

Connect Codex CLI to the endpoint that matches its supported protocol.

Configure 1

Use the Codex CLI configuration supported by your current installation.

toml
model_provider = "mengbi"
model = "gpt-5.6-sol"
model_reasoning_effort = "high"

[model_providers.mengbi]
name = "Mengbi Router"
base_url = "https://router-api.mengbi-ai.net/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"

Configure 2

Use the Codex CLI configuration supported by your current installation.

bash
export OPENAI_API_KEY="sk-mengbi-xxxxxx"
codex