Cheap AI API: what it really costs per token
A cheap AI API is one that charges little for what you actually use, and that is only discovered by doing the math. Here are the calculations with real prices per million tokens.

Updated

Key points
- Input costs $0.15 and output $0.50 per 1M tokens
- 1,000 average-length chat messages cost about US$ 0.27
- The history resubmitted with each question is the biggest cost driver
- Failed or rejected requests are not charged
Short answer: the price per token
Those looking for a cheap AI API want to know two things: the list price and what comes out at the end of the month. The list price of this API is this:
| Token type | Price per 1M | Price per 1,000 tokens |
|---|---|---|
| Input (prompt) | $0.15 | US$ 0.00015 |
| Output (response) | $0.50 | US$ 0.0005 |
There is no subscription. You top up credit and it is deducted as you use it. The credit never expires, so there is no pressure to spend it all in one month. The full list is at pricing and top-up bonuses.
How the calculation is done
The cost of each request is the sum of two parts:
custo = (tokens_entrada x 0,15 / 1.000.000) + (tokens_saida x 0,50 / 1.000.000)Output tokens cost about 3.3 times more than input tokens (0.50 divided by 0.15). This matters: a huge prompt with a short response is cheap, while a long response weighs more on the invoice than it seems.
As a rule of thumb, in Portuguese one token is roughly equivalent to three to four characters, so a standard text page runs about 400 to 600 tokens. This is an estimate, not an exact measure. The actual number appears in the usage field of the response, and that is what you should base your calculations on.
Example 1: a chatbot with average messages
Assume a message with 800 input tokens (instructions, recent history and the question) and 300 output tokens.
- Input: 800 x 0.15 / 1,000,000 = US$ 0.00012
- Output: 300 x 0.50 / 1,000,000 = US$ 0.00015
- Total per message: US$ 0.00027
For 1,000 messages, it is US$ 0.27. A minimum top-up of US$ 20 would cover about 74,000 messages (20 divided by 0.00027) for this profile. The US$ 0.50 free trial credit would cover about 1,850 messages, enough to validate an entire prototype.
Example 2: summarizing long documents
Here the profile reverses: lots of input, little output. A 50,000-token document summarized in 1,000 tokens:
- Input: 50,000 x 0.15 / 1,000,000 = US$ 0.0075
- Output: 1,000 x 0.50 / 1,000,000 = US$ 0.0005
- Total: $0.008
A thousand such documents cost US$ 8. The context window is 100,000 tokens (prompt plus response), so documents up to that size fit in a single request. Above that, split the text into parts.
Three usage profiles side by side
The same price per token generates very different invoices depending on the task format. The table compares three common profiles, all calculated with US$ 0.15 and US$ 0.50 per 1M.
| Task | Input / output per request | Cost per request | Cost of a typical volume |
|---|---|---|---|
| Classify short texts | 300 / 20 | $0.000055 | 100.000 calls: US$ 5,50 |
| Chatbot | 800 / 300 | $0.00027 | 1,000 messages: US$ 0.27 |
| Summarize document | 50.000 / 1.000 | $0.008 | 1,000 documents: US$ 8.00 |
Classification is the cheapest per call because it generates almost no output. If your workflow is like this, the total cost tends to be much lower than you imagine. If it is long generation, such as stories and chapters, the output dominates the bill and it is worth measuring a real case before projecting the month.
Projecting the month
For an app with 200 active users, each sending 10 messages per day in the chatbot profile above, that is 200 x 10 x 30 = 60,000 messages. Multiplying by US$ 0.00027, the monthly spend is US$ 16.20. A US$ 100 top-up comes with a 10% bonus, meaning US$ 110 in credit, which would cover more than six months at this pace. The numbers are hypothetical: replace them with your own and confirm with the usage field on your first real requests.
The hidden villain: conversation history
Chat APIs do not store memory. With each question, you resend the entire history, and the input grows with each turn. Look at a conversation of 20 turns with 500 tokens of fixed instructions, 100 tokens per question and 200 per response.
Without limiting the history
The input at turn k is 600 + 300 x (k - 1). Summing the 20 turns: 69,000 input tokens and 4,000 output tokens. Cost: 69,000 x 0.15 / 1,000,000 = US$ 0.01035, plus 4,000 x 0.50 / 1,000,000 = US$ 0.002. Total: about US$ 0.0124.
Keeping only the last 6 turns
The total input drops to 41,700 tokens. Cost: US$ 0.006255 for input plus the same US$ 0.002 for output, about US$ 0.0083. The savings are approximately one third, without changing the model.
The longer the conversation, the greater the difference, because the cost without limit grows quadratically.
Six ways to spend less
- Limit the history. Send only the last turns and, if you need long-term memory, a short summary of what came before.
- Set
max_tokens. It is optional, but a ceiling prevents answers that extend beyond what is necessary. Remember that the output is the most expensive part. - Write concise instructions. A 2,000-token system prompt repeated in each request adds up quickly.
- Ask for a short format. Instead of "explain in detail", ask "answer in up to three sentences" when that is enough.
- Use JSON mode for extraction. With
response_formatset tojson_objectyou get only the fields you need, without surrounding text. - Monitor the balance. The
X-Balance-USDheader comes in every response and allows you to record the cost per task.
A minimal example that already applies the output limit and reads the usage:
from openai import OpenAI
client = OpenAI(
base_url="https://api.apiiasemcensura.com/v1",
api_key="SUA_CHAVE",
)
r = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Resuma em três frases: ..."}],
max_tokens=200,
)
u = r.usage
custo = u.prompt_tokens * 0.15 / 1_000_000 + u.completion_tokens * 0.50 / 1_000_000
print(f"US$ {custo:.6f}")Spending little also means avoiding waste in your app's infrastructure. The full key accepts 8 parallel requests and 300 per minute; the test key, 2 parallel and 60 per minute. If you exceed the limit, the API responds with HTTP 429. Respect the Retry-After header instead of repeating the call in a loop: since rejected calls are not charged, the cost of a 429 is just the delay, but a poorly made loop of retries can lock your entire queue.
Cheap also depends on what you get
Low price only matters if the tool serves your use case. Some points to weigh before deciding:
- It is an open model, hosted by an independent provider. It is not the official API of any big tech.
- It generates text only. There is no image, audio, embeddings or fine-tuning.
- The model responds without content refusals for legal adult use. Sexual content involving minors is prohibited, without exception.
- Failed or rejected requests are not charged.
- Your prompts are not used for training.
To start without spending, generate a key and redeem the US$ 0.50 free trial credit with one click, at no cost. Top-ups, from US$ 20 to US$ 500, are paid in USDT on the TRC20 network or USDC on the Base network, with a 5% bonus from US$ 50, 10% from US$ 100 and 15% from US$ 200. The technical guide is in the documentation. If your goal is to understand what a model with no content filters does in practice, also read uncensored AI.
More guides
Frequently asked questions
How much does a cheap AI API cost for 1 million tokens?
Here, 1 million input tokens cost $0.15 and 1 million output tokens cost $0.50. A real conversation mixes both, so use the formula to estimate your case.
Is there a monthly fee or minimum plan?
No. Payment is pay per use, from prepaid credit. The minimum top-up is US$ 20 and the credit never expires.
How much do I spend if I test with the free credit?
The free trial credit is $0.50, valid for 7 days. With messages of 800 input tokens and 300 output tokens, this yields about 1,850 messages.
Are failed calls charged?
No. Failed or rejected requests are not charged. What was successfully generated appears in the usage field of the response.
Can I use the OpenAI SDK?
Yes. Just change the base URL and the key. The model ID is uncensored.
Your key is one form away
Create an account, copy the key and change the base URL. That is all the configuration.