Codex CLI
Prerequisites
Step 1: Install
Step 2: Set the API key
Replace sk-xxx with your JoyToken API key:
For persistent use, provide the variable through your shell profile or secret manager. Do not store the key in config.toml.
Step 3: Configure the provider
Add the following top-level settings and provider definition to ~/.codex/config.toml:
Provider and authentication settings must be in the user-level config. Codex ignores model_provider and model_providers in project-level .codex/config.toml files.
Step 4: Start
Step 5: Verify
A successful response includes pong.
