Installing Codex and connecting it to the MyGPTLife API
Install Claude Code and Codex, configure your model and token, find Windows and Intel Mac downloads, and compare the costs and limits of three access options.

Install the command-line tools
Run node --version in a terminal. The current Claude Code npm package requires Node.js 22 or later. After installing Node.js, run the command for each tool you need.
npm install -g @anthropic-ai/claude-code
npm install -g @openai/codex
Check the installation with claude --version or codex --version. If Windows PowerShell reports that scripts are disabled, set RemoteSigned for the current user and try again.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Set the Codex model and gateway
Open ~/.codex/config.toml, creating it if necessary. On Windows the directory is %USERPROFILE%\.codex. Put these settings before any TOML table header. Update existing keys in place.
model_reasoning_effort = "medium"
model = "gpt-6-astra"
openai_base_url = "https://api4.mygptlife.com/v1"
Create a token in the MyGPTLife console. Open Codex, select API key sign-in and enter your token. When using CC-Switch, set the Codex base URL to https://api4.mygptlife.com/v1.
Create or manage a MyGPTLife token
Desktop downloads and Chinese localization on Windows
Extract the legacy Windows RAR and open Codex.exe in the app folder. On an Intel Mac, choose the x64 DMG. To apply the Windows Chinese localization, quit Codex, download and open the localizer, follow its prompts, then reopen Codex.
Download legacy Codex for Windows
Download the Windows Chinese localizer
Compare three ways to access Codex
MyGPTLife quotes 10–20% of the corresponding official API list price. Compare the same model and billing unit. Balance, rate limits and model permissions determine actual availability.
| No. | Item | ChatGPT account | OpenAI API | MyGPTLife API |
|---|---|---|---|---|
| 1 | Network access | Subject to supported regions and networks | Subject to supported regions and networks | Supports connections from mainland China |
| 2 | Usage allowance | Plan-specific allowance | Metered, subject to balance and rate limits | Metered, subject to balance and token group |
| 3 | gpt-image-2 image count | Depends on your plan and feature availability | Metered within account limits | Metered within token limits |
| 4 | Veo 3.1、Omni-Flash | Depends on available product features | See the official model catalog. Google provides Veo 3.1 | Depends on the model catalog and token group |
| 5 | Nano Banana models | No native endpoint | No native endpoint | Available with an eligible token group |
| 6 | Account restrictions | Account usage rules apply | API usage rules apply | Platform and upstream rules apply |
| 7 | Payment | Payment methods vary by region | Payment methods vary by region | RMB payments via Alipay and WeChat Pay |
| 8 | Contracts and invoices | Subscription receipts are available in the account | Billing and contracts depend on the customer plan | Contracts and invoicing available |
| 9 | Price | Subscription pricing | Official per-model rates | 10–20% of the official API list price, subject to the model price shown in the console |
| 10 | Technical support | Help center and plan-specific support | Depends on the service plan | 16 hours of WeChat and phone support daily |
| 11 | Typical users | Individuals | Developers, teams and companies | Small teams and companies |
| 12 | Setup | Requires a suitable account and connection | Requires API and billing setup | Enter the gateway address and token |
| 13 | Control Codex from the ChatGPT mobile app | Depends on account and client features | An API key alone does not enable this feature | A gateway token alone does not enable this feature |
| 14 | Billing model | Recurring subscription with usage limits | Pay as you go | Pay as you go |
A template for Codex instructions
Copy the template into Codex custom instructions or the project’s AGENTS.md.
For image generation, use gpt-image-2. Read the key from Codex auth and the base URL from its config. The API provider returns a hosted image URL.
Transcribe audio locally by default, or use API4’s gpt-4o-transcribe.
For image watermark removal, use API4’s nano-banana. Read the key from Codex auth and the base URL from its config.
