Two changes affected how teams connect to the Moonshot API in 2026: the open platform moved to platform.kimi.com, and the old moonshot-v1 series was retired on August 31. Many teams who report that "the Moonshot API stopped working" are actually hitting a 404 caused by an expired model name, not a platform shutdown.

The first question for any replacement plan is therefore: do you want to change vendors, or do you only need to migrate the model name to kimi-k3? This article compares three common alternatives in the Chinese market—DeepSeek, Qwen and GLM—focusing on long context, Chinese writing, code, agents, access methods and pricing models. It ends with a scenario table and a migration checklist. Models and prices follow the model pricing page.

Note: Moonshot, Kimi, DeepSeek, Qwen, GLM and other names are trademarks of their respective owners. This article discusses technical selection only. Platform models, quotas and terms change; verify them against official documentation before purchasing.

1. First, confirm which layer you are replacing

Only three situations justify starting a platform switch:

  • The current model clearly falls short, for example weak recall over long contexts or unstable tool calling.
  • Rate-limit tiers persistently fail to meet business needs, and raising the account tier is not worthwhile.
  • Procurement, invoicing or data-compliance requirements force a change of contracting entity.

If the problem is simply more 404, 401 or 429 responses, troubleshoot the engineering side first: has the model name been retired, do the key and endpoint belong to the same site, is the SDK retrying automatically, and is every request using the heaviest model? These problems will follow you to a new platform.

The Moonshot API is aimed at developers and is not part of the same billing system as the Kimi web app or membership. This article is about API selection, not a comparison of consumer products.

2. The four platforms at a glance

Moonshot (Kimi open platform): The China site is platform.kimi.com with the endpoint https://api.moonshot.cn/v1; the international site is platform.kimi.ai with https://api.moonshot.ai/v1. Accounts, balances and keys are completely separate between the two sites. The current main models are kimi-k3 (1M context), kimi-k2.7-code (256K, code-oriented) and kimi-k2.6 (256K, text and visual input). The API is compatible with OpenAI Chat Completions and Responses, and also offers an Anthropic Messages-compatible endpoint.

DeepSeek: The current API models are deepseek-flash and deepseek-v4-pro, listed with 1M context and up to 384K output. Billing separates cache hits from misses and has peak and off-peak periods, with lower prices off-peak. It suits batch work, code and cost-sensitive tasks.

Qwen (Alibaba Cloud Model Studio): The main text models are qwen3.8-max, qwen3.7-plus and qwen3.8-flash, covering high-capability, balanced and fast tiers. The OpenAI-compatible endpoint is a workspace-specific domain shaped like https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1; the legacy dashscope.aliyuncs.com domain is also retained. Keys are bound to a region, so a Beijing key calling an overseas region returns 401.

GLM (Zhipu): The current main models include GLM-5.3, GLM-5.3-Flash, GLM-5.2 and GLM-5.1. GLM-5.3 is listed with 1M context and 128K output. The endpoint is https://open.bigmodel.cn/api/paas/v4, and the request format is close to OpenAI Chat Completions. A separate Coding plan endpoint also exists, so confirm whether you are using the general API or the Coding endpoint.

3. Six dimensions, one by one

Long context: All four vendors' high-end models have reached the 1M level, so window size alone is no longer the differentiator. What matters is recall in the middle of long documents, citation accuracy, how input tokens are billed, and maximum output. When an entire contract is passed in repeatedly, input cost dominates the bill.

Chinese writing: Moonshot, GLM and Qwen are all strong on Chinese corpora, while DeepSeek is stable on Chinese technical content. Differences in tone are hard to judge from leaderboards. Run a blind evaluation with 30 to 50 samples from your own industry, and focus on terminology, tone and the human rework rate.

Code: Moonshot offers the dedicated kimi-k2.7-code model, DeepSeek V4 Pro suits repository-level tasks, GLM provides a Coding plan and the CodeGeeX family, and Qwen mostly relies on its general Max and Plus models for coding. Judge by test pass rate and instruction following in long files, not by a single-demo task.

Agents and tool calling: Moonshot's protocol coverage is broad, which suits projects already running both Anthropic and OpenAI stacks; DeepSeek's thinking mode suits multi-step reasoning; GLM has broad adaptation within the domestic agent ecosystem; Qwen's official documentation notes that tool calling cannot currently be combined with stream=True, so verify before building a real-time agent.

Access: All four provide OpenAI-compatible endpoints, so migration usually means changing only the Base URL, key and model name. Regional isolation is common, however: Moonshot separates its China and international sites, Qwen separates Beijing, Singapore, Virginia and Tokyo, and GLM and DeepSeek also separate permissions by account system. A key that does not match the endpoint is a frequent cause of 401.

Pricing model: Moonshot divides accounts into Tier0 through Tier5 by cumulative top-up, and the tier determines concurrency, RPM, TPM and TPD; DeepSeek bills cache hits, input and output separately and has peak and off-peak prices; Qwen bills by region and model tier; GLM bills by model and plan. A low list price does not mean a low total cost, as the next section explains.

4. Scenario comparison table

Scenario Validate first Second choice Main criteria
Million-word documents, whole-library Q&A Moonshot kimi-k3 DeepSeek V4, GLM-5.3 Mid-document recall, citation accuracy, input cost
Chinese content, review, customer service Moonshot, GLM Qwen, DeepSeek Tone, terminology accuracy, human rework rate
Code generation, repository Q&A Moonshot k2.7-code DeepSeek V4 Pro, GLM Coding Test pass rate, long-file instruction following
Multi-step agents, tool calling Moonshot, GLM DeepSeek Tool-call stability, checkpoint recovery, protocol compatibility
Cost-sensitive batch jobs DeepSeek, Qwen Flash GLM Flash, smaller Moonshot models Total cost per completed, acceptable task
Domestic enterprise procurement and invoicing Qwen, GLM, DeepSeek Moonshot Contracting entity, invoicing, data terms
Multi-region overseas operations Qwen overseas regions Moonshot international site Regional availability, key ownership, data policy

"Validate first" does not mean going straight to production. It means running a round of your own evaluation set before committing.

5. How to compare pricing models fairly

Do not rank vendors by the listed price per million tokens. The real bill is driven by the input-to-output ratio, cache hit rate, output length, retry count and failed requests.

  1. Select 30 to 50 real tasks covering simple, medium and complex levels.
  2. Write acceptance criteria for each task and have at least two people score independently.
  3. Run the same input batch through all four models, keeping temperature and output limits as consistent as possible.
  4. Record quality scores, time to first token, p95 total latency, input and output tokens, and error rate.
  5. Compare the cost per completed, acceptable task rather than the price per million tokens.
  6. Include caching, retries, rate-limit waiting and human rework in the total cost.

If a candidate platform is 30 percent cheaper but doubles the rework rate, the real cost is usually higher. Peak and off-peak prices, cache prices and plan prices all need to be normalized to the same business cycle before comparison.

6. Migration checklist

  1. Inventory every hard-coded model name in the code, especially retired or unmaintained names such as moonshot-v1-* and kimi-latest.
  2. Confirm that the target platform's Base URL, region and key belong to the same system.
  3. Check parameter differences, such as the output-limit field, thinking-mode switch and tool-calling format.
  4. Build an evaluation set and baseline; record the current Moonshot version's quality, latency and usage first.
  5. Run a small dual-traffic test through the OpenAI-compatible endpoint without changing the business code structure.
  6. Compare failure cases, error types and actual billing, and confirm there are no hidden retries.
  7. Roll out gradually at 5 to 10 percent of traffic, with quality alerts and human review.
  8. Keep a rollback switch and observe at least one full business cycle before expanding the share.
import os
from openai import OpenAI

PROVIDERS = {
    "moonshot": ("https://api.moonshot.cn/v1", "kimi-k3"),
    "deepseek": ("https://api.deepseek.com/v1", os.environ["DEEPSEEK_MODEL"]),
    "qwen": (os.environ["QWEN_BASE_URL"], os.environ["QWEN_MODEL"]),
    "glm": ("https://open.bigmodel.cn/api/paas/v4", os.environ["GLM_MODEL"]),
}

def ask(provider: str, prompt: str) -> str:
    base_url, model = PROVIDERS[provider]
    client = OpenAI(api_key=os.environ[f"{provider.upper()}_API_KEY"], base_url=base_url)
    resp = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": prompt}],
        max_completion_tokens=800,
    )
    return resp.choices[0].message.content

for name in PROVIDERS:
    print(name, ask(name, "Explain your context window limits in three sentences"))

Model names are read from environment variables; fill them in according to each platform's model list and the pricing page on this site. This evaluation code lets you compare providers side by side without rewriting an SDK for each one.

7. You do not have to choose one: hybrid routing is more common

Most teams end up with a division of labor rather than a full replacement:

  • Send very long documents to kimi-k3 or an equivalent long-context model, and ordinary Q&A to a cheaper tier.
  • Send code tasks to a dedicated code model and Chinese customer service to a model with steadier tone.
  • Switch to a backup when the primary model returns 429 or 5xx; do not switch automatically on 401, 404 or content-safety errors, because a different model will not fix a configuration problem.
  • Use a unified gateway to consolidate keys, billing and logs, avoiding separate credentials and invoicing processes for every vendor.
  • Keep prompts model-agnostic; do not hard-code one vendor's format.

Routing rules must be observable: log which model actually served each request, why a switch happened, and the quality and latency after the switch. "Smart routing" without logs is just a black box.

FAQ

Is the Moonshot API the same thing as the Kimi web app?

No. The web app is a consumer product, while the API is an interface for programs. Keys, quotas and billing are different. When replacing the API, membership benefits are irrelevant.

Can the moonshot-v1 series still be called?

The official model page shows that the series was retired on August 31, 2026, and recommends migrating to kimi-k3. Continuing to use the old names usually returns 404; migrate first, then decide whether a platform switch is necessary.

Why does the Qwen API return 401 right after I get a key?

The most common cause is a key that does not match the region. A key for the Beijing region calling a Singapore or Virginia endpoint returns 401, usually with the error code invalid_api_key. Confirm that the workspace, region and Base URL all agree.

Can the four models share one key?

No. Each platform issues its own keys, and accounts and balances are separate. A multi-model gateway can centralize credential management, but the underlying authorization still comes from the corresponding platform.

What if quality gets worse after migration?

First confirm that the model name, parameters and prompts are equivalent, then compare failure cases on the same task set. Much of what looks like "worse quality" is actually a change in output limit, thinking mode or system prompt, not a problem with the model itself.

Next steps

Create a test key on the ZSQH AI Gateway, compare Moonshot, DeepSeek, Qwen and GLM on the same set of business tasks, and then decide on primary and backup models. Available models and billing follow the model pricing page.

Related reading: