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 DeepSeek, Qwen, GLM, Kimi and Doubao

The short answer: you can call DeepSeek, Qwen, GLM, Kimi and Doubao Seed with one OpenAI-compatible API key, and the same key can also cover Claude and GPT. On HopBase, set the OpenAI SDK's base URL to https://api.hop-base.com/v1, add each model family's group to your key in the console (up to 10 groups per key), then change only the model field: deepseek-v4.1-flash, qwen3.8-max, glm-5.3, kimi-k3, doubao-seed-2-1-pro-260628. Claude uses the Anthropic SDK with the base URL https://api.hop-base.com (no /v1). Billing is in USD from one balance, and every non-streaming response reports its exact charge. The part that breaks integrations is not the endpoint but the per-model differences: Kimi K3 needs include_reasoning to return its thinking, two Doubao models ignore tool_choice, Qwen bills in context tiers, and DeepSeek V4.1 Flash has peak and off-peak rates. This guide lists them all, and we checked each one with a live request on 2026-10-29.

Why one key instead of five accounts

Chinese open-weight and frontier models are now a default part of many stacks: DeepSeek for cheap reasoning, Qwen and GLM for long context, Kimi K3 for agentic coding, Doubao Seed for multimodal chat. Going direct means five developer consoles, five balances and five invoices. Several of those consoles are built mainly for mainland-China users, with Chinese-language interfaces, phone verification or CNY payment. Each vendor's "OpenAI-compatible" API also has its own extensions.

A gateway gives you one account, one USD balance and one base URL. It does not remove the per-model differences, which is why most of this article is about them.

Model lineup and list prices

All IDs below are live in the public catalog. Prices are official list prices per million tokens where the maker publishes a USD price; for the others, see the live pricing page, which also shows cached-input prices for every model.

FamilyModel IDsContext / max outputProtocolsList price (in / out per 1M)
DeepSeekdeepseek-v4.1-flash, deepseek-v4.1-flash-1017, deepseek-v4-pro-202606, deepseek-v4-flash-2026051M / up to 393,216Chat Completions, Responses, Anthropic MessagesSee live pricing
Qwen (Alibaba)qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.7-flash1M / 131,072Chat Completions, ResponsesSee live pricing
GLM (Zhipu)glm-5.3, glm-5.3-flash1M / up to 131,072Chat CompletionsSee live pricing
Kimi (Moonshot)kimi-k31,048,576 / 32,768Chat Completions only$3 / $15
Doubao Seed (ByteDance)doubao-seed-2-1-pro-260628, doubao-seed-2-1-pro-260915, doubao-seed-2-1-lite-260915, doubao-seed-2-1-turbo-260628 and three more128K-1M / 32K-256KChat Completions, Responses, Anthropic MessagesSee live pricing
Claude, GPTclaude-sonnet-5-5, gpt-6-sol and morePer modelClaude: Anthropic Messages; GPT: Chat Completions, ResponsesSonnet 5.5: $2 / $10; GPT-6 Sol: $2 / $10

DeepSeek and GLM also have a separate set of US Region IDs ending in -us (for example deepseek-v4.1-flash-us and glm-5.3-us). These have their own group, their own prices and all three protocols; see the US Region guide.

Setup in three steps

  1. Sign up at api.hop-base.com with an email address or a Google or GitHub account, and open API Keys.
  2. Create a key and add the groups you need: DeepSeek, Qwen, GLM, Kimi K3, Doubao Seed, plus a Claude group and a GPT group if you want them on the same key. That is seven groups, within the limit of 10 per key. If two groups on one key serve the same model (two Claude groups, for example), the dialog asks you to choose which group serves it before it saves.
  3. List the models the key can reach, and use only the IDs it returns:
export HOPBASE_API_KEY=sk-your-key
curl https://api.hop-base.com/v1/models -H "Authorization: Bearer $HOPBASE_API_KEY"

One client, five model families

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.hop-base.com/v1",
                api_key=os.environ["HOPBASE_API_KEY"])

models = ["deepseek-v4.1-flash", "qwen3.8-max", "glm-5.3",
          "kimi-k3", "doubao-seed-2-1-pro-260628"]

for m in models:
    raw = client.chat.completions.with_raw_response.create(
        model=m,
        messages=[{"role": "user", "content": "In one sentence: what is a vector database?"}],
        max_tokens=2000,
    )
    resp = raw.parse()
    print(m, "|", resp.choices[0].message.content.strip()[:80],
          "| cost USD:", raw.headers.get("X-HopBase-Cost-USD"))

Every billed non-streaming response carries X-HopBase-Cost-USD, the exact amount taken from your balance, and the same value appears as usage.cost_usd in the JSON. Streaming responses do not carry it, because headers are sent before generation starts. Check streamed requests on the console's Usage page. The max_tokens value is generous on purpose: most of these models think by default, and thinking tokens count toward the limit.

Claude goes through the Anthropic SDK on the same key:

from anthropic import Anthropic
claude = Anthropic(base_url="https://api.hop-base.com", api_key=os.environ["HOPBASE_API_KEY"])
msg = claude.messages.create(model="claude-sonnet-5-5", max_tokens=512,
                             messages=[{"role": "user", "content": "Hello"}])

Per-model gotchas

