Get API

GET API · Developer integrations

Connect Codex to Get API on desktop and in the CLI

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.

Confirm the Codex and Responses contract first

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.

  • Run codex --version before configuration
  • Place Provider settings in the user-level config.toml
  • Select a model from the current Get API catalog

Keep the key, address, and model in one configuration

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.

  • Match the environment variable name to env_key
  • Keep /v1 in the Base URL
  • Never place the real key in config.toml

Restart after switching and use a pass/fail check

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.

  • Quit every running Codex process
  • Use one minimum task first
  • Record the HTTP state instead of blind retries

Configure the Codex Provider

The CCSwitch desktop path and CLI path share the same Get API key and Base URL.

  1. Install Codex from the current official entry and check it

    Choose the method for your operating system on the current official Codex installation page, then run codex --version to verify the command.

  2. Create a Get API key for Codex

    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.

  3. Set the environment variable and user configuration

    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.

  4. Select Codex in CCSwitch

    For the desktop path, open the Codex Provider area in CCSwitch and confirm that the Get API configuration is the one being enabled.

    Codex Provider selector in CCSwitch
    Select Codex in CCSwitch before managing the Provider. The reference UI is shown in Chinese.
  5. Quit and restart Codex completely

    After saving or switching the Provider, quit every running Codex process and reopen the client so it reads the new configuration.

  6. Send a minimum task and verify the result

    Start with a simple task. On failure, inspect the environment variable, Base URL, model, Responses route, and status code.

User-level Codex config.toml

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"

Codex integration troubleshooting

Diagnose by state; do not reinstall, rotate the key, and switch models simultaneously.

SymptomCheckActionSuccess check
codex command is missingInstallation completion and refreshed terminal PATHUse the current official install page or reopen the terminal, then run codex --versionThe command prints version information
401GETAPI_PRO_API_KEY exists and matches env_keySet it again in a controlled environment and confirm that the key is enabledStartup no longer reports authentication failure
404 or protocol errorbase_url keeps /v1 and wire_api equals responsesCorrect the user config and fully restart CodexThe request reaches the Responses route
Model unavailablemodel comes from the live catalog and belongs to the key groupUse a currently accessible identifier instead of an old screenshotThe minimum task receives a model response
Configuration unchangedWindow-only close, wrong config layer, or remaining processSave the user-level file, quit all Codex processes, and restartThe active Provider matches the new configuration

Frequently asked questions

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".

Why should the real key stay out of config.toml?

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.

Why did a CCSwitch Provider change not take effect?

A running Codex process may still hold the old configuration. Save the selection, quit every Codex process, restart it, and test one minimum task.

Can this Codex setup use /chat/completions instead?

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