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
- Sign in to your account and open the console or account dashboard.
- Find the
API Keyspage from the account-related menu. - Create a new key.
- 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://okapi.pockgo.com/v13. Navigation
Code Integration: SDK and HTTP examplesClients / Codex: Codex setup, withcc-switchas the recommended pathClients / OpenClaw: OpenClaw setup, withcc-switchas the recommended pathClients / OpenCode: OpenCode setup, withcc-switchas the recommended pathClients / Claude Code: Claude Code setup, withcc-switchas the recommended pathClients / Cline: Cline setup with the OpenAI Compatible providerClients / Cursor: Cursor setup with a custom OpenAI-compatible configurationClients / Trae: Trae setup with a custom OpenAI-compatible configurationClients / Windsurf: Windsurf setup with a custom OpenAI-compatible configurationClients / Roo Code: Roo Code setup with the OpenAI Compatible providerClients / 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_key5. Supported Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /v1/models | List models currently enabled on the gateway |
POST | /v1/chat/completions | OpenAI Chat Completions compatible endpoint |
POST | /v1/responses | OpenAI Responses compatible endpoint, recommended for Codex CLI and newer SDKs |
POST | /v1/embeddings | Embeddings endpoint; defaults to text-embedding-3-small when model is omitted |
POST | /v1/messages | Anthropic Messages compatible endpoint for clients such as Claude Code |
6. Common Errors
| Status | Meaning |
|---|---|
401 | Invalid or disabled API key, or missing Bearer token |
402 | Account currently unavailable, or no usable request quota |
403 | User banned, or access to the requested model is restricted |
429 | Concurrency limit hit, or a rate limit was triggered |
503 | No active upstream channel, or all channels failed |
