Skip to content
NEWNano Banana 2.1 is live — Google's latest image model, from $0.0336 per image, native 4K, about half the price of the previous generationView model
HopBase
← Back to blog

One API Key for Claude, GPT, Gemini and DeepSeek | HopBase

Two kinds of service let one API key call Claude, GPT, Gemini and DeepSeek: hosted multi-model gateways such as OpenRouter and HopBase, and open-source gateways you run yourself, such as LiteLLM or One API (you still open an account with every model vendor). On HopBase, one key includes 1 to 10 groups and can cover Claude, GPT, Gemini, DeepSeek, Qwen, GLM, Kimi, Doubao, Hunyuan and Grok. GPT, Gemini and the Chinese models use the OpenAI-compatible base URL https://api.hop-base.com/v1; Claude uses Anthropic Messages at https://api.hop-base.com, without /v1. Within one protocol, you switch models by changing only the model field. Below are working curl and Python examples and a neutral comparison of the options.

How one key reaches many model families: two protocols

A multi-model gateway does not force every model into one request format. In practice, most models use the OpenAI-compatible format and Claude keeps Anthropic's native Messages format. Both protocols take the same key; only the base URL and path differ.

ProtocolBase URLEndpointModelsAuth
OpenAI-compatiblehttps://api.hop-base.com/v1POST /v1/chat/completions (some models also /v1/responses)GPT, Gemini, DeepSeek, Qwen, GLM, Kimi, Doubao, Hunyuan, GrokAuthorization: Bearer
Anthropic Messageshttps://api.hop-base.com (no /v1)POST /v1/messagesClaude (only here); Gemini, DeepSeek and Doubao also workx-api-key

Two common mistakes: Claude works only on /v1/messages, so sending it to /v1/chat/completions returns 404; and kimi-k3 runs only on Chat Completions, returning 404 on /v1/responses and /v1/messages.

The key's groups decide which models it can call

  1. In the console, open API Keys, create a key and pick 1 to 10 groups. Each group serves one model family, for example Claude, DeepSeek, Qwen, GLM or Kimi K3.
  2. Call GET /v1/models to see what the key can reach. It returns the union of the selected groups' models.
  3. Use only complete model IDs from that list. A model outside the key's groups returns 404 model_not_found; it is never silently swapped for another model.
  4. Each request is served and billed by the one group that covers its model, and usage records show which group that was.

Groups whose models overlap cannot share a key, and a subscription group must be a key's only group.

Code: switch models by changing only the model field

Step 1. List what the key can call:

curl https://api.hop-base.com/v1/models \
  -H "Authorization: Bearer sk-your-key"

Step 2. Call DeepSeek in the OpenAI-compatible format. For Qwen or GLM, change only model:

curl https://api.hop-base.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [{"role": "user", "content": "Reply with only: ok"}]
  }'

Step 3. In Python, loop over six model families with one OpenAI client. This assumes the key includes the GPT (Codex Plus or Codex Pro), Gemini, DeepSeek, Qwen, GLM and Kimi K3 groups:

# pip install openai
from openai import OpenAI

client = OpenAI(base_url="https://api.hop-base.com/v1", api_key="sk-your-key")

for model in ["gpt-5.6-sol", "gemini-3.8-flash", "deepseek-v4.1-flash",
              "qwen3.8-max", "glm-5.3", "kimi-k3"]:
    resp = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "Introduce yourself in one sentence."}],
    )
    print(model, "->", resp.choices[0].message.content)

Step 4. Call Claude with the Anthropic SDK. The base URL has no /v1, and the key needs a Claude group. Set max_tokens explicitly; if you omit it, it is filled in as 4096:

# pip install anthropic
import anthropic

client = anthropic.Anthropic(base_url="https://api.hop-base.com", api_key="sk-your-key")
msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Introduce yourself in one sentence."}],
)
print(msg.content[0].text)

If a model returns {"error":{"code":"model_not_found",...}}, call /v1/models again, then add the missing group to the key in the console.

Comparing the options

The table lists only facts we could check. The OpenRouter column comes from its public docs and public models API, checked on 2026-11-05. "Not listed" means the public pages do not say, not that the feature is missing.

CriterionEach vendor separatelySelf-hosted gateway (LiteLLM, One API)OpenRouterHopBase
Chinese model coverageSign up, verify and top up with each vendorWhatever vendor accounts you connectPublic model list includes DeepSeek, Qwen, GLM (z-ai), Kimi (moonshotai), ByteDance SeedDeepSeek, Qwen, GLM, Kimi, Doubao, Hunyuan
Claude on native MessagesNative on Anthropic's own APIDepends on project and versionDocs describe an Anthropic Messages-compatible input; Claude Code uses ANTHROPIC_BASE_URL=https://openrouter.ai/apiYes, https://api.hop-base.com + /v1/messages
Team quotas and departmentsManaged separately in each vendor consoleVirtual keys and budgets are common; departments are yours to configureOrganizations with a shared credit pool and admin / member roles; per-member limits not listedMembers, departments, quotas at key / member / department level
Billing currency and paymentEach vendor's own currency and methodsSoftware is free; you pay each vendorUSD credits; major credit cards, Alipay, USDCUSD pay-as-you-go; Alipay, WeChat Pay, Visa / Mastercard
Per-request reconciliationCheck each vendor invoice separatelyMatch gateway logs against every invoice yourselfActivity page filters historic usage by model and API keyCSV rows carry official cost, discount, exchange rate and charge: official cost × discount ÷ exchange rate = charge

Which to pick

  • One or two vendors, contracts already signed: go to each vendor separately.
  • Data-residency rules and ops headcount: self-host LiteLLM or One API. You control the software, and you also own the accounts, availability and reconciliation.
  • Mostly Western models, individual or small team: OpenRouter's catalog is broad and worth a look first.
  • Claude Code plus Chinese models, department quotas and line-by-line reconciliation: HopBase gives both protocols on one key. Prices are each vendor's official list price × the group discount; see the pricing page.

Per-model gotchas for the Chinese families (thinking fields, image input, tool calls) are in One OpenAI-compatible key for DeepSeek, Qwen, GLM, Kimi and Doubao. A wider platform comparison is in OpenRouter alternatives in 2026, and setup steps are in the quickstart. When you are ready, sign up and create a key.

FAQ

Can one API key call both Claude and GPT?

Yes, if the key includes both a Claude group and a GPT group. They use different protocols: GPT goes to Chat Completions or Responses on https://api.hop-base.com/v1, Claude to /v1/messages on https://api.hop-base.com. The key is the same; your client needs two base URLs.

Is there an OpenAI-compatible gateway for DeepSeek, Qwen, GLM and Kimi with one key?

Yes. Point the OpenAI SDK's base_url at https://api.hop-base.com/v1 and set model to an ID that /v1/models returns, such as deepseek-v4.1-flash, qwen3.8-max, glm-5.3 or kimi-k3. No vendor prefix is needed.

Why do I get 404 model_not_found after changing the model name?

The model is not in the key's groups, or the ID is misspelled. IDs are matched exactly and never auto-corrected. Call GET /v1/models to confirm valid IDs, then edit the key in the console to add the missing group (up to 10 per key).