Kimi K3

  • Its thinking is returned in reasoning_content only when the request sets "include_reasoning": true; thinking and reasoning_effort have no effect. With the OpenAI SDK, pass it through extra_body={"include_reasoning": True}. In our test, the same prompt returned no reasoning_content without the flag and returned it with the flag.
  • max_tokens tops out at 32,768 and includes thinking; n must be 1; temperature is 0-1; top_p and the frequency/presence penalties are ignored.
  • Images must be base64; an image URL returns 400. /v1/responses and /v1/messages return 404, so Claude Code and Codex reach it only through a local router such as CC Switch (see the Kimi K3 guide).

DeepSeek

  • deepseek-v4.1-flash and deepseek-v4.1-flash-1017 follow DeepSeek's published peak and off-peak schedule. Peak is 09:00-12:00 and 14:00-18:00 Beijing time on weekdays, and off-peak is half price. A request is priced by the moment it finishes. If cost matters, run batch jobs outside those hours.
  • deepseek-v4-pro-202606 and deepseek-v4-flash-202605 are billed at one all-day rate based on the peak list price.
  • deepseek-v4.1-flash-1017 is the 2026-10-17 release; deepseek-v4.1-flash stays on the September release. Both read images through standard image_url parts, while V4 Pro and V4 Flash reject images with a 400. Pick the version by model ID.
  • All four models answer on Chat Completions, Responses and Anthropic Messages; we sent the same prompt to three of them on each endpoint. Thinking comes back in reasoning_content on Chat Completions, not in content.

Qwen

  • Billing is tiered by context: once one request's input crosses a threshold, the whole request is billed at that tier. qwen3.7-plus steps up above 256K and qwen3.7-flash above 32K; qwen3.8-max, qwen3.8-flash and qwen3.7-max have a single tier. Prompt caching does not keep you under a threshold.
  • Pass enable_thinking: false (through extra_body) to turn reasoning off for latency-sensitive calls. All models except qwen3.7-max accept image and video input.

GLM

  • glm-5.3 is text-only, and an image returns 400. Both GLM models serve Chat Completions only, so Codex CLI, which speaks only Responses, cannot use them; the US Region glm-5.3-us accepts all three protocols.
  • glm-5.3-flash always thinks and returns it in reasoning_content. Recommended settings are temperature 1 and top_p 0.95, plus tool_stream: true when you stream tool calls. It accepts text, image, video and file input.

Doubao Seed

  • doubao-seed-evolving and doubao-seed-2-1-pro-260915 ignore tool_choice. In our test, forcing a named function made doubao-seed-2-1-pro-260628 call it, while doubao-seed-2-1-pro-260915 answered in plain text. If you need to force or disable tool calls, use doubao-seed-2-1-pro-260628 or doubao-seed-2-1-lite-260915.
  • All models except doubao-seed-character-260628 think by default. Don't confuse doubao-seed-* chat IDs with doubao-seedance-* video IDs.

Handling errors across families

Gateway errors on the OpenAI protocol use one shape: {"error": {"code": ..., "message": ..., "type": ...}}. Branch on the HTTP status and code, never on the message text, which follows your Accept-Language header. The codes you will meet most often:

  • 404 model_not_found: the model is not in any group on this key. Refresh /v1/models.
  • 402 insufficient_quota: the balance is empty or this key's own spend cap is reached.
  • 429 user_concurrency_limit / apikey_concurrency_limit: too many requests in flight. Requests are rejected immediately, not queued, so retry with backoff.

Requests that fail before producing output are not billed.

How to choose a gateway for Chinese models

There are several ways to get one key for these models, from self-hosted proxies to managed services. Before you commit, check:

  1. Exact, dated model IDs (for example deepseek-v4.1-flash-1017), not just "deepseek-latest".
  2. Whether model-specific parameters such as include_reasoning, enable_thinking and reasoning_content pass through intact.
  3. Whether per-request cost is visible through the API, and whether failed requests are free.
  4. Whether you can verify that the model you asked for is the one answering. Our reproducible fidelity test works against any provider.
  5. Whether Claude and GPT can live on the same key and balance as the Chinese models.

FAQ

Can I use DeepSeek, Qwen and Kimi with the OpenAI Python SDK?

Yes. Set base_url="https://api.hop-base.com/v1" and use the model ID. Model-specific fields such as include_reasoning (Kimi) or enable_thinking (Qwen) go in extra_body.

Do I need a Chinese phone number or Chinese payment method?

No. You sign up at api.hop-base.com with an email address or a Google or GitHub account, and your balance and charges are in USD. The Recharge page shows the payment currency, fees and credited amount before you pay.

Can one key call both Claude and DeepSeek?

Yes, if the key includes both groups. Claude uses the Anthropic protocol at https://api.hop-base.com; DeepSeek uses the OpenAI protocol at https://api.hop-base.com/v1. Each request is billed by the group that serves its model.

Why does Kimi K3 not return its reasoning?

Kimi K3 only returns reasoning_content when the request sets "include_reasoning": true. Thinking tokens are billed as output either way and count toward max_tokens.

Where are the full parameter limits?

See the docs for DeepSeek, Qwen, GLM-5.3, Kimi K3 and the model reference. Prices are on hop-base.com/pricing.