Skip to main content
If you only want to use a third-party API in Codex CLI or Codex App, follow the regular Codex setup guide. If you also need plugins, Remote Control, mobile control, or official session sync, keep the official Codex login state and route model requests to the third-party API. The key is to separate two layers:
LayerHandlesRecommended source
Auth layerCodex App login state, plugins, Remote Control, session syncOfficial ChatGPT / Codex login
Inference layerModel requests, model list, API Key usageLLMEasy or another third-party API
Do not share auth.json, refresh_token, id_token, experimental_bearer_token, or any API Key in public issues, chats, screenshots, or logs.

Setup options

This is the recommended path. CC Switch exposes the login-preserving behavior as a UI setting, which is safer for most users.
1

Configure the Codex API provider first

Follow the Codex CLI steps in the CC Switch guide to install CC Switch and add a Codex API provider.Fill the provider fields with your LLMEasy settings:
FieldValue
Provider NameLLMEasy or your preferred name
Base URLhttps://www.llmeasy.ru/v1
API KeyYour LLMEasy API Key
API formatOpenAI Responses API
Save the provider, then set it to In Use.
CC Switch shows a configured third-party Codex API provider and highlights the settings entry.
2

Open CC Switch settings

Return to the CC Switch main window and click the Settings icon in the upper-left corner.
3

Enable Codex App Enhancements

In the General tab, find Codex App Enhancements and turn on Keep official login when switching third-party providers.This keeps the official Codex App login state when you switch to a third-party provider. After enabling it, Codex App can continue using official plugins, Remote Control, and mobile control while model requests use the selected third-party API provider.
The Codex App Enhancements toggle is enabled in the CC Switch settings page.
4

Restart Codex App and verify

Fully quit and reopen Codex App. Confirm:
  1. Codex App still shows the official account login state
  2. Plugins, Remote Control, or mobile control still work
  3. The active provider is the third-party API provider selected in CC Switch
  4. A test message returns normally

FAQ

How is this different from the regular Codex API setup?

The regular setup only makes model requests use a third-party API. This setup also keeps the official login state, so Codex App official features still work. If you do not need plugins, Remote Control, or mobile control, the regular Codex setup guide is simpler.

Why not put the API Key in auth.json?

In this mode, auth.json stores the official login state. The third-party API Key belongs in experimental_bearer_token inside config.toml. If you replace auth.json with a plain OPENAI_API_KEY object, Codex App may stop recognizing the official login state, and plugins or Remote Control may stop working.

References