config.toml and auth.json into the Codex config directory.
If you already completed the Codex setup, open or restart Codex Desktop. You do not need to create another API Key.
Prerequisites
- You have completed Create an account.
- You have completed Get an API Key.
- Codex Desktop is installed.
- The Use key dialog is open for the API Key you want to use.
Install
Download and install Codex Desktop from the OpenAI Codex app documentation. After installation, open the app and complete the initial setup shown by Codex Desktop. If Codex Desktop is not available for your system yet, use Codex CLI for terminal access.Copy config from the dashboard
Choose Codex CLI
Find the key you want to use for Codex Desktop, click Use key, then choose Codex CLI.
Choose your system
Select macOS / Linux or Windows. The dashboard shows the target config file paths.
Write local config
Follow the matching system steps on the Codex page to write
config.toml and auth.json.Config file paths
| System | config.toml | auth.json |
|---|---|---|
| macOS / Linux | ~/.codex/config.toml | ~/.codex/auth.json |
| Windows | %USERPROFILE%\.codex\config.toml | %USERPROFILE%\.codex\auth.json |
~/.codex/ directory instead of the Windows user directory.
Use the model, review_model, base_url, and API Key values shown in the dashboard. See the Codex page for field meanings.
Verify
Open Codex Desktop, choose a local project, then send a low-risk task:Common issues
I already configured Codex CLI. Do I need to repeat setup?
I already configured Codex CLI. Do I need to repeat setup?
No. Codex Desktop reads the same
~/.codex/ config. Quit Codex Desktop completely, then open it again.Codex Desktop still uses the old model or address
Codex Desktop still uses the old model or address
Put the new config at the beginning of
config.toml. Save, quit Codex Desktop completely, and open it again.Codex Desktop reports authentication failure
Codex Desktop reports authentication failure
Check that
auth.json is valid JSON. Confirm the API Key has no missing characters, newlines, or extra spaces.Codex Desktop cannot find the model
Codex Desktop cannot find the model
model and review_model must match the dashboard model name exactly. Do not copy names from someone else’s screenshot.