MiniMax is a domestic multimodal model platform covering text, voice, video, and other capabilities. When teams in mainland China discuss "MiniMax API access from China", the real questions are usually not whether a connection works, but whether the region and key match, whether payment and invoicing go through, whether peak-hour rate limits apply, and whether there is a backup channel when something fails.
This article compares official direct access, a self-hosted proxy, and a domestic AI gateway, and provides an actionable validation checklist. Models, prices, and availability follow model pricing.
Note: MiniMax is a trademark of its owner. This article uses public documentation and common integration patterns as of October 2026; endpoint addresses, models, and quotas may change, so refer to official documentation and in-site pages.
1. First, distinguish the China site from the international site
MiniMax's China and international sites are two independent systems. According to official documentation, the China OpenAI-compatible address is https://api.minimax.cn/v1 and the Anthropic-compatible address is https://api.minimax.cn/anthropic; the international site uses https://api.minimax.io/v1 and https://api.minimax.io/anthropic. Accounts, balances, and keys are not interchangeable between the two.
Many "domestic access failures" are actually a .cn key configured against a .io address, or the reverse, showing up as 401 or model unavailability. Checking the domain and key first is more effective than repeatedly editing code.
| Route | Request path | Suitable for | Main trade-off |
|---|---|---|---|
| Official direct | Official .cn address | One model, self-managed top-up and invoicing | Single point; quotas and failures are yours |
| Self-hosted proxy | Forwarding through your own server | Teams with network operations skills and a unified egress | Operations, security, and compliance are yours |
| Domestic AI gateway | Unified gateway address | Multiple models, unified billing and invoices | One extra hop; latency must be measured |
2. Direct access: shortest path, but accept a single point
Official direct access suits teams that call only MiniMax, have stable usage, and can complete enterprise verification and top-up. Its advantage is few variables: when address, key, and model name match, requests work, and problems are easy to locate.
Integrate in this order:
- Register and complete identity verification on the MiniMax open platform; for enterprise procurement, confirm the invoice type first.
- Create keys per project; never put a production key into frontends, repositories, or chat logs.
- Get address, key, and model name working with a minimal request before integrating business logic.
- Set connection and read timeouts separately, with dedicated settings for long documents and reasoning tasks.
- Record
trace_id, status code, model name, tokens, and latency for reconciliation and troubleshooting.
export MINIMAX_API_KEY="your-key"
curl "https://api.minimax.cn/v1/chat/completions" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-M3",
"messages": [{"role": "user", "content": "Reply with OK only"}],
"max_tokens": 32
}'
Model names are case-sensitive; available models and parameters follow official documentation and the in-site model pricing page. The weakness of direct access is its single point: if the account, quota, region, or local egress has a problem, the business has no backup channel. Teams with high continuity requirements must add retries and degradation themselves.
3. Self-hosted proxy: solves egress, not capacity
A self-hosted proxy is usually a reverse proxy on a server that can reach the official endpoint, forwarding requests to MiniMax. It unifies egress, hides upstream keys, and centralizes logging, which suits teams with operations capability that want control over the path.
But a proxy does not eliminate rate limits or add upstream quota. The server is a new single point, and TLS, authentication, access control, rate limiting, and monitoring are all yours to run; a poor configuration can expose internal keys. The extra forwarding layer also adds latency, and time to first token in streaming responses may increase.
Without ongoing maintenance capacity, a self-hosted proxy easily turns from a temporary measure into long-term debt. It can serve as a transition or backup channel, but it is not recommended as the only entry point.
4. AI gateway: consolidate multiple models and billing
The value of a domestic AI gateway is not merely "relaying" but consolidating key management, top-up, billing, model switching, and failure handling in one place. Business code sees only one OpenAI-compatible entry, and switching models changes configuration rather than code; splitting keys by project also makes usage easier to attribute.
When choosing a gateway, confirm seven things: whether it covers the MiniMax models and endpoints you need, whether it supports streaming and tool calling, whether billing rules are clear, whether usage detail is available by key or project, how incidents are communicated, whether data is persisted, and whether bank payment and invoicing are supported.
A gateway is not an accelerator. It adds a hop and may increase latency; whether it is worth it should be measured with real requests comparing p95 latency, time to first token, and success rate against direct access.
5. Beyond the network, payment and invoicing are the real barriers
According to MiniMax account documentation, the platform supports online top-up and bank remittance; bank remittance is limited to enterprise accounts, the payer name must match the verified entity, and arrival usually takes 10 minutes to 1 hour. Personal accounts cannot issue enterprise-title invoices and must upgrade to enterprise verification first.
Invoices are issued against consumed amounts; the invoiceable amount equals consumed minus already invoiced, not the top-up amount. The balance page supports warning thresholds, with email, SMS, and in-site notifications when the balance falls below them. Resource packs have expiry dates, and unused balance resets to zero after expiry.
Enterprise buyers should confirm the entity, payment method, and invoice type before discussing integration. When using a gateway, invoices are issued by the service provider, so also confirm the contract entity, invoicing cycle, and data terms.
6. Designing for rate limits and failover
MiniMax official rate limits vary by model, endpoint, and account type, mainly RPM, TPM, and concurrent connections; free and topped-up users have different quotas, and main and sub-accounts share one quota. Creating more keys isolates business lines but does not increase the total quota.
Among official error codes, 1002 is rate exceeded, 2045 is rate growing too fast, 1041 is connection limit, 1008 is insufficient balance, 1004 and 2049 are invalid keys or keys without permission, 1001 is timeout, and 1033 is a downstream error. The mapping between HTTP status and business codes follows the official error-code page.
| Symptom | Common business code | What to check first |
|---|---|---|
| Request rate exceeded | 1002 | Reduce concurrency, exponential backoff, stagger traffic |
| Sudden traffic spike | 2045 | Queue and smooth peaks; avoid saturating on the hour |
| Connection limit | 1041 | Reduce concurrency; apply for a quota increase through the process |
| Insufficient balance | 1008 | Top up, set budget alerts; do not retry blindly |
| Invalid key | 1004 / 2049 | Region, key, environment variables |
| Timeout or downstream error | 1001 / 1033 | Retry, backup channel, contact support |
Design failover in advance: primary and backup channels, circuit breaking after consecutive failures, backoff only for retryable errors, and idempotency for requests with side effects.
7. Validate for a week before launch
Do not validate with a single load test. Fix a request set and run it for seven consecutive days, covering weekday peaks and nighttime troughs, recording the following:
| Metric | How to record | What to watch |
|---|---|---|
| Success rate | Share of non-successful responses | Whether failures cluster at peak hours |
| Latency | p50, p95, time to first token | Whether tail latency affects experience |
| Rate limiting | Count of rate-limit business codes | Whether it is a quota issue or a traffic spike |
| Billing | Tokens and cost for the fixed requests | Whether direct and gateway reconcile |
| Quality | Manual sampling on a fixed task set | Whether output is consistent after switching channels |
Then run a failure drill: stop the primary channel and confirm the backup takes over within an acceptable time; check that keys are split by environment, production keys exist only server-side, and logs contain no sensitive content. Finally, confirm data retention, cross-border transfer, and industry compliance requirements, involving legal counsel where necessary.
8. How to choose among the three options
For a single model, small traffic, and teams that can handle top-up and operations themselves, official direct access is simplest. For multiple models and unified billing and invoicing, a domestic AI gateway saves management cost. For businesses with high continuity requirements, use a dual-channel setup of "gateway plus direct", keeping direct access for comparison and degradation. For latency-sensitive teams with operations capability, direct access plus self-managed retries fits better, but they bear the disaster-recovery responsibility themselves.
Whichever you choose, keep a switchable direct channel. When something goes wrong, send the same request to both direct and gateway to quickly tell whether the problem is upstream, network, or gateway configuration.
FAQ
Does the MiniMax API require a special network in mainland China?
MiniMax is a domestic platform, and the China site is usually directly accessible. Confirm the region: China-site and international-site accounts, balances, and keys are independent, and domain and key must match. Refer to official documentation for specifics.
Which is faster, direct access or a gateway?
Direct access has one fewer hop and usually lower latency; a gateway may add a little latency but provides a unified entry, billing, and switching. Compare p95 and time to first token over the same batch of requests, not a single call.
Why does direct access also return 401?
Check the region and domain first, then whether the key is valid, has extra spaces, or whether environment variables were overridden. Both 1004 and 2049 point to key or authorization problems; do not start by editing prompts.
Can creating more keys raise the rate limit?
No. Main and sub-accounts share quota; multiple keys are mainly for isolating business lines and attributing usage. Apply for a higher quota through the official process and allow time for approval.
How are enterprise invoices issued?
Official invoices are issued against consumed amounts; personal accounts cannot issue enterprise titles. Complete verification before enterprise procurement and confirm the payer, invoice type, and invoicing cycle. When using a gateway, follow the service provider's rules.
Next steps
First create a test key at the ZSQH AI Gateway, compare direct access and gateway latency, success rate, and billing over the same batch of requests, then decide the production route. Models and prices follow model pricing.
Related reading:
