---
title: "AI API in China 2026: Sources, Network Quality, Payment, Compliance"
description: "Using AI APIs from China: pick a model source, test your network with curl, choose how to pay, and know the compliance limits, plus a pre-launch checklist."
url: https://cdnping.org/en/blog/ai-api-guide-for-china-developers-2026
language: en
published: 2026-10-21
category: "Developer tools"
tags: ["AI API","China developers","latency testing","payment","compliance"]
source: cdnping.org
license: Free to quote and summarize with a link to the url above.
---
# 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:

| Source | Typical examples | Main prerequisite | What you need to confirm yourself |
| --- | --- | --- | --- |
| Official APIs of Chinese models | DeepSeek, Zhipu, Kimi (Moonshot AI) Open Platform, Alibaba Cloud Model Studio, Volcengine Ark, SiliconFlow | Real-name registration in China, payment in RMB | Whether the model is capable enough for your task; rate limits and quotas |
| Official APIs of overseas models | OpenAI, Claude, Gemini, xAI, Mistral, Groq | A country or region the provider officially supports, a foreign-currency payment method | Whether your region is on the official supported list |
| Cloud-hosted | Hosted versions of overseas models on large cloud platforms | A cloud account and eligibility to enable the service in the relevant region | Regional availability, data residency terms |
| Aggregation gateways | OpenRouter, AGI Plan, etc. | The gateway's own sign-up and payment method | Whether 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](/en/blog/official-api-vs-cloud-vs-gateway).

### 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](/en/blog/claude-unsupported-region-explained). 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](/en/learn/ai-api-latency-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)](/en/blog/api-latency-connect-rtt-ttft).

### Step 1: Test your own network in the browser

Open the [online speed test](/en) 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)](/en/blog/developer-network-self-check-2026).

### 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:

```bash
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](/en/status) 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](/en/blog/how-to-read-ai-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](/en/methodology). cdnping only began collecting on 2026-10-17, so this is a very short snapshot.

| Service | Endpoint domain | Median | p95 | Success rate in window |
| --- | --- | --- | --- | --- |
| xAI API | api.x.ai | 42 ms | 55 ms | 100% |
| OpenRouter | openrouter.ai | 54 ms | 83 ms | 100% |
| Groq API | api.groq.com | 61 ms | 131 ms | 100% |
| Gemini API | generativelanguage.googleapis.com | 69 ms | 89 ms | 100% |
| Claude API | api.anthropic.com | 73 ms | 84 ms | 100% |
| OpenAI API | api.openai.com | 96 ms | 194 ms | 100% |
| Mistral API | api.mistral.ai | 153 ms | 536 ms | 100% |
| DeepSeek API | api.deepseek.com | 353 ms | 414 ms | 100% |
| Kimi Open Platform (Moonshot AI) | api.moonshot.cn | 375 ms | 1125 ms | 94.4% |
| Zhipu BigModel | open.bigmodel.cn | 395 ms | 674 ms | 100% |
| Volcengine Ark | ark.cn-beijing.volces.com | 485 ms | 1149 ms | 100% |
| Alibaba Cloud Model Studio | dashscope.aliyuncs.com | 615 ms | 1152 ms | 100% |
| SiliconFlow | api.siliconflow.cn | 631 ms | 1030 ms | 100% |

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](/en/reports) 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](https://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](/en/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](/en/blog/api-relay-how-to-evaluate). For a fuller discussion of paying in RMB and getting invoices, see [How developers in China pay for AI APIs](/en/blog/pay-for-ai-api-in-china).

## 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?](/en/blog/ai-api-data-privacy-policy)
- 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:

| Check | How to verify | Pass criterion (suggested) |
| --- | --- | --- |
| Region and terms | Read the service's supported-region list and terms of use | Your use case is within what the terms allow |
| Browser speed test | Run one on the [cdnping homepage](/en) | The target endpoint is reachable, and the first connection and round trip show no outliers |
| Server speed test | Run the curl command above 5–10 times on the deployment machine | Each stage's timing is stable, with no timeouts |
| Service status | Check [/status](/en/status) and the official status pages | No ongoing outage recently |
| Payment and invoices | Read the billing and invoice documentation | The payment method and the reimbursement process both work |
| Data policy | Read the data retention and training terms | No conflict with company data requirements |
| Fault tolerance | Add timeouts, retries, and a backup endpoint in code | Features 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](/en/blog/configure-custom-api-endpoint-claude-code-codex) for how to change the endpoint address.
