For the complete documentation index, see llms.txt. This page is also available as Markdown.

Codex CLI

Guide to configuring the OpenAI Codex CLI to call the Minimax model via GreenNode MaaS β€” using the Responses API through a custom maas provider defined in codex.toml.


Prerequisites

The Minimax M2.5 model via Codex uses the OpenAI standard β€” the Base URL includes /v1: https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1.

Using a Token Plan (subscription package) key instead of a pay-as-you-go API key? Use https://tokenplan.api.greennode.ai/v1 as the Base URL instead. See Token Plan for details.


Step 1 β€” Install Codex CLI

npm install -g @openai/codex

Confirm the install succeeded:

codex --version

Step 2 β€” Get an API key from AI Platform

  1. Log in to the AI Platform Console

  2. Go to API Keys β†’ Create API Key

  3. Name the key (5–50 characters, lowercase letters + numbers + hyphens)

  4. Copy the API key (vn-...) you just created


Step 3 β€” Configure codex.toml

Create or edit ~/.codex/config.toml (system-wide config) or codex.toml at your project root (applies to that project only):

Key field explanations:

Field
Purpose

model_provider

The provider key under [model_providers.*]

model

Model ID sent to MaaS

model_context_window

Set manually since MaaS doesn't expose model metadata

disable_response_storage

Required for the stateless backend β€” resend the full conversation every turn

base_url

MaaS endpoint with /v1 β€” Codex appends /responses after it

env_key

Name of the environment variable holding the API key

wire_api

Protocol used β€” responses corresponds to the OpenAI Responses API


Step 4 β€” Set the API key and run Codex

Export the API key in your shell:

To do this automatically every time you open a terminal, add it to ~/.zshrc or ~/.bashrc:

Run Codex inside your project directory:

Codex will show the provider and model in use in the session header:

Codex running with the minimax/minimax-m2.5 model via GreenNode MaaS

Troubleshooting

Symptom
Cause
Fix

401 Unauthorized

Wrong, missing, or not-yet-ACTIVE API key

Re-export MAAS_API_KEY; check the key's status in the AI Platform Console

404 when sending a request

base_url wrong or missing /v1

Make sure base_url ends with /v1 (no /responses)

Context truncated incorrectly

Model metadata not declared

Check model_context_window and model_max_output_tokens in the config

Loses context every turn

disable_response_storage not set

Add disable_response_storage = true to the config

Connection timeout

Endpoint unreachable

Check VPN / connection to *.api.vngcloud.vn


Result

Once done, the Codex CLI routes all requests through GreenNode MaaS using the Minimax model. Usage is logged on the AI Platform Console β†’ Usage.

I want to next...
Go to

Use the GUI version

Use OpenCode with MaaS

Connect Claude Code to MaaS

View usage and billing


Need help?

If you've followed the steps and it's still not working, feel free to contact GreenNode Customer Support:

Thank you for using GreenNode's services.

Last updated