EN ▾
Get API key

How Much Is the OpenAI API? Token Pricing Explained

The OpenAI API is billed per token, and the rate depends on the model you pick. This page explains the billing model, shows how to estimate a bill, and prices the same workloads on our flat rates.

Updated

Isometric scale weighing stacks of token blocks against coins, illustrating per-token API pricing
per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Key points

  • API pricing is per token, with separate rates for input (prompt) and output (completion).
  • OpenAI's rates change by model and over time, so read their pricing page before you budget.
  • Here the rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens for one model.
  • A chat that resends its history on every turn costs far more input than the visible text suggests.

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).

Get API key

The short answer

If you are asking how much is open ai api access, the honest answer is that there is no single number. OpenAI sells several models, each with its own price per million input tokens and its own price per million output tokens, and those prices have changed over time. The only reliable source is OpenAI's own pricing page, so check their current pricing before you commit to a budget. Anything quoted in a blog post, including this one, can be out of date by the time you read it.

What does stay constant is the shape of the bill. You pay for tokens in, and you pay for tokens out. Everything else in this article is about that shape: how to measure it, how chat history inflates it, and how to turn it into a dollar estimate for your own app. To make the arithmetic concrete, we price every example at the rates of this service, which are fixed and easy to check: $0.15 per 1M input tokens and $0.50 per 1M output tokens.

Two things the OpenAI API is not: it is not the same product as a ChatGPT subscription, and it is not free after a trial. A chat subscription and API usage are billed separately, so paying for one does not give you credit in the other.

How per-token billing works

A token is a chunk of text the model reads or writes. In English, one token is roughly four characters, or about three quarters of a word, so 1,000 tokens is around 750 words. Code, non-English text and unusual names split into more tokens per word, which means the same page costs more in those cases.

Every request has two meters running:

  • Input tokens are everything you send: the system prompt, the earlier messages, tool definitions and the new user message.
  • Output tokens are everything the model writes back. Output is normally priced higher than input, because generating text costs more compute than reading it.

The two meters multiply by different rates and then add up. The formula is simple enough to keep in a spreadsheet:

cost = input_tokens x input_rate / 1,000,000 + output_tokens x output_rate / 1,000,000

Provider pricing pages usually add a few more variables: different models at different rates, discounts for cached prompt prefixes, batch jobs at a lower rate, and extra charges for features such as image input. Those details are exactly why a single "how much" answer does not exist. When you compare providers, line up the same workload against each price sheet instead of comparing headline numbers.

Our rates, worked out on real workloads

This service has one model, the model ID is uncensored, and the price does not change with request size or time of day. Pay as you go from prepaid credit, no subscription, and failed or refused requests are not charged. Here is what four common workloads cost.

WorkloadInput tokensOutput tokensMathCost
One chat exchange2,000500$0.0003 + $0.00025$0.00055
20-turn conversation (history resent)94,0006,000$0.0141 + $0.003$0.0171
Batch of 10,000 summaries10,000,0004,000,000$1.50 + $2.00$3.50
1M tokens each way1,000,0001,000,000$0.15 + $0.50$0.65

The first row: 2,000 input tokens are 2,000 / 1,000,000 x $0.15 = $0.0003, and 500 output tokens are 500 / 1,000,000 x $0.50 = $0.00025. The batch row comes from 10,000 requests of 1,000 tokens in and 400 tokens out, which is 10M tokens in ($1.50) and 4M tokens out ($2.00).

The cheapest top-up is $20. At the batch price above, $20 covers five full runs of 10,000 summaries ($17.50) with $2.50 left over. The full list of rates lives on the pricing page.

Why a chat app costs more than the visible text

The most common budgeting mistake is counting only the text the user sees. A chat completion endpoint is stateless. The model does not remember turn one when you send turn two, so your app sends the whole conversation again, every time. Input tokens therefore grow with every turn, while output stays about the same size.

Take the 20-turn row from the table. The setup is a system prompt of 800 tokens, and each turn adds a 100-token user message and a 300-token reply. On turn n the request carries the system prompt, all earlier turns, and the new message. That works out to 900 input tokens on turn 1, 1,300 on turn 2, and so on up to 8,500 on turn 20. Adding them gives 20 x 900 + 400 x (0 + 1 + ... + 19) = 18,000 + 76,000 = 94,000 input tokens. The replies add up to 20 x 300 = 6,000 output tokens.

The bill: 94,000 x $0.15 / 1M = $0.0141 for input, plus 6,000 x $0.50 / 1M = $0.003 for output, which is $0.0171 for the whole conversation. Notice that input is 94% of the tokens and about 82% of the money. The visible text, which is 20 user messages and 20 replies, is only 8,000 tokens.

Three habits keep this under control:

  • Trim or summarize old turns once the history passes a limit you choose.
  • Keep the system prompt short. It is paid for again on every single request.
  • Set a sensible max_tokens when you want short answers. It is optional here, and without it a completion can use the rest of the 100,000-token window.

Measure your own usage instead of guessing

Every response includes a usage object with the exact prompt and completion token counts, so you can log real numbers after a day of testing and extrapolate. The same applies to streamed responses: usage arrives at the end of the stream. This snippet prices each call from the response itself:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.uncensoredaichat.cc/v1",
    api_key="YOUR_API_KEY",
)

IN_RATE = 0.15   # dollars per 1M input tokens
OUT_RATE = 0.50  # dollars per 1M output tokens

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Write a two-sentence product blurb."}],
)

u = resp.usage
cost = u.prompt_tokens * IN_RATE / 1_000_000 + u.completion_tokens * OUT_RATE / 1_000_000
print(u.prompt_tokens, u.completion_tokens, f"${cost:.6f}")

The response headers also help. X-Balance-USD shows your remaining credit after each call, which is handy for a dashboard or an alert when the balance runs low. To see the same request from the command line:

curl -i https://api.uncensoredaichat.cc/v1/chat/completions   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hi."}]}'

Run your real prompts through this for a day, sum the token counts, and multiply by the two rates. That beats any estimate made from word counts. If you want a full walkthrough of the request format, the API documentation lists every parameter.

Top-ups, bonuses and the trial

Credit is prepaid in whole dollar amounts from $20 to $500, and it never expires, so a top-up does not turn into a monthly commitment. Larger top-ups carry a bonus: +5% from $50, +10% from $100 and +15% from $200. In practice $50 buys $52.50 of credit, $100 buys $110, and $200 buys $230.

Payment is by crypto: USDT on TRC20 or USDC on Base. The key page is where sign-up and the top-up flow live.

Before you pay anything, you can claim $0.50 of trial credit with one click on the API key page after sign-up. It is valid for 7 days, needs no payment details, and is one per person. At the single-exchange price from the table ($0.00055), the trial covers about 900 chat exchanges, which is plenty for testing a prototype. Trial keys are limited to 2 concurrent requests and 60 requests per minute. Full keys get 8 concurrent requests and 300 requests per minute.

When the OpenAI API is the better fit

Comparing on price alone would be misleading. The OpenAI API offers several models, and the platform includes features this service does not have: image input and generation, audio, embeddings and fine-tuning. If your product needs any of those, or needs a particular OpenAI model, use OpenAI.

This service is a narrower tool. It is a hosted, OpenAI-compatible text API for one open-weight model that is tuned to answer without content refusals for lawful adult use. It is run by an independent provider, it is not OpenAI's API, and it is not a router across vendors. The hard limit is that sexual content involving minors is never allowed. Prompts are not used for training.

The compatibility is what makes switching cheap to try. Any OpenAI SDK or client works once you change the base URL and key, so you can point the same code at both services and compare real invoices for your own traffic. The integration guide covers the practical side, including streaming, tool calling and JSON mode.

Questions and answers

Is the OpenAI API free?

OpenAI's pricing and any free allowances change, so check their current pricing page. On this service, new users can claim $0.50 of trial credit with one click after sign-up, valid for 7 days.

Does a ChatGPT subscription include API usage?

No. A ChatGPT subscription and the API are billed separately, so paying for one does not give you credit in the other. Confirm the current terms on OpenAI's site.

How many tokens are in 1,000 words?

Roughly 1,300 tokens for plain English, using the rule of thumb that one token is about three quarters of a word. Code and non-English text usually need more.

Are failed requests charged here?

No. Failed or refused requests are not charged, and you pay only for completed tokens at $0.15 per 1M input and $0.50 per 1M output.

Can I use the OpenAI SDK with this API?

Yes. Change the base URL to https://api.uncensoredaichat.cc/v1, use your key as the Bearer token, and set the model to uncensored.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Start with trial credit

Email and password, key on screen right away.