AI API in China 2026: Sources, Network Quality, Payment, Compliance

Blog / Developer tools

AI API in China 2026: Sources, Network Quality, Payment, Compliance

To use an AI API from China, answer two questions first: is the model you want officially supported in your region, and is your network to its endpoint stable? The first decides which route you can take (a Chinese model platform, an overseas official API, a cloud-hosted version, or an aggregation gateway). The second decides how well that route works. Payment and compliance come after both answers are in. This article follows that order. All probe data cited here was collected by cdnping itself, with the window stated.

Where can developers in China get an AI API?

There are roughly four kinds of sources, each with different prerequisites:

SourceTypical examplesMain prerequisiteWhat you need to confirm yourself
Official APIs of Chinese modelsDeepSeek, Zhipu, Kimi (Moonshot AI) Open Platform, Alibaba Cloud Model Studio, Volcengine Ark, SiliconFlowReal-name registration in China, payment in RMBWhether the model is capable enough for your task; rate limits and quotas
Official APIs of overseas modelsOpenAI, Claude, Gemini, xAI, Mistral, GroqA country or region the provider officially supports, a foreign-currency payment methodWhether your region is on the official supported list
Cloud-hostedHosted versions of overseas models on large cloud platformsA cloud account and eligibility to enable the service in the relevant regionRegional availability, data residency terms
Aggregation gatewaysOpenRouter, AGI Plan, etc.The gateway's own sign-up and payment methodWhether the gateway is an officially authorized channel, its data policy, whether uptime figures are public

The three access methods (official, cloud-hosted, gateway) differ quite a bit in billing, data handling, and who you contact when something breaks. For a side-by-side comparison, see Official API, cloud hosting, or aggregation gateway: how to choose.

What if an overseas service says "region not supported"?

To be straightforward: OpenAI, Anthropic, and other overseas providers publish explicit lists of supported countries and regions, and by those official lists mainland China is not included (the official pages are authoritative). For the reasons and official policy behind this message, see Claude says your region is not supported: causes, official policy, and compliant options. This article does not discuss any way to bypass regional restrictions or risk controls; please follow each service's terms and local law. Compliant choices are usually to switch to a Chinese model API, to use a cloud service that your legal entity is eligible to enable, or to use a third-party service with clear terms and assess the risk yourself.

How do you judge network quality to an AI API?

Many "the API is slow" problems are not about the model. They come from DNS resolution, the TLS handshake, or the outbound route. Look at two things separately: the first connection (including DNS and the TLS handshake) and the round-trip time once the connection is reused. The difference is explained in AI API latency from China, and the breakdown from connection setup to first token is in AI API latency breakdown: connect time, gateway round trip, and time to first token (TTFT).

Step 1: Test your own network in the browser

Open the online speed test on the cdnping homepage. From your current browser it measures the "first connection" and the "round trip" (the median of 3 requests after the connection is reused) to 15 AI model APIs. The result reflects this network, right now, to each endpoint. A different network (office, home, phone hotspot) may give very different numbers, so test each environment you use regularly.

If the first connection is clearly high but the round trip is normal, the problem is most likely DNS or the handshake. If the round trip itself is high, the route is long or detours. For the full self-check sequence (egress IP, DNS, IPv6, speed test), follow the developer network self-check checklist (2026 edition).

Step 2: Re-test from the command line

Browser tests are affected by extensions and caching. Before deploying to a server, re-test with curl on the machine that will actually run your code. The command below splits one request into DNS, TCP, TLS, and first-byte stages:

curl -o /dev/null -s -w \
'dns=%{time_namelookup}s tcp=%{time_connect}s tls=%{time_appconnect}s ttfb=%{time_starttransfer}s total=%{time_total}s\n' \
https://api.deepseek.com/

Swap in the endpoint you plan to use (for example open.bigmodel.cn or dashscope.aliyuncs.com) and run each 5 to 10 times. Look at the median and the spread, because a single result is not worth much. This only tests connectivity and the handshake. It does not send a real model request and needs no API key.

Step 3: Check whether the service itself is healthy

If the network is fine but requests fail, look at the server side next. The cdnping API status page probes each official API entry point from the Cloudflare edge every 5 minutes, and also syncs the official status pages of OpenAI, Anthropic, Moonshot, Groq, and others. Check it before changing code and you can save yourself a detour. For how to read the severity levels on status pages, see How to read the OpenAI and Claude status pages.

What can cdnping's edge probe data tell you?

Below are cdnping's probe results from the Cloudflare Denver (DEN) edge node between 16:40 and 18:05 on October 17, 2026 (Beijing time). The window holds 242 probe records in total. The data is published under CC BY 4.0, and the method is described in /methodology. cdnping only began collecting on 2026-10-17, so this is a very short snapshot.

ServiceEndpoint domainMedianp95Success rate in window
xAI APIapi.x.ai42 ms55 ms100%
OpenRouteropenrouter.ai54 ms83 ms100%
Groq APIapi.groq.com61 ms131 ms100%
Gemini APIgenerativelanguage.googleapis.com69 ms89 ms100%
Claude APIapi.anthropic.com73 ms84 ms100%
OpenAI APIapi.openai.com96 ms194 ms100%
Mistral APIapi.mistral.ai153 ms536 ms100%
DeepSeek APIapi.deepseek.com353 ms414 ms100%
Kimi Open Platform (Moonshot AI)api.moonshot.cn375 ms1125 ms94.4%
Zhipu BigModelopen.bigmodel.cn395 ms674 ms100%
Volcengine Arkark.cn-beijing.volces.com485 ms1149 ms100%
Alibaba Cloud Model Studiodashscope.aliyuncs.com615 ms1152 ms100%
SiliconFlowapi.siliconflow.cn631 ms1030 ms100%

One thing to keep in mind when reading this table: the probe point is in Denver, USA, so overseas APIs show small numbers and Chinese APIs show large ones. That is caused by geographic distance, and you cannot conclude from it that overseas APIs are faster to reach from China. From a network in China the result is usually the reverse, and the actual numbers can only be measured on your own network. Two kinds of information in this table are genuinely useful:

  • Stability: in the same window, an endpoint whose p95 is far above its median (such as the few rows with p95 over 1 second) has widely varying latency, so leave headroom when you set timeouts.
  • Availability: the Kimi Open Platform had a 94.4% success rate in this window, and all the others had 100%. The window is short and does not represent long-term performance, but it is a reason to build retries and fallbacks into your code.

For longer-term trends, follow the stability weekly report generated every Monday.

What are the ways to pay?

Payment methods largely follow the model source:

  1. Chinese model platforms: RMB top-ups or pay-as-you-go billing. How invoices are issued depends on each platform's billing and invoice documentation.
  2. Overseas official APIs: usually a foreign-currency payment method is required, and the account itself must meet the provider's regional requirements.
  3. Aggregation gateways: each works differently. Some bill by usage, some by subscription, and some support RMB.

Take AGI Plan as an example (AGI Plan is a commercial partner of cdnping). It is a multi-provider LLM aggregation gateway with monthly subscriptions settled in RMB and no overseas credit card needed. The plans are Lite ¥49/month, Plus ¥119/month, Pro ¥649/month, and Max ¥1,368/month. The four tiers differ only in quota. Pay-as-you-go is also available (¥1 = 500 CU, minimum top-up ¥20). The site states clearly that it is not an officially authorized channel, and some models are marked "overseas only"; availability is as listed at agiplan.dev/models. Its hourly uptime data is public at https://agiplan.dev/api/status/requests?month=YYYY-MM and can be fetched without logging in. cdnping also mirrors it at /status/agiplan.

Before choosing any gateway, you should be able to look up and verify its uptime, billing basis, and data policy. For an item-by-item method, see How to choose an AI API relay: 8 checks on uptime, billing, and data policy. For a fuller discussion of paying in RMB and getting invoices, see How developers in China pay for AI APIs.

What compliance boundaries should you watch?

  • Follow the terms of service: do not evade regional restrictions, do not use multiple accounts or bulk registration, and do not resell quota you have no right to resell.
  • Cross-border data and privacy: before sending user data or company code to an overseas endpoint, confirm your company's data management requirements and the provider's data retention and training terms. For how to read a data policy, see Can your code and conversations be seen when you use a third-party AI API?
  • Public-facing products: if a product you build on an AI API will offer generative AI services to the public in China, learn the filing and security assessment requirements, and treat the regulators' latest rules as authoritative. Putting a website online within mainland China also requires an ICP filing (China's website registration with the telecom regulator).
  • Record your sources: write down in the project documentation which service you use, which access method, and which terms apply. It makes tracing much easier when something goes wrong.

Pre-integration checklist

Before writing any code, confirm each item in the table below:

CheckHow to verifyPass criterion (suggested)
Region and termsRead the service's supported-region list and terms of useYour use case is within what the terms allow
Browser speed testRun one on the cdnping homepageThe target endpoint is reachable, and the first connection and round trip show no outliers
Server speed testRun the curl command above 5–10 times on the deployment machineEach stage's timing is stable, with no timeouts
Service statusCheck /status and the official status pagesNo ongoing outage recently
Payment and invoicesRead the billing and invoice documentationThe payment method and the reimbursement process both work
Data policyRead the data retention and training termsNo conflict with company data requirements
Fault toleranceAdd timeouts, retries, and a backup endpoint in codeFeatures degrade gracefully when one endpoint is down

If you use command-line tools such as Claude Code or Codex, see Custom API and endpoint configuration for Claude Code, Codex, and OpenCode for how to change the endpoint address.

Related articles

Keep reading