cocodot
← Back to guides
Local card declined for overseas AI? cocodot: one card + one key
ExplainersUpdated 2026-09

OpenAI-Compatible Relays and Reverse Proxies: How to Compare One Before You Trust It (2026)

Aggregator, reverse proxy, official resale — three different things get called a relay, and the differences decide what happens to your key, your prompts and your prepaid balance. Here are the checks that separate them.

TL;DR: "Relay", "reverse proxy" and "gateway" get used interchangeably, but they describe three structurally different things, and the difference is what you are actually choosing between. ① An aggregator fronts many upstream vendors behind one key and routes between them — widest catalogue, most hops. ② A reverse proxy forwards your request to one upstream, sometimes through several intermediate resellers you cannot see. ③ An official resale path buys capacity from a licensed cloud vendor and serves it directly. Capability lists look identical across all three; what differs is how many parties handle your prompt, who holds the upstream account, and what happens to your prepaid balance if the operator disappears. Four things are worth checking before volume: how many hops there are (section 4 gives a test you can run in a minute), what the operator does with your key and prompts, whether the fees are published, and whether there is a traceable company entity. And before any of that, check the catalogue — if you only need DeepSeek, Qwen or GLM, an official Chinese-model platform is the right answer and no relay is needed at all.

1. Three different things share one word

Comparing relays goes wrong at the first step, because people compare model lists — and model lists are the one thing that looks the same everywhere. An aggregator holds accounts with many upstream vendors and routes your request to whichever it chooses, which buys you catalogue breadth and costs you determinism about who served any given call. A reverse proxy forwards to a single upstream, but "a single upstream" may itself be another reseller, and chains of two or three are common and invisible from the outside. Official resale means the operator buys capacity through a licensed cloud vendor's reseller programme and serves it directly, which is the shortest path but constrains the catalogue to what that vendor carries. None of these is inherently dishonest. They simply fail in different ways, and you cannot reason about the failure modes until you know which one you are on.

2. If you only need Chinese open models, stop here

Worth disposing of the easy case first, because a lot of people over-engineer it. If your workload is DeepSeek, Qwen or GLM, use an official-grade Chinese-model platform such as SiliconFlow: first-party inference, CNY billing, mature ecosystem, no intermediary in the path at all. Routing those models through a relay adds a hop and a counterparty and buys you nothing. Relays earn their keep for one specific problem — reaching overseas closed flagships (Claude, GPT, Gemini) that are not in the domestic catalogues and cannot easily be paid for from a local card. Everything below is about that case.

3. Give the incumbents their due

Each of the commonly named services is genuinely good at the thing it was built for, and choosing by slogan rather than fit is how people end up unhappy. Shenma is strong on catalogue breadth — one key against many vendors makes head-to-head evaluation and price-hunting easy. TeamoRouter has put real work into Claude Code and Codex routing specifically, and takes both WeChat and Alipay. API2D has been operating since the early OpenAI-proxy era, which makes migration nearly free for long-time OpenAI users and means a track record you can look up. If your need lands squarely on one of those strengths, that is the right answer and this page is not trying to talk you out of it. What follows is how to evaluate any of them, including us.

4. How many hops? A test you can run in a minute

This is the check almost nobody runs, and it is the most informative one available. Deliberately trigger an upstream error and read what comes back. Send a request that exceeds the model's context window, or name a model that does not exist, and compare the error body against what the upstream vendor's own API returns for the same mistake. A short path passes the upstream error through largely intact — the same error type, the same field names, often the same request id. A long path rewrites it, because each intermediate layer parses the response and re-serialises its own version: you get a generic message, invented error codes, or a 200 with the error stuffed into the message body. The same logic applies to streaming: ask for a stream and watch whether tokens arrive incrementally or in suspiciously large bursts, which suggests a layer buffering the whole response before relaying it. Neither test needs special tooling — curl and a stopwatch are enough — and both are far harder to fake than a marketing claim about being "direct".

5. What happens to your key, and to your prompts

Security questions about reverse proxies usually get answered with reassurance rather than mechanism, so here is the mechanism. You are not handing over your vendor API key — you do not have one; that is the point. The operator holds the upstream account and issues you a key of its own. The consequences follow directly: your prompts and completions pass through the operator's infrastructure in plaintext, whatever transport encryption is in place, because the request has to be re-signed with the upstream credential. So the question is not "is it encrypted" but "what is retained, for how long, and who can read it" — and the answer should be in a published policy rather than a support-chat reply. Three practical consequences: do not send regulated or personally identifying data through any intermediary you have not diligenced; assume prompts may be logged for abuse detection, because they usually are; and rotate the key the operator issued you on the same schedule you would rotate any other credential. If an operator will not say what it retains, treat the silence as the answer.

6. A prepaid balance makes you an unsecured creditor

Nearly every relay is prepaid, and that arrangement deserves to be named for what it is: money you have handed over for a service not yet rendered, with no security and no deposit protection. If the operator shuts down, is cut off by its own upstream, or simply stops answering, your remaining balance is an unsecured claim against an entity that may not be identifiable. This is the single strongest argument for checking whether there is a traceable company entity with complete terms behind the service, and for the unglamorous discipline of topping up in small amounts. A rate a few percent better is not worth concentrating a large balance behind an anonymous operator. It is also why unusually cheap pricing warrants an extra round of scrutiny: flagship inference has a hard floor of upstream cost, and pricing well below it has to come from somewhere — silent substitution, credits of unclear origin, or collecting prepaid balances at a loss.

7. Verify the model before you send volume

The structural temptation for any intermediary is to bill for a flagship and serve something cheaper, and it is invisible on easy prompts. Do not settle it with promises. Keep three to five prompts that actually discriminate between tiers — one long multi-step reasoning problem, one long code generation-and-debug task, one multi-step maths problem — and run them against both a known-good endpoint and the candidate. Push a genuinely long document to see whether the advertised context window is real. Then send 20–50 requests and record time-to-first-token and the failure rate. If assembling that harness is more work than you want, cocodot's downgrade checker is open source with a hosted version at probe.cocodot.co: paste any OpenAI-compatible base URL and key and it runs the probes for you. It is deliberately usable against us as readily as against anyone else — and an operator's willingness to be tested is better evidence than any pledge.

8. Disclosure, and where we are not the answer

This page is published by cocodot, and we are one of the options in the table, so discount it accordingly. Our specifics, stated plainly so you can check them: we are an overseas-registered company serving overseas flagships through licensed cloud vendors' official resale rather than reverse-engineered access, with no second forwarding layer; one key covers Claude, GPT and Gemini; an Anthropic-compatible endpoint is served on the same host so Claude Code connects by setting ANTHROPIC_BASE_URL (beta); top-up is Alipay in CNY; per-token rates for every model are published at /pricing. The honest boundaries: if your models are Chinese open models, an official platform beats us; if you need the widest possible catalogue for evaluation work, an aggregator beats us; and if you require a direct contractual relationship and a vendor SLA, no intermediary is the right answer and you should get a card the vendor accepts. Where we are worth a look is the narrower case of overseas flagships, local payment, and wanting to verify rather than trust. Start with a small top-up anywhere — including here.

Names you will encounter in the Chinese market, and which lane each sits in (verify live details on each vendor's own site)

PlatformPrimary useTop-upOverseas modelsChinese modelsPath
Shenma relay APIBroad multi-vendor aggregationMeteredYes, broadYesAggregated relay
TeamoRouterClaude Code / Codex routingWeChat / AlipayYesPartialAggregated relay
SiliconFlowOfficial-grade Chinese-model inferenceCNY— (not its focus)Yes, official-gradeDirect (Chinese models)
API2DLong-established OpenAI proxyCNY creditsMainly OpenAIPartialRelay
cocodot (ours)Overseas flagships + Alipay card issuanceAlipayYes, official resaleYesLicensed-cloud official resale

FAQ

What is an OpenAI reverse proxy?

A server that accepts requests in the OpenAI API format, forwards them to a model provider using its own upstream credentials, and returns the response to you. You change base_url and use a key the operator issues; your code is otherwise untouched. It exists to solve access and payment, not to add capability.

Is it safe to use one?

It depends on what you send. Your prompts and completions necessarily pass through the operator's infrastructure in readable form, because the request is re-signed with its upstream credential. So: do not route regulated or personally identifying data through an operator you have not diligenced, assume prompts may be logged for abuse detection, and rotate the issued key like any other credential. Look for a published retention policy — silence on the question is itself informative.

How do I compare two relays properly?

Not by model list — those look identical. Compare four things: hop count (trigger an upstream error and see whether it is passed through or rewritten), what is retained from your prompts, whether fees are published per model, and whether a traceable entity stands behind the prepaid balance. Then run a capability probe before sending volume.

Shenma, TeamoRouter, API2D, SiliconFlow — which is which?

Shenma is a broad aggregator, strongest on catalogue coverage. TeamoRouter is an aggregator with particular attention to Claude Code and Codex routing. API2D is a long-established OpenAI proxy with an easy migration path for OpenAI users. SiliconFlow is not a relay at all — it is an official-grade platform for Chinese open models, and it is the right answer if those are the models you need.

Can I point Claude Code at a relay?

Only if the relay serves an Anthropic-compatible endpoint, not merely an OpenAI-compatible one — Claude Code speaks Anthropic's own protocol. Where it is supported you set ANTHROPIC_BASE_URL to the relay's host and leave the rest of your configuration alone. Check for that specific endpoint before assuming OpenAI compatibility covers it.

What are the common problems with relays?

Four recur: silent model substitution on high-priced models; buffered streaming that destroys time-to-first-token; upstream errors rewritten into generic messages, which makes debugging much harder; and tokens charged on requests that failed or were truncated. The first is caught with a capability probe, the middle two with the error and streaming tests, and the last by reconciling your own request log against the billing page.

About cocodot

cocodot is a payment and AI access service for developers and cross-border teams in mainland China. It provides US-BIN virtual cards issued by a licensed institution — used to pay for overseas subscriptions and ad accounts — and an OpenAI-compatible AI API gateway for calling Claude, GPT and Gemini from within mainland China. Both share one wallet, funded by Alipay and accounted in USD. Card: $9.9 to open, 3% to load, $1 per active card per month; spending: $0.60 settlement fee on purchases under $20; a corresponding fee applies when the issuer charges one.

Service scope, pricing and limits →