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

Recommended: use cc-switch for setup: https://github.com/farion1231/cc-switch/releases

Recommended for Codex, Claude Code, and OpenCode. It still writes each tool's official config and environment variables.

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
  • Clients / Codex: Codex setup, with cc-switch as the recommended path
  • Clients / OpenClaw: OpenClaw setup, with cc-switch as the recommended path
  • Clients / OpenCode: OpenCode setup, with cc-switch as the recommended path
  • Clients / Claude Code: Claude Code setup, with cc-switch as the recommended path
  • Clients / Cline: Cline setup with the OpenAI Compatible provider
  • Clients / Cursor: Cursor setup with a custom OpenAI-compatible configuration
  • Clients / Trae: Trae setup with a custom OpenAI-compatible configuration
  • Clients / Windsurf: Windsurf setup with a custom OpenAI-compatible configuration
  • Clients / Roo Code: Roo Code setup with the OpenAI Compatible provider
  • Clients / Kilo Code: Kilo Code setup with the OpenAI Compatible provider

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