OpenAI Codex CLI setup guide
Configure MoLoop Responses for Codex CLI.
Overview
Codex CLI is a terminal coding agent that reads, writes, and runs code through a sandbox and reviewable patches. Point a custom Responses provider at MoLoop to drive it with catalog models.
Quick configuration
Codex uses a /v1 Responses endpoint and API key.
Configure Codex with CC Switch
Import the current MoLoop Responses endpoint and API key into the Codex configuration in CC Switch.
Endpoint: https://api.moloop.io/v1
基础 URL: https://api.moloop.io/v1
API 密钥: YOUR_API_KEYCompatibility
Chat Completions
Responses API
Streaming
Tool calling
Step-by-step setup
Install Codex CLI
Install Codex CLI globally with npm.
npm install -g @openai/codexConfigure the model provider
Edit ~/.codex/config.toml with the model, MoLoop base_url, and responses wire API.
# ~/.codex/config.toml
model = "YOUR_MODEL_ID"
[model_providers.moloop]
name = "MoLoop"
base_url = "https://api.moloop.io/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"Add the API key
Put the key in the credential file supported by Codex, or set OPENAI_API_KEY in the shell that launches Codex.
// ~/.codex/auth.json
{
"OPENAI_API_KEY": "YOUR_API_KEY"
}Start Codex
Run codex in the project directory, ask about the repository first, and only then make changes.
codexRecommended models
Choose a model that supports Responses and coding tools. Use the MoLoop catalog ID directly without an openai/ prefix.
Things to know
unsupported endpoint usually means wire_api is not responses or base_url does not end in /v1.
For a 401, check OPENAI_API_KEY in auth.json or the launch shell, then restart Codex.
始める準備はできましたか?
API キーを取得して、これらのツールで MoLoop を使い始めましょう。