OpenAI API proxy: how to choose an API gateway and what to ask
How an API gateway differs from a network proxy, the criteria for choosing one, questions to ask before your first payment, and how to check yourself that charges match the math.
7 min · · API keys · сравнение
People searching for an "openai api proxy" are usually developers who need to connect GPT or Claude to their code but find paying the vendor directly inconvenient, or want access to several vendors through one key. There are many such services and they look alike. Below: what an API gateway is, how to tell a transparent service from an opaque one, which questions to ask before paying, and how to check billing yourself in 15 minutes.
OpenAI API proxy: what people mean by it
One word covers two different things:
- A network proxy. It forwards traffic; your key and account stay with the vendor. That's a network-configuration topic and isn't covered here.
- An API gateway (often also called a proxy). You have your own key and balance at the gateway, and the gateway calls model vendors itself and charges you for the tokens. Usually one key gives access to models from different vendors, and the gateway almost always speaks an OpenAI-compatible API (what that means is explained in OpenAI-compatible API) — no code changes needed, only the address and key.
The rest of this article is about the second option. The flow is simple: your app → gateway (your key, your balance) → model vendor. Hence the main questions for a gateway: how it counts money and how it handles what passes through it.
Criteria for choosing an API gateway
Honest, verifiable billing
The key criterion. You should be able to recompute the cost of every request yourself: tokens from the response × price from the price list. If a service sells abstract "credits" with an unclear rate or doesn't show the price of a specific request, you can't check it.
What Zukko provides for this check:
- the
usagefield in the response with input and output token counts; - the
X-Zukko-Cost-Microsheader — the request cost in micro-dollars (only on regular, non-streaming responses); - spending history in the dashboard and via the API (
GET /v1/usage); - a public price per 1M tokens for each model.
Prompt caching
For agents and chatbots with long context, caching affects the bill more than the input price does. Ask whether the gateway passes on the cache-read discount and how it bills cache writes. In Zukko, cache reads are billed at their own price from the table, and cache writes are charged separately only for Claude. For Claude the discount and the write line apply in the Anthropic format (/v1/messages); in the OpenAI format all Claude input is billed at the input price. For GPT, caching is visible in both formats (prompt_tokens_details.cached_tokens); for GPT, DeepSeek, Gemini, Qwen and GLM, cache writes aren't charged separately.
Price versus the official one
Compare on your own volume with a formula, not by advertised multipliers. An example with prices as of October 7, 2026 for gpt-6.1-sol: in Zukko $0.27 / $1.32 per 1M input / output tokens, the vendor's official price is $2 / $10. A service uses 10M input and 2M output tokens a month:
- Zukko: 10 × 0.27 + 2 × 1.32 = 2.70 + 2.64 = $5.34;
- official price: 10 × 2 + 2 × 10 = 20 + 20 = $40.
Vendor prices change often, so treat this as a sample calculation. For the current list and prices, call GET https://api.zukko.pro/v1/models or open the Models page in the dashboard.
Payment methods
Check how you can pay, whether there's a minimum amount and what the fees are. In Zukko the balance is in dollars, top-ups start at $1. Payment from Russia is available: SBP, Russian cards (Mir, Visa, MC — in rubles at the market rate at the time of payment), cryptocurrency. A foreign card (MasterCard EU) carries a fee of about 13%.
Limits and spending control
A good gateway lets you contain the damage from a bug or a leaked key. In Zukko, each key can have a daily and monthly dollar limit and a list of allowed models (allowed_models). Zukko has no general rate limit of its own: a 429 comes either when a key's limit is used up (key_daily_limit_reached / key_monthly_limit_reached) or from the model provider.
Documentation and error codes
A gateway without documented addresses, formats and error codes is hard to put into production. The minimum: base URLs for OpenAI and Anthropic clients, a list of endpoints, an error table with advice on what to do. Examples are the authentication reference and the key limits and cache page in the Zukko docs.
Support
Find out where to write if a charge looks odd or a model stops responding. For Zukko, that's the Telegram channel @zukkopro and the support contact appended to error messages.
Questions to ask a service before paying
- How is the cost of a request calculated, and where do I see it per request?
- Are prices in dollars per 1M tokens or in internal units? How do I convert?
- How are cache reads and writes billed for Claude and for GPT?
- Am I charged for requests that ended in an error?
- What payment methods, minimum amount, fees?
- Can I have several keys with limits and a model list?
- Is there a service-level rate limit, and what error code does it return?
- What happens when a model is switched off or renamed?
- How does the service handle request contents: what is stored and for how long? Look for the answer in the privacy policy.
Clear answers to these questions matter more than the lowest price on the list.
Risks and how to reduce them
Key leaks. A gateway key is money on the balance. Keep it only on the server, in environment variables, not in code and not in the frontend. Create a separate key per project and set limits: a leaked key can't spend more than its limit, and you can revoke it without touching the others. In Zukko, the full key is shown only once, at creation. What to do if a key does leak is covered in the article API key leaked.
Opaque pricing. Warning signs: no price for a specific request, "credits" instead of dollars per token, a price list without a date. The defense is a test run and a check by formula (below).
Data passes through an intermediary. A gateway technically sees requests and responses. Don't send more than needed: mask personal data before the request and read the service's privacy policy.
Dependence on one address. Keep the base URL and model name in config, not in code. Then moving to another service or model is a settings change. If a model is switched off, Zukko returns 503 with the model_disabled code — pick another one from GET /v1/models.
How to check a gateway in 15 minutes
Create a key with a $1 daily limit, top up the minimum amount and send a request. Then compare the cost from the header with your own calculation. Price in dollars per 1M tokens × number of tokens = cost in micro-dollars, so the formula needs no division:
from openai import OpenAI
PRICES = {"gpt-6.1-sol": (0.27, 1.32, 0.013)} # USD per 1M: input, output, cache read; Oct 7, 2026
client = OpenAI(base_url="https://api.zukko.pro/v1", api_key="fetch_your_key")
raw = client.chat.completions.with_raw_response.create(
model="gpt-6.1-sol",
messages=[{"role": "user", "content": "Name three criteria for choosing an API gateway."}],
)
resp = raw.parse()
u = resp.usage
cached = 0
if u.prompt_tokens_details and u.prompt_tokens_details.cached_tokens:
cached = u.prompt_tokens_details.cached_tokens
p_in, p_out, p_cache = PRICES["gpt-6.1-sol"]
expected = (u.prompt_tokens - cached) * p_in + cached * p_cache + u.completion_tokens * p_out
print("calculated, micro-dollars:", round(expected))
print("X-Zukko-Cost-Micros header:", raw.headers.get("x-zukko-cost-micros"))Example: 1,200 uncached input tokens and 300 output tokens on gpt-6.1-sol give 1,200 × 0.27 + 300 × 1.32 = 324 + 396 = 720 micro-dollars, i.e. $0.00072. A discrepancy noticeably larger than rounding is a reason to ask support. More checks are collected in the article how to compare API gateways fairly.
If you want to check Zukko against this list, create a key on the API keys page and run the script above.
FAQ
How does an API gateway differ from an OpenAI API proxy?
A network proxy only forwards traffic, while the key and billing stay with the vendor. An API gateway issues its own key, keeps its own balance and calls the models itself; often it gives access to models from several vendors.
Do I need to rewrite code to switch to a gateway?
If the gateway is OpenAI-compatible, no: you change the base URL (https://api.zukko.pro/v1) and the key. For the Anthropic SDK and Claude Code the address has no /v1: https://api.zukko.pro.
How can I tell the gateway isn't overcharging?
Compare the request cost from the response (in Zukko, the X-Zukko-Cost-Micros header or the dashboard history) with a calculation based on usage tokens and the published prices. Do it on several models and with caching.
What if my key ends up in someone else's hands?
Revoke it in the dashboard right away and create a new one. Key limits set in advance cap the possible damage.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Gemini API vs Vertex API: the difference and which one to pickGoogle offers two doors to Gemini: an AI Studio key or a Google Cloud project. We compare them and show a third route through a gateway.
- OpenAI API vs Anthropic API: the format differences and what to pick for your codeTwo request formats solve the same task but differ in details that break code when porting. A comparison of structure, tools, streaming, cache and headers.
- OpenRouter: what the service is and who it suits in 2026OpenRouter offers one API and one balance for many models from different providers. We cover how it works, its fees and limits, and when another gateway is more convenient.
- OpenAI API Keys in the Open: Why You Should Not Use ThemWhere free keys on GitHub come from, why using them is dangerous for you and for the owner, and how to protect your own key from the same leak.