Guide to Using the Codex Desktop App with Daya
Codex is OpenAI's intelligent work assistant. Beyond coding, reading projects, modifying code, and running commands, it can help organize information, draft documents, analyze data, and handle everyday work. After connecting Codex to the Daya API, you can use Daya's models in Codex.
This guide focuses on the Codex desktop app, which is what most users use. Codex CLI is optional; if you prefer working in a terminal, you can install it at the end of this guide.
Quick start
Step 1: Download and install the Codex desktop app
The Codex desktop app is included in OpenAI's ChatGPT desktop app. Open the official installer for your operating system:
Windows
Open the following address in your browser, then download and run the official installer:
https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi
This link is provided by OpenAI's official documentation and downloads the latest app through Microsoft's installation service. Follow the on-screen instructions; you do not need to open the Microsoft Store first.
macOS
Open the following official OpenAI direct link to download the .dmg installer:
https://persistent.oaistatic.com/codex-app-prod/ChatGPT.dmg
After downloading ChatGPT.dmg, open it, drag the app to the Applications folder, and launch it from Applications.
Linux
The Linux desktop app is currently in preview. Follow the official Linux installation guide for your distribution.
Step 2: Configure Daya and connect Codex
Connecting Codex to the Daya API only requires two files in the .codex folder; you do not need to modify the desktop app itself:
.codex/
├─ auth.json # Stores the Daya API Key
└─ config.toml # Stores the Daya API endpoint, model, and runtime settingsOn Windows, the folder is C:\Users\your-username\.codex\; on macOS/Linux, it is ~/.codex/. If the folder does not exist, create it first. The contents of the two files are described below.
File 1: auth.json
auth.json stores only your API Key:
{
"OPENAI_API_KEY": "sk-replace-with-your-api-key"
}You can get your API Key from the Daya Console.
The file path is:
- Windows:
C:\Users\your-username\.codex\auth.json - macOS / Linux:
~/.codex/auth.json
You can also create and open the file from the command line:
mkdir $env:USERPROFILE\.codex -ErrorAction SilentlyContinue
notepad $env:USERPROFILE\.codex\auth.jsonmkdir -p ~/.codex
nano ~/.codex/auth.jsonSave the file when you are finished.
File 2: config.toml
config.toml specifies the Daya API endpoint, the model to use, and Codex runtime settings:
model_provider = "dayaai"
model = "gpt-5.6-sol"
review_model = "gpt-5.6-sol"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
model_context_window = 1000000
model_auto_compact_token_limit = 900000
[model_providers.dayaai]
name = "dayaai"
base_url = "https://api.dayaai.com/v1"
wire_api = "responses"
requires_openai_auth = trueThe file path is:
- Windows:
C:\Users\your-username\.codex\config.toml - macOS / Linux:
~/.codex/config.toml
To open the file directly for editing, use:
notepad $env:USERPROFILE\.codex\config.tomlnano ~/.codex/config.tomlStep 3: Open Codex and choose a project
- Launch the ChatGPT desktop app you just installed.
- If the app asks you to choose a sign-in method, select API Key.
- Open Codex in the app.
- Select or open your local project folder, then send your first task.
Codex reads the auth.json and config.toml files above and uses the configured model through the Daya API. The desktop app, CLI, and IDE extensions share this user-level configuration; desktop-only users only need these two files.
What if your company or school network blocks the download links?
The Windows installer and macOS .dmg provided in this guide do not require opening chatgpt.com. If the official Windows installer is still unavailable, you can use:
- PowerShell:
winget install --id 9PLM9XGG6VKS -s msstore - Official Windows x64 MSIX
- Official Windows Arm64 MSIX
MSIX packages are suitable for administrators to download and deploy through enterprise software-distribution tools. If your company network also blocks get.microsoft.com or persistent.oaistatic.com, contact us for help.
Optional: Install Codex CLI
Install the CLI only if you want to use Codex from a terminal. Install Node.js LTS first, then run:
npm install -g @openai/codex --registry=https://registry.npmmirror.comAfter installation, enter a project directory and run codex. The CLI and desktop app share the configuration files created above, so you do not need to configure the API Key again.
If you already have the CLI installed, run codex app to open the desktop app.
Supported Models
You can change the model field in config.toml to switch to another model supported by the Daya API. For the list of Responses-compatible models, see the Daya model list.
Troubleshooting
API Key is invalid or unauthorized
Check the following:
auth.jsonis in the correct location.- The file contains valid JSON.
- The key is named exactly
"OPENAI_API_KEY". - The API Key is active.
- The API Key is complete.
Cannot connect to the Daya API
Check the following:
- Your network connection is working.
base_urlinconfig.tomlishttps://api.dayaai.com/v1.- Your firewall is not blocking the connection.
- You can run the following command to test connectivity:
curl https://api.dayaai.com/v1/modelsThe desktop app still says that the API Key is not configured
Check the following:
- The
auth.jsonpath is correct. - On Windows, the path should be
C:\Users\your-username\.codex\auth.json. - On macOS/Linux, the path should be
~/.codex/auth.json. - The JSON format is correct.
- You fully quit and reopened the Codex desktop app after saving.
Changes to the configuration do not take effect
Check the following:
- The
config.tomlpath is correct. - On Windows, the path should be
C:\Users\your-username\.codex\config.toml. - On macOS/Linux, the path should be
~/.codex/config.toml. - The TOML format is correct.
- You fully quit and reopened the Codex desktop app after saving.
The model is unavailable
Check the following:
- The model name is spelled correctly.
- The model supports the Responses protocol.
- Your account has permission to access the model.
- Confirm availability in the Daya model list.
Advanced Configuration
You can switch models for different tasks by changing the model field in config.toml.
model_provider = "dayaai" # Custom provider defined below.
model = "gpt-5.6-sol" # Default model for regular tasks.
review_model = "gpt-5.6-sol" # Default model for review tasks.
model_reasoning_effort = "xhigh" # Default reasoning effort; xhigh is recommended for a balance of quality and speed.
# Privacy and runtime behavior.
disable_response_storage = true # Do not store model responses on the server.
network_access = "enabled" # Allow Codex to use the network.
personality = "pragmatic" # Favor concise, practical responses.
# Context window and automatic compaction.
model_context_window = 1000000 # Declared model context-window size. It must match the model's capability to avoid frequent 429 errors.
model_auto_compact_token_limit = 900000 # Automatically compact the context when it approaches this token count.
# Command execution permissions.
approval_policy = "never" # Do not ask for confirmation before running commands.
sandbox_mode = "danger-full-access" # Do not restrict access with a filesystem sandbox.
# Custom model provider.
[model_providers.dayaai]
name = "dayaai" # Display name of the provider.
base_url = "https://api-us.dayaai.com/v1" # Recommended direct endpoint when the network allows it.
# base_url = "https://api.dayaai.com/v1" # Default provider API base URL.
wire_api = "responses" # Use the Responses API wire format.
requires_openai_auth = true # Inherit authentication from auth.json.Contact Us
If you encounter any issues during installation or use, please contact us:
- Customer Group: We strongly recommend scanning the QR code on the dayaai.com homepage to join the group, so you can report issues and communicate with us promptly.
- WeChat Support: dayaai_com
- Technical Support Email: cs@dayaai.com
