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

Is an OpenAI API Key Free? How API Billing Works, Free Credit, and How to Read Your Bill

Getting an API key is free, but every call draws down prepaid credit by tokens. How billing works, how to estimate cost before you call, where to check for free credit, and what happens when the balance hits zero.

TL;DR: An API key itself is free; the calls are not. OpenAI's API is prepaid: you add credit on the Billing page, each request draws it down by input and output tokens, and when the balance reaches zero requests fail instead of a bill arriving later. It is billed separately from ChatGPT Plus, so a Plus subscription gives no API credit. What you actually spend depends on three things: the model you pick (unit prices differ by an order of magnitude), how many tokens you send, and how long the output is. To estimate before you call, use cost per request = input tokens × input price + output tokens × output price, then multiply by the number of calls. Current prices and whether a new account has any promotional credit are shown on the official pricing page and your own Billing page, so this article does not hard-code numbers that will change.

1. The key is free; the calls are billed

'Is an API key free?' mixes two things. Creating a key costs nothing; it is just a credential. Every call made with it is what gets billed. So the idea of 'buying an API key' is misleading: what you buy is balance, not the key. Third parties that sell 'API keys' are really selling someone else's account quota or a relay service's credit, and you have to judge the source and its stability yourself.

2. How billing works: prepaid, per token, error at zero

You add credit first, and each call draws it down by tokens. When the balance is short, requests fail, commonly with HTTP 429 and an insufficient-quota error code. Note that this 429 does not mean 'too fast' — it means 'no money', so retrying never helps and you must top up. Prepaid credit typically has an expiry and is generally non-refundable; confirm both on the current Billing page. Your rate-limit tier also rises with cumulative spend, which is why brand-new accounts have lower concurrency and tokens-per-minute.

3. Estimating cost before you call

The formula is simple: cost per request = input tokens × input price + output tokens × output price, multiplied by expected calls. Two rules of thumb. Output is usually priced at a multiple of input, so asking the model to say less often saves more than sending less. And English runs at about 1.3 tokens a word while other languages, code and JSON usually cost more tokens, so leave margin. The most accurate method is to run one real request and read the `usage` field in the response. Take the unit prices from the official pricing page, never from an article.

4. Free credit: check, do not rely on rumours

Claims such as 'new accounts get a few dollars free' change with time, region and policy, and many accounts today have none. There is one reliable test: after signing up and verifying, open the Billing or Usage page and see whether any promotional credit and expiry date are shown. If it shows zero, there is none. Do not create multiple accounts to chase free credit; that is a fast way to trigger account risk checks.

5. Reading your bill and usage

The Usage page breaks consumption down by date, model and project, and the Billing page shows balance and top-ups. Two habits pay off: one key per project, so usage splits cleanly and a leaked key can be revoked alone; and a monthly budget cap with a balance alert, so a runaway script cannot drain the account. If you call through a relay, trust its own usage log and reconcile it once against your local counts.

6. Four ways to spend less, in order of impact

First, pick the right model: simple tasks on a small model can cost an order of magnitude less, the biggest lever there is. Second, cap output length with a sensible `max_tokens` and a request for brevity. Third, trim context: do not let multi-turn history grow without limit, and retrieve before sending long documents. Fourth, caching and batch processing: the official API prices repeated prefixes and offline batches differently; check the current documentation for conditions. Do not reverse this order — tuning caching before choosing the right model is optimising the wrong thing.

7. The real obstacle for many users: the top-up

For many developers outside supported card regions the difficulty is not how much it costs but the first payment: the official Billing needs a card the processor accepts, and many local cards are declined by issuing country. Two routes exist. Open a US-issued virtual card and bind it to the official billing (ours has a tested record on OpenAI, though a small first charge is still sensible). Or use an OpenAI-compatible endpoint that takes Alipay or WeChat and bills per use, where your code changes only the base URL. Before choosing a relay, run three checks: list `/v1/models`, compare a capability-sensitive prompt against the official API, and run an open-source checker.

8. A checklist before you start

1. Confirm balance and any promotional credit on the Billing page. 2. Estimate one full task with the formula. 3. Set a monthly cap and a balance alert. 4. One key per project. 5. Run one small request and check the usage field. 6. On a 429, read the body to see whether it is rate limiting or quota. 7. If payment is the blocker, pick a route from our top-up guide.

OpenAI API costs: five things to settle

QuestionAnswerWhere to confirm
Is the key free?The key is free, calls are billed per tokenAPI keys page in your account
How do you pay?Prepaid credit, drawn down per callBilling page
Is there free credit?Not guaranteed; trust what your account showsBilling / Usage after sign-up
What at zero balance?Requests fail (commonly 429 insufficient_quota)The error response body
Cost per request?Input and output tokens priced separately, by modelOfficial pricing page plus the usage field in each response

FAQ

Is an OpenAI API key free?

The key costs nothing; calls do. The official API is prepaid credit drawn down by input and output tokens, and requests fail when the balance is gone. Current prices are on the official pricing page.

Does the OpenAI API have free credit?

Not reliably. Promotional credit varies with time and region. Whatever your Billing or Usage page shows is the truth; if it shows nothing, there is none.

Does ChatGPT Plus include API credit?

No. ChatGPT Plus and the API are billed separately, and a Plus subscription includes no API usage.

What happens when the API balance runs out?

Requests fail, commonly with HTTP 429 and an insufficient-quota error code. It is not rate limiting, so retrying is pointless; you need to add credit.

How do I estimate the cost of a call in advance?

Cost per request = input tokens × input price + output tokens × output price. The most accurate way is to run one request and apply the official unit prices to the usage numbers in the response.

What if I cannot top up from my country?

Either bind a card the processor accepts, or use an OpenAI-compatible endpoint that takes local payment methods and bills per use. Check any relay's model list, compare a capability prompt, and run an open-source checker first.

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 →
Is an OpenAI API Key Free? Billing and Free Credit · cocodot