"API relay" is a common term among developers in mainland China. In essence, it is an AI API gateway layer: it consolidates OpenAI, Claude, Gemini, DeepSeek, and other models behind a single interface, with unified keys, billing, and logs.
This article approaches the topic from procurement and selection: how to evaluate an API relay, how to compare prices, which compliance questions to ask, and how to test before launch.
Note: All brands mentioned are trademarks of their respective owners. This article is for technical discussion only; prices and policies are subject to each platform's official website.
1. What problems an API relay solves
- Access to overseas models from mainland China is unstable.
- Multiple providers mean multiple keys and multiple bills.
- Teams need member-level and project-level quotas.
- Centralized logs and error troubleshooting are required.
- Models need to be switched quickly.
An API relay does not produce models and does not change model capabilities. Its value sits in the access layer: making it stable, transparent, and manageable.
2. Eight selection criteria
| Criterion | What to confirm |
|---|---|
| Model coverage | Whether the models and versions you need are available |
| Protocol compatibility | OpenAI/Anthropic formats, streaming, tool calling |
| Reliability | Error rate, P95, rate limits, retries |
| Billing | Input/output/cache prices, multipliers, minimum spend |
| Quotas | Member, key, and project limits |
| Logs | Tokens, latency, and errors for every call |
| Support | Documentation, tickets, invoices |
| Compliance | Data retention, contracts, data processing terms |
Score each criterion against your own workload. A platform that looks strong on model count can still fail on streaming behavior or tool-call compatibility.
3. How to compare prices
Do not look only at the "price per million tokens." Include the following:
Monthly cost =
input tokens × input price
+ output tokens × output price
+ retry/failed requests
+ long-context surcharge
+ multimodal input
Then compare each provider's multipliers, minimum spend, refund rules, and invoicing. The cheapest headline rate is not necessarily the cheapest production bill.
4. Compliance questions to ask
For enterprise procurement, at minimum clarify:
- Are requests and responses stored? For how long?
- Is data used for training?
- Can the provider sign a data processing agreement or contract?
- What invoice type is available, and on what schedule?
- Are upstream suppliers authorized? Do their terms permit resale or agency?
- How will a data breach be communicated?
Get the answers in writing. Verbal assurances are difficult to rely on during an audit or an incident.
5. Pre-launch testing
- Non-streaming and streaming requests.
- Tool calling and structured output.
- Long context.
- 5, 10, and 20 concurrent requests.
- 401/404/429/5xx error codes.
- Bill reconciliation against fixed requests.
- Continuous observation for 3–7 days.
Run the tests with production-like prompts and payload sizes. A relay can pass a simple chat test and still struggle with long documents or multi-turn agent traffic.
6. Common pitfalls
- Only some models are supported, and they can be removed at any time.
- Low prices but severe rate limits, making retries expensive.
- Model names expire and production suddenly returns 404.
- Keys have no quota and are drained by a runaway script.
- No invoices or contracts, so the enterprise cannot reimburse the cost.
- Unclear data terms and high compliance risk.
7. Build or buy
If you have a technical team and need data control or deep customization, you can self-host New API, One API, or LiteLLM. If you do not have the operations capacity, a managed service is less work. See One API and New API guide.
FAQ
Is an API relay legal?
It is a gateway or proxy service. Whether it is compliant depends on upstream authorization, data usage, and local regulations. Enterprises should confirm the terms and contracts before use.
Can the relay see my data?
It depends on the architecture. Ask whether requests are stored, for how long, and whether they are used for training.
Why are some relays very cheap?
It may come from promotions, shared quota, caching, lower-tier upstream capacity, or hidden limits. Test with a small volume first.
Next steps
If you need an entry point that is reachable from mainland China, OpenAI-compatible, and billed by usage, sign up for the ZSQH AI Gateway and test with a small key. Models and prices are subject to model pricing.
Related reading:
