Code Integration
Use the gateway from scripts, backend services, SDKs, and custom wrappers.
Base URL
The gateway is compatible with the OpenAI, Claude (Anthropic), and Gemini API formats. Pick the Base URL that matches your protocol:
| API format | Base URL | Notes |
|---|---|---|
| OpenAI-compatible | https://okapi.pockgo.com/v1 | Paths like /v1/chat/completions, /v1/responses, /v1/embeddings |
| Claude (Anthropic) | https://okapi.pockgo.com | Service root; endpoint is /v1/messages |
| Gemini | https://okapi.pockgo.com | Service root; the client / SDK appends the API paths |
The endpoints and examples below use the OpenAI-compatible base URL.
Auth
http
Authorization: Bearer codex_your_api_keyIf you do not have an API key yet, go back to the home page section "Get an API Key" and create one from the API Keys page in your account menu.
Endpoints
| Method | Path |
|---|---|
GET /v1/models | List models |
POST /v1/chat/completions | Chat Completions |
POST /v1/responses | Responses |
POST /v1/embeddings | Embeddings |
When using environment variables in SDK code, prefer OPENAI_API_KEY instead of a project-specific variable name.
