How Much Does the OpenAI API Cost? Token Math Explained
API pricing is per token, so the honest answer depends on your prompt sizes. This page shows how to compute a bill yourself and what the same traffic costs on our endpoint.
Updated

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Key points
- OpenAI bills per token and the rate depends on the model, so read their current pricing page for the exact figure.
- Our endpoint costs $0.15 per 1M input tokens and $0.50 per 1M output tokens, with no subscription.
- A typical 2,000-token prompt with a 500-token reply costs $0.00055 here, which is $0.55 per 1,000 requests.
- There is no free unlimited tier. New users can claim $0.50 of trial credit, valid for 7 days.
The short answer
If you are asking how much does open ai api cost, the answer is a rate per million tokens that changes from model to model, and OpenAI changes its price list over time. We will not quote their numbers here, because a number copied into an article goes stale. Open their pricing page, find the model you plan to call, and write down two figures: the price per 1M input tokens and the price per 1M output tokens.
Those two figures plus your own token counts are all you need. The rest of this page shows the arithmetic, using the rates of our endpoint so you can follow every step: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Swap in any other rates and the same formulas still hold. If you only want to compare, scroll to the section on comparing providers.
How token billing works
A token is a chunk of text, usually a short word or part of a longer one. As a rough rule, English prose runs about 1.3 tokens per word, so 1,000 words is around 1,300 tokens. Code and non-English text usually take more tokens per word. Your API response reports the real count in a usage block, and that count is what you are billed on.
Every request has two sides. Input tokens are everything you send: the system prompt, the chat history, any documents you paste in. Output tokens are what the model writes back. Output is priced higher than input, here by a factor of 3.33, because generating text costs more compute than reading it.
The cost of one request is a short formula:
cost = input_tokens / 1_000_000 * 0.15 + output_tokens / 1_000_000 * 0.50
One detail catches people out. Chat APIs are stateless, so a multi-turn conversation resends the whole history on every call. The tenth message of a chat pays for the first nine again as input. Long chats cost more per message than short ones, even if each message is tiny.
Worked examples at $0.15 and $0.50 per 1M
Here are five common request shapes. Each row multiplies tokens by the rate, then adds input and output.
| Request shape | Input cost | Output cost | One request | 1,000 requests |
|---|---|---|---|---|
| 500 in, 200 out (short Q and A) | $0.000075 | $0.0001 | $0.000175 | $0.175 |
| 2,000 in, 500 out (typical chat turn) | $0.0003 | $0.00025 | $0.00055 | $0.55 |
| 8,000 in, 1,000 out (document task) | $0.0012 | $0.0005 | $0.0017 | $1.70 |
| 30,000 in, 400 out (long roleplay history) | $0.0045 | $0.0002 | $0.0047 | $4.70 |
| 100,000 in, 1,000 out (full context window) | $0.015 | $0.0005 | $0.0155 | $15.50 |
Take the second row as the check. 2,000 tokens is 0.002 of a million, and 0.002 times $0.15 is $0.0003. 500 tokens is 0.0005 of a million, and 0.0005 times $0.50 is $0.00025. The sum is $0.00055. Multiply by 1,000 and you get $0.55.
The last row is the ceiling. The context window is 100,000 tokens for prompt plus completion, so a request that fills it with input and asks for 1,000 tokens back costs about a cent and a half. Even the largest single call stays cheap. Volume is what adds up, not any one request.
What a month of traffic costs
Single requests tell you little. Monthly cost depends on how many you send, so here are two realistic profiles.
A small app with steady traffic
Say your app handles 500 requests per day, each with 3,000 input tokens and 600 output tokens. One request costs 3,000 times $0.15 per million, which is $0.00045, plus 600 times $0.50 per million, which is $0.0003. That is $0.00075 per request, $0.375 per day, and $11.25 for a 30-day month.
A batch job
Now a one-off job: summarise 5,000 documents of 6,000 tokens each, writing 300 tokens per summary. Input is 5,000 times 6,000, which is 30,000,000 tokens, so $4.50. Output is 5,000 times 300, which is 1,500,000 tokens, so $0.75. The whole job costs $5.25.
A single long chat
A 20-turn conversation starts with a 500-token system prompt, and each turn adds 150 tokens from the user and 250 from the model. The input on turn k is 650 plus 400 times (k minus 1) tokens, so across 20 turns the input adds up to 13,000 plus 76,000, which is 89,000 tokens. Output is 20 times 250, which is 5,000 tokens. Cost: $0.01335 for input plus $0.0025 for output, $0.01585 for the whole conversation, under two cents.
What a top-up buys
You pay in advance and spend the balance down. There is no subscription and the credit never expires. Top-ups are any whole amount from $20 to $500, paid in USDT on TRC20 or USDC on Base. Larger top-ups carry a bonus.
| You pay | Bonus | Credit added |
|---|---|---|
| $20 | none | $20.00 |
| $50 | +5% | $52.50 |
| $100 | +10% | $110.00 |
| $200 | +15% | $230.00 |
| $500 | +15% | $575.00 |
To turn credit into requests, divide it by the cost of one request. With the typical chat turn above ($0.00055), a $20 top-up covers about 36,000 requests. With the short Q and A shape ($0.000175) it covers about 114,000. With full-window calls at $0.0155, it covers about 1,290. Failed or refused requests are not charged, so you do not pay for calls that return an error. Current plans and the payment steps are on the pricing page.
Comparing with OpenAI without guessing
A fair comparison needs the same workload on both sides. Take your real token counts, from your logs or from the usage field of a few test calls, and run the formula twice: once with the rates of the OpenAI model you would use, once with $0.15 and $0.50. Compare the totals, not the headline rates, because input and output are weighted differently in each workload. A job that is mostly input and a job that is mostly output can rank two providers in opposite order.
Price is only one axis. Models differ in quality, in how long a context they accept, and in what they refuse to write. Our endpoint serves one open-weight model, the one behind model ID uncensored, run by an independent provider. It is text only, so there is no image, audio or embeddings. If you need those, or the specific behaviour of a particular vendor's flagship model, a cheaper token price does not help. If you need a model that answers without content refusals for lawful adult use, the comparison is a different one.
To test a real workload, point the OpenAI SDK at https://api.openainsfw.cc/v1, set the model to uncensored, and send a sample. The quickstart has the full first request, and the response header X-Balance-USD shows your remaining balance after each call, which gives you the true cost of the test.
No free unlimited tier
Searches for API costs often end with a hope for a free tier. There is none here, and we would rather say so. What exists is a small trial: after sign-up with Google, or with email and password, you can claim $0.50 of trial credit with one click on the API key page. It is one per person, valid for 7 days, and needs no payment. A trial key allows 2 concurrent requests and 60 requests per minute.
At typical chat sizes, $0.50 covers roughly 909 requests of 2,000 input and 500 output tokens, since 0.50 divided by 0.00055 is 909. That is enough to test streaming, tool calling and JSON mode on real prompts and to estimate your bill before you add any credit.
Ways to keep the bill small
- Trim history. Since history is billed as input on every turn, keep only the last N messages or summarise old ones. This is the largest lever for chat products.
- Cap output when you can.
max_tokensis optional, but a ceiling prevents a runaway reply from costing more than you planned. - Keep the system prompt short. It rides along on every call. A 1,500-token prompt sent 100,000 times is 150,000,000 input tokens, which is $22.50.
- Watch the balance header. Log
X-Balance-USDandX-Request-Idper call so you can find expensive requests later. - Do not retry blindly. A 429 with
Retry-After: 5means wait five seconds, not resend in a tight loop.
More guides
Questions and answers
How much does the OpenAI API cost per month?
It depends on the model and your token volume, so there is no single figure. Multiply your monthly input and output tokens by the per-million rates on OpenAI's current pricing page. For our endpoint the same sum uses $0.15 and $0.50 per 1M tokens.
Is there a free tier on your API?
No free unlimited tier. New users can claim $0.50 of trial credit with one click after sign-up. It is valid for 7 days and one per person.
Does credit expire?
No. Prepaid credit never expires, and there is no subscription. You top up any whole amount from $20 to $500 and spend it down.
Am I charged for failed requests?
No. Failed or refused requests are not charged.
Can I use the OpenAI SDK with your endpoint?
Yes. Set the base URL to https://api.openainsfw.cc/v1, use your key, and set the model to uncensored. The rest of your code stays the same.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.