Claude APIAnthropic MessagesAPIDevelopersGateways

What Mainland Developers Should Check Before Integrating Claude API

A careful guide to Anthropic API, cloud platforms, and compatible gateways for mainland developers, with a redacted Messages request and a verification order.

What Mainland Developers Should Check Before Integrating Claude API

For developers based in mainland China, the first Claude API question is whether the provider supports the entity and working location. Endpoint, key, and request format come afterward. Website subscriptions, Console API, cloud platforms, and gateways use different credentials and billing relationships.

Anthropic’s Pro documentation says the plan does not include Console API usage. Paying a third-party provider does not make you a direct Anthropic API customer either. Identify the relationship before purchasing credit.

Four questions before “Does it have Claude?”

Ask the providerWhy it matters
Is my entity and actual location supported?Incorporation, headquarters, control, and personnel location can matter separately
Is this direct service, a cloud platform, or a gateway?Determines contract, credentials, support, and data path
Which exact models and API features are supported?A catalog name does not prove complete tool, file, or streaming compatibility
What happens on shutdown, refunds, and data retention?A test response proves neither continuity nor zero retention

The current API overview separates the direct API, AWS, Google Cloud, and Microsoft Foundry. Anthropic’s regional policy, marked effective November 12, 2026, explicitly includes APIs, cloud platforms, and authorized resellers. Mainland China is not on the current official support list. An overseas cloud route is not automatic eligibility.

Console, cloud IAM, and gateway credentials are separate routes requiring eligibility review

After eligibility, test one request

This example follows Nbility’s existing Messages-compatible guide. It is unexecuted, and assumes a service and model you are permitted to use. 2023-06-01 comes from that guide and Claude Code’s current gateway example; it is not a claim about every new first-party feature.

Set your own NBILITY_API_KEY in the environment. Replace the model placeholder with an exact ID from the catalog visible to the same key:

curl --fail-with-body --max-time 60   https://api.nbility.ai/v1/messages   -H "x-api-key: $NBILITY_API_KEY"   -H "anthropic-version: 2023-06-01"   -H "content-type: application/json"   -d '{
    "model": "MODEL_ID_FROM_YOUR_CATALOG",
    "max_tokens": 64,
    "messages": [{"role":"user","content":"Reply with one short sentence."}]
  }'

Do not send an Nbility key to the first-party Anthropic domain. Direct access needs its own Console credential, current version, and required workspace headers; cloud platforms have their own authentication rules. Changing only the hostname does not make those routes equivalent.

A Messages request places model, output limit, and user message in JSON; auth and version use headers

A 200 response is only the beginning

Inspect content blocks and the stopping condition. Handle no text, truncation, and tool calls rather than assuming content[0] is always text. Test multi-turn messages, streaming, tool results, images, and structured output only as needed, using public samples.

Keep provider, model ID, timestamp, status, and request ID with a redacted error. Model self-identification is not upstream authentication. We did not verify any third party’s authorized reseller status or test model identity.

For 400, 401, 403, and 404, fix format, credentials, permissions, or paths first. Use bounded backoff for 429 and temporary 5xx failures as the provider directs. Replaying generation can produce another result and charge; do not concatenate separate streams. See errors and retries.

Verify text and status, then required capabilities, records, and a portable fallback

“Converted to an API” can mean something else

A V2EX ban discussion mixes enterprise APIs, editor integrations, and proxies for consumer subscriptions. Those are not equivalent services.

Claude Code’s legal documentation restricts third-party developers from collecting, storing, or intermediating Claude.ai credentials and session tokens or using consumer plan credentials to serve other users. An organization managing its own authorized API credentials is a different case. Ask where credentials originate before treating an offer as an enterprise API.

Check each client, gateway, upstream, and tool’s data policy. Anthropic’s commercial data explanation says commercial inputs and outputs are not used for training by default, with exceptions such as feedback. That does not bind another gateway or imply zero retention.

If eligibility is unavailable, use a provider explicitly serving your location and preserve tool schemas, public acceptance samples, and configurable model IDs. The protocol comparison helps scope migration.

Related posts

Run your Agent workflow through Nbility

Get an API key and connect OpenAI-compatible models and developer tools from one place.

Get an API key