Skip to content

Codex Proxy API Key Integration Guide

This site documents API key usage, code integration, and client configuration for tools such as Codex, Claude Code, OpenCode, Cline, Cursor, Trae, Windsurf, Roo Code, and Kilo Code.

Recommended setup order

For Codex, Claude Code, OpenCode, and similar tools, use this priority order:

  1. Edit the config file directly (preferred): each tool has an official config file — stable and reliable
  2. Environment variables: suitable for temporary or shell-session-scoped setup
  3. cc-switch tool (fallback): https://github.com/farion1231/cc-switch/releases — it automates the same config and environment-variable changes

1. Get an API Key

  1. Sign in to your account and open the console or account dashboard.
  2. Find the API Keys page from the account-related menu.
  3. Create a new key.
  4. Save the plaintext key shown at creation time. It looks like codex_xxxxxxxxxxxxxxxx.

WARNING

The plaintext API key is shown only once. After the dialog is closed, you usually need to create a new key if you did not save it.

2. Base URL

https://api.gemiaude.com/v1

3. Navigation

  • Code Integration: SDK and HTTP examples

Programming Tools

  • Programming Tools / Codex: Codex CLI setup
  • Programming Tools / OpenClaw: OpenClaw setup
  • Programming Tools / OpenCode: OpenCode setup
  • Programming Tools / Claude Code: Claude Code setup
  • Programming Tools / Cline: Cline setup with the OpenAI Compatible provider
  • Programming Tools / Cursor: Cursor setup with a custom OpenAI-compatible configuration
  • Programming Tools / Trae: Trae setup with a custom OpenAI-compatible configuration
  • Programming Tools / Windsurf: Windsurf setup with a custom OpenAI-compatible configuration
  • Programming Tools / Roo Code: Roo Code setup with the OpenAI Compatible provider
  • Programming Tools / Kilo Code: Kilo Code setup with the OpenAI Compatible provider

Chat & Entertainment

  • Chat & Entertainment / SillyTavern: SillyTavern OpenAI-compatible setup
  • Chat & Entertainment / TavernAI: TavernAI OpenAI-compatible setup
  • Chat & Entertainment / NativeTavern: NativeTavern iOS/macOS native client setup
  • Chat & Entertainment / Cherry Studio: Cherry Studio custom provider setup
  • Chat & Entertainment / Chatbot UI: Chatbot UI custom endpoint setup
  • Chat & Entertainment / LobeChat: LobeChat OpenAI proxy setup
  • Chat & Entertainment / NextChat: NextChat custom endpoint setup
  • Chat & Entertainment / Chatbox: Chatbox OpenAI-compatible setup

4. Authentication

Every request uses a standard Bearer token:

http
Authorization: Bearer codex_your_api_key

5. Supported Endpoints

MethodPathPurpose
GET/v1/modelsList models currently enabled on the gateway
POST/v1/chat/completionsOpenAI Chat Completions compatible endpoint
POST/v1/responsesOpenAI Responses compatible endpoint, recommended for Codex CLI and newer SDKs
POST/v1/embeddingsEmbeddings endpoint; defaults to text-embedding-3-small when model is omitted
POST/v1/messagesAnthropic Messages compatible endpoint for clients such as Claude Code

6. Common Errors

StatusMeaning
401Invalid or disabled API key, or missing Bearer token
402Account currently unavailable, or no usable request quota
403User banned, or access to the requested model is restricted
429Concurrency limit hit, or a rate limit was triggered
503No active upstream channel, or all channels failed

OpenAI-compatible gateway integration docs