Skip to main content
This documentation is provided for informational purposes only and demonstrates how to configure and use our API with third-party AI chat interfaces. Any third-party software, websites, or services mentioned are not operated, controlled, or endorsed by us.

Introduction to Codex

Image
Codex CLI is OpenAI’s coding agent that you can run locally from your terminal. It can read, change, and run code on your machine in the selected directory. It’s open source and built in Rust for speed and efficiency.Codex Key Features:
  • Terminal-based AI coding assistant
  • Natural language → code generation
  • Local execution with privacy
  • Multiple automation modes
  • Multi-language support
  • Debugging, refactoring & testing automation
  • Interactive workflow in CLI

Step

1

Install Codex

Install the newest LTS version of Node.jsAfter installation is complete, open the terminal (Windows users use PowerShell) and check the version number.
  • macOS, Linux, Windows:
npm i -g @openai/codex
Verify the installation.
codex --version
If the version number is displayed correctly, the installation is successful.
2

Configure Codex

Codex uses the config.toml file to parse provider parameters. Please locate and create/edit this file according to your operating system.Edit or create config.toml fileOn macOS & Linux: ~/.codex/config.tomlOn Windows: C:\Users\<USERNAME>\.codex\config.tomlDelete the previous content and replace it with the following.Configuration file:
model_provider = "routerlink"
model = "world3-router-north-america/openai/gpt-5.3-codex"

[model_providers.routerlink]
name = "RouterLink"
base_url = "https://router-link.world3.ai/api/v1"
env_key = "ROUTERLINK_API_KEY"
You can replace the “model” field with any model that is compatible with the OpenAI format.
3

Codex Loading and Validation

Open the terminal (Windows users use PowerShell). Make sure to replace with the <ROUTERLINK_API_KEY> obtained from RouterLink Key.
  • macOS, Linux,
export ROUTERLINK_API_KEY="<ROUTERLINK_API_KEY>"
  • Windows PowerShell:
$env:ROUTERLINK_API_KEY = "<ROUTERLINK_API_KEY>"
Launch codex
codex
Select “Yes” to trust this folder.
Codex1
Now you can use Codex.