Codex uses one Imole API key, one base URL, and the model id that fits the task.
Before you start
Create an Imole API key from the dashboard API page. Keep the key in an environment variable or a local secret store, not in project files.
Use gpt-5.6-sol with high reasoning for repository work. For general reasoning, choose gpt-5.6-luna, gpt-5.6-terra, or gpt-5.6-sol with medium effort.
macOS and Linux
Add the key to your shell profile, then create or edit the Codex config file in your home directory.
- 1
Export IMOLE_API_KEY in the shell.
- 2
Create the Codex config directory if it does not exist.
- 3
Paste the provider block into config.toml.
- 4
Restart Codex or open a new terminal.
export IMOLE_API_KEY="imole_live_..."
mkdir -p ~/.codex
${EDITOR:-nano} ~/.codex/config.tomlmodel = "gpt-5.6-sol"
model_provider = "imole"
model_reasoning_effort = "high"
[model_providers.imole]
name = "Imole"
base_url = "https://api.imole.app/v1"
env_key = "IMOLE_API_KEY"
wire_api = "responses"Windows
Use PowerShell for Codex on Windows. Store the key as a user environment variable, then edit the Codex config under your user profile.
- 1
Set IMOLE_API_KEY for the current user.
- 2
Create %USERPROFILE%\.codex.
- 3
Open config.toml in Notepad.
- 4
Paste the provider block.
[Environment]::SetEnvironmentVariable("IMOLE_API_KEY", "imole_live_...", "User")
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex"
notepad "$env:USERPROFILE\.codex\config.toml"model = "gpt-5.6-sol"
model_provider = "imole"
model_reasoning_effort = "high"
[model_providers.imole]
name = "Imole"
base_url = "https://api.imole.app/v1"
env_key = "IMOLE_API_KEY"
wire_api = "responses"WSL
For WSL, configure Codex inside the Linux distribution. Windows user environment variables do not automatically become stable Linux shell secrets.
echo 'export IMOLE_API_KEY="imole_live_..."' >> ~/.bashrc
mkdir -p ~/.codex
nano ~/.codex/config.tomlVerify
Start Codex and ask a small coding task. If authentication fails, verify the environment variable is visible in the same terminal session that starts Codex.
For media work, use Imole Agent or the direct media API routes. Text providers are for text, planning, coding, and tool orchestration.
Explain the current folder structure.Write a tiny unit test for this function.Use gpt-5.6-luna for a quick connection test.