Skip to content

Codex Configuration

Author: goswitch

Updated: 2026-06-13T10:02:01.000Z

Windows

  1. Press "Win+R" on your keyboard, enter the following and press Enter to open your Codex configuration directory
%userprofile%\.codex

  1. Your directory may contain the following files, but we only use three of them, and only two need configuration

  • config.toml: Codex's core configuration file, where relay service and MCP settings are configured

  • auth.json: Used to configure the ApiKey obtained from the relay service

  • AGENTS.md: Used to set Codex's global work prompts

Important

Many people may not have these three files after a fresh installation. You need to manually create these three files and write content to them

  1. Configure Config.toml

Copy the following configuration text to your config.toml file and save

disable_response_storage = true
model = "gpt-5.2"
model_provider = "goswitch"
model_reasoning_effort = "xhigh"
model_verbosity = "high"

[features]
web_search_request = true

[model_providers.goswitch]
base_url = "https://goswitch.online/v1"
name = "goswitch"
requires_openai_auth = true
wire_api = "responses"
  1. Configure ApiKey

Copy the following configuration text to your auth.json file

{
  "OPENAI_API_KEY": "xxx"
}

Review Create API Token, we need to create a Codex group token in GoSwitch, then click the copy button on the right and fill the key into the "xxx" part and save

  1. Test Dialogue

Enter the following command in the Windows terminal. When the content shown appears, test the conversation. If you receive a reply, configuration is successful. Start your Codex journey~

codex

GoSwitch documentation site.