Back to blog
Practical guide·May 25, 2026·5 min read

Calling Claude / GPT APIs from China — Connectivity Self-Test, Payments, and Retry Patterns

Call Kunavo from mainland China: the gateway is in a single US East region. Whether you can connect and what latency you experience depend on your network; self-test commands are included. Pay with Alipay. Robust retry code, plus guidance on when forwarding is actually necessary.

The questions developers in mainland China ask most often: Can I call Claude / GPT directly? When do I need a proxy? How do I pay? This article answers each question and gives you a way to measure latency yourself, rather than a number we can’t guarantee for your network.

The conclusion first

Kunavo’s gateway runs in a single US East region (Ashburn, Virginia). Whether you can connect from within China and the round-trip time depend on the actual network route from your network to the US East; we make no guarantees about reachability or latency. Below is a method you can use to test from your own server.

First call

first_call.py
from openai import OpenAI

client = OpenAI(
    api_key="sk-kn-...",
    base_url="https://api.kunavo.com/v1",
)

# 只需要换 base_url 和 api_key
resp = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "你好,中国大陆能稳定调用吗?"}],
)
print(resp.choices[0].message.content)

You only need to change base_url and key. Requests are processed in the US East, and round-trip time depends on the network route from your network to the US East.

Measure the latency yourself

Run this once on the server that will handle your production traffic to see how long the connection and first byte each take:

latency.sh
curl -o /dev/null -s \
  -w "dns=%{time_namelookup}s connect=%{time_connect}s tls=%{time_appconnect}s ttfb=%{time_starttransfer}s\n" \
  https://api.kunavo.com/v1/models \
  -H "Authorization: Bearer $KUNAVO_API_KEY"

Transient upstream errors (429, 502, 503, 504, 529, and connection interruptions) are retried automatically once in the same request before content starts streaming; if the model has multiple channels configured, the request also switches to the next one. Failed requests are not billed. See the status page for the actual success rate.

A robust approach for occasional jitter

Cross-border networks may occasionally be unstable, so we recommend adding timeouts and exponential backoff retries on the client side. Kunavo does not charge for the request that fails.

robust_call.py
# 中国大陆网络偶尔抖动,建议给客户端加 timeout + 退避重试。
# 不要用大重试值打爆配额。
import os
import random
import time

from openai import OpenAI, APIConnectionError, APITimeoutError, RateLimitError

client = OpenAI(
    api_key=os.environ["KUNAVO_API_KEY"],
    base_url="https://api.kunavo.com/v1",
    timeout=60,        # 总超时
    max_retries=0,     # 关掉 SDK 自带重试,自己控制
)

def call_with_backoff(**kwargs):
    last = None
    for attempt in range(5):
        try:
            return client.chat.completions.create(**kwargs)
        except (APIConnectionError, APITimeoutError, RateLimitError) as e:
            last = e
            time.sleep(min(30, (2 ** attempt) + random.random()))
    raise last

Payment methods — available in mainland China

Kunavo is prepaid, and every method below tops up the same API balance.

  • By card: Visa and Mastercard, charged in US dollars on the top-up page.
  • Apple Pay and Google Pay work too, with the same cards.
  • From anywhere: USDT on TRON (TRC-20), Ethereum (ERC-20) or BNB Chain (BEP-20), or USDC on Base, Ethereum (ERC-20) or BNB Chain (BEP-20), sent to your own top-up address on the top-up page; whatever arrives is credited.
  • In local currency: Alipay (mainland China), AlipayHK (Hong Kong), Pix (Brazil), GCash (Philippines), Touch 'n Go eWallet / Boost (Malaysia), PayNow (Singapore), K PLUS / LINE Pay (Thailand), iDEAL (Netherlands), Bancontact (Belgium), EPS (Austria), BLIK / PayU (Poland) and BANCOMAT Pay (Italy); the top-up page shows the amount in that currency before you pay.

Minimum top-up $10, pay as you go, and your balance never expires. See the pricing page for rates by model.

When you really need a proxy

We can’t determine whether your network can connect reliably to the US East. First, run the command above on the server that will handle production traffic. If the results are unstable, you can consider:

  • Run production traffic on a cloud server such as Alibaba Cloud or Tencent Cloud (not home broadband)
  • If it is still unstable, set up a forwarding layer on an overseas cloud host (for example, in Hong Kong). The gateway has only one region, US-East, so we cannot switch you to another route

Frequently asked questions

  • Is there a rate limit? The gateway currently does not limit call frequency. You can set a monthly spending cap and IP allowlist for each key at /app/keys.
  • Can I use it in production? Yes, but we do not publish an SLA percentage. Transient upstream errors are automatically retried in the same request, and failed requests are not billed; measured success rates are published on the status page.
  • Can you issue invoices? No. We do not issue invoices, including VAT invoices in mainland China. The only usable proof is the charge shown on your Alipay statement (or the USDT / USDC transfer record) and the top-up records and itemized usage in /app/billing. If you have a corporate procurement process, email sales@kunavo.com and we’ll tell you directly what we can accommodate.
  • Are video and audio models available? Yes. Veo 3 (video) and Suno (music) are available through one bill. /models.

Ready to start? Sign up, top up from $10, and pay as you go; your balance never expires. See the full documentation at /docs/quickstart.