config.toml fields below follow the official Codex repository and custom-provider reference. NexusAPI supplies only the Base URL, API key, and model ID.
1. Install Codex CLI
Choose one official installation method.Windows PowerShell
macOS, Linux, or WSL
With Node.js already installed
2. Create a compatible key
In NexusAPI console → Token Management → Add token, select a group containing the exact model you need. Use a recognizable name and a suitable project limit. Then check/v1/models and the capability matrix to confirm that supported_endpoint_types includes openai-response.
3. Configure a custom provider
Open the user configuration file:YOUR_MODEL_ID with the exact model ID available to the key. Do not put the actual key in this file.
4. Set the environment variable
Windows PowerShell
macOS, Linux, or WSL
5. Verify safely
VS Code / Cursor
Install the Codex extension published by OpenAI from the extension marketplace. It uses the same user-level Codex configuration; do not add the legacychatgpt.apiBase or chatgpt.config settings to VS Code.
Troubleshooting
- Use a newly opened terminal so
NEXUSAPI_API_KEYis available. - Confirm the key is enabled, funded, and assigned to the right group.
- Recopy the exact model ID from the Model Marketplace or
/v1/models. - Save the complete error and Request ID, then use the self-check guide.
