Integrate with Codex ​

Codex is OpenAI's terminal-based AI coding assistant.

I. Prerequisites ​

Before using Codex, prepare the following.

1. Install Codex ​

Install or update Node.js (v18.0 or higher).

Run the following command in your terminal to install Codex.

bash
npm install -g @openai/codex

Run the following command to verify the installation.

bash
codex --version

2. Get a LongCat API Key ​

First, obtain your API Keys from the LongCat Platform, and confirm on the Usage page that your account has sufficient token quota.

The LongCat API platform currently provides the following models:

Model NameAPI FormatDescription
LongCat-2.5-PreviewOpenAI/AnthropicHigh-performance agentic model

II. Configure the LongCat API ​

1. Model ​

Edit ~/.codex/config.toml

toml
model_provider = "codex"
model = "LongCat-2.5-Preview"
disable_response_storage = true
web_search = "disabled"
model_reasoning_effort = "high"
model_supports_reasoning_summaries = true

[model_providers.codex]
name = "codex"
base_url = "https://api.longcat.chat/openai/v1"
wire_api = "responses"
requires_openai_auth = true

2. Auth ​

Edit ~/.codex/auth.json

json
{
  "OPENAI_API_KEY": "<Your LongCat API Key>"
}

Get <Your LongCat API Key> from the LongCat Platform.

III. Using Codex ​

Once configured, open a new terminal window and run the following command to launch Codex:

bash
codex

If the conversation UI opens normally, you're ready to use Codex + LongCat as your daily driver.