Base URLs and protocols
Choose the HopBase OpenAI or Anthropic compatible URL for each model and client.
| Scenario | Protocol | Base URL |
|---|---|---|
| Claude models (Claude Code, Anthropic SDK) | Anthropic Messages only — /v1/chat/completions and /v1/responses are not supported | https://api.hop-base.com |
| Codex CLI | OpenAI Responses | https://api.hop-base.com/v1 |
| GPT chat | OpenAI Chat Completions or Responses; Anthropic Messages also works, so Claude Code connects directly | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| Gemini chat, Gemini (all models, incl. image) group | OpenAI Chat Completions or Responses; Anthropic Messages also works, so Claude Code connects directly. Codex CLI is not supported | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| Gemini chat, Gemini Official Direct group | OpenAI Chat Completions or Responses; Anthropic Messages also works, so Claude Code connects directly through CC Switch (use a Gemini model ID as the model name). Tool calling works on all three protocols (details) | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| Grok chat | OpenAI Chat Completions or Responses; Anthropic Messages also works, so Claude Code connects directly. Codex CLI is not supported | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| Qwen chat | OpenAI Chat Completions or Responses; Anthropic Messages, so Claude Code connects directly | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| Doubao Seed chat | OpenAI Chat Completions or Responses; also Anthropic Messages | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| DeepSeek V4 / V4.1 | OpenAI Chat Completions or Responses; Anthropic Messages, so Claude Code connects directly | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
DeepSeek and GLM US Region (-us) | OpenAI Chat Completions, Responses, and Anthropic Messages, so Claude Code connects directly — see US Region | https://api.hop-base.com/v1; Anthropic: https://api.hop-base.com |
| GLM-5.3 / GLM-5.3 Flash, GLM Official Direct group | OpenAI Chat Completions only — /v1/responses and /v1/messages are not supported and return 400. Codex CLI cannot connect; Claude Code needs CC Switch local routing | https://api.hop-base.com/v1 |
| Kimi K3 | OpenAI Chat Completions only — /v1/responses and /v1/messages are not supported and return 404. Codex CLI cannot connect; Claude Code needs CC Switch local routing | https://api.hop-base.com/v1 |
| GPT Image, Gemini Banana, Seedream | OpenAI Images | https://api.hop-base.com/v1 |
A protocol not listed for a model is not supported. Gemini also has no native :generateContent path, and this API does not accept x-goog-api-key.
HopBase supports both OpenAI and Anthropic compatible protocols; which one to use depends on the client and model type, not the key format.
Common endpoints
Moving over from OpenAI, OpenRouter or Anthropic? See Switch to HopBase. Response fields for /v1/models, /v1/usage and the public catalog are in Account and catalog API.
| Capability | Endpoint |
|---|---|
| Model discovery | GET /v1/models |
| Balance and usage for the current key | GET /v1/usage |
| Public model catalog and list prices (no key needed) | GET /api/v1/models/pricing |
| OpenAI chat | POST /v1/chat/completions |
| OpenAI Responses | POST /v1/responses |
| Anthropic Messages | POST /v1/messages |
| Image generation | POST /v1/images/generations |
| Image editing | POST /v1/images/edits |
| Text-to-speech | POST /v1/audio/speech / POST /v1/t2a_v2 |
| Async image task polling | GET /v1/images/tasks?task_id= |
| Asset upload (reference images and video for async tasks) | POST /v1/sd/assets |
| Video generation submission | POST /v1/video/generate |
| Video task polling | GET /v1/video/tasks/{task_id} |
| Kling face detection | POST /v1/kling/faces |
| Kling subjects | POST /v1/kling/subjects / GET /v1/kling/subjects |
| Wan / HappyHorse video submission | POST /api/v1/services/aigc/video-generation/video-synthesis |
| Wan / HappyHorse task polling | GET /api/v1/tasks/{task_id} |
POST /v1/video/generate and GET /v1/video/tasks/{task_id} are shared by every asynchronous video family — Seedance, MiniMax, Kling, and Grok video all submit and poll through the same two paths; only the request body and model ID change. Kling needs only your HopBase Base URL and API key.
Wan 3.0 and HappyHorse do not use the /v1/video/generate path above. They keep the official API's original path directly under the host: https://api.hop-base.com/api/v1/services/aigc/video-generation/video-synthesis — there is no additional /v1 in front of that /api/v1/... segment.
Configuring a Claude key as OpenAI Compatible sends requests to the wrong protocol path and returns 404, "The current platform does not support this API path." Change the provider type to Anthropic and remove /v1 from the Base URL.
Next steps
- OpenAI SDK: Base URL, keys, and chat examples for the OpenAI protocol
- Anthropic SDK: the Anthropic Messages protocol, without /v1
- Available models: find the model IDs available to a key