What does Codex need to connect to Get API?
A Get API key, https://relay-api.getapi.pro/v1, a currently accessible model identifier, and a custom Provider with env_key and wire_api = "responses".
GET API · Developer integrations
Codex CLI currently supports custom model providers with base_url, env_key, and wire_api = "responses", the only supported wire value. The Get API Codex configuration uses https://relay-api.getapi.pro/v1 and a key from the same-site console; select the model from the current catalog. The verified desktop flow can use CCSwitch to select the Provider, followed by a complete Codex restart.
The current Codex configuration reference supports custom Providers and lists responses as the only wire_api value. Get API also registers the /v1/responses route, so this guide uses a Responses configuration rather than treating the chat endpoint as substitute evidence.
The key comes from the getapi.pro console, the Base URL uses relay-api.getapi.pro, and model must be an identifier currently available to that key. Mixing another service or an old screenshot can cause authentication and routing failures.
A running client may not reload CCSwitch or file changes. Quit Codex completely, reopen it, send a simple task that does not depend on project context, and inspect the actual Provider, model, and status when it fails.
The CCSwitch desktop path and CLI path share the same Get API key and Base URL.
Choose the method for your operating system on the current official Codex installation page, then run codex --version to verify the command.
Create a key in the main-site console, choose a current group that reaches the target model, and copy an available model identifier from the catalog.
Store the real key as GETAPI_PRO_API_KEY and add the Provider below to the user-level config.toml. Do not commit the credential to a project.
For the desktop path, open the Codex Provider area in CCSwitch and confirm that the Get API configuration is the one being enabled.

After saving or switching the Provider, quit every running Codex process and reopen the client so it reads the new configuration.
Start with a simple task. On failure, inspect the environment variable, Base URL, model, Responses route, and status code.
Replace your-model-name with a model currently accessible to the key. Keep the real credential only in the GETAPI_PRO_API_KEY environment variable.
model_provider = "getapi_pro"
model = "your-model-name"
[model_providers.getapi_pro]
name = "GetAPI Pro"
base_url = "https://relay-api.getapi.pro/v1"
env_key = "GETAPI_PRO_API_KEY"
wire_api = "responses"Diagnose by state; do not reinstall, rotate the key, and switch models simultaneously.
| Symptom | Check | Action | Success check |
|---|---|---|---|
| codex command is missing | Installation completion and refreshed terminal PATH | Use the current official install page or reopen the terminal, then run codex --version | The command prints version information |
| 401 | GETAPI_PRO_API_KEY exists and matches env_key | Set it again in a controlled environment and confirm that the key is enabled | Startup no longer reports authentication failure |
| 404 or protocol error | base_url keeps /v1 and wire_api equals responses | Correct the user config and fully restart Codex | The request reaches the Responses route |
| Model unavailable | model comes from the live catalog and belongs to the key group | Use a currently accessible identifier instead of an old screenshot | The minimum task receives a model response |
| Configuration unchanged | Window-only close, wrong config layer, or remaining process | Save the user-level file, quit all Codex processes, and restart | The active Provider matches the new configuration |
A Get API key, https://relay-api.getapi.pro/v1, a currently accessible model identifier, and a custom Provider with env_key and wire_api = "responses".
Configuration files can be synchronized, backed up, or committed accidentally. Store only GETAPI_PRO_API_KEY in the file and keep the real value in a controlled local environment or secret manager.
A running Codex process may still hold the old configuration. Save the selection, quit every Codex process, restart it, and test one minimum task.
This guide does not assume that. The current Codex custom Provider contract supports only the responses wire_api, so the Get API Responses route must be available.
Business inquiries: business@honeykid.cn