Skip to main content
Codex uses two files for configuration: config.toml and auth.json. config.toml sets the model and API endpoint. auth.json stores the API key.

1. Open the configuration directory

Press Win + R, enter the following path, and press Enter:
If config.toml or auth.json does not exist, create it.

2. Write config.toml

Replace <API_KEY> with your API key, such as sk-xxxxxx. Replace <MODEL> with the model you use, such as qwen3.7-max.

3. Write auth.json

4. Test the configuration