EN ▾

Cheap AI API: how to compare prices and spend less

Uncensored AI: Debunking Common Myths

Updated

Cheap AI APIs are cheap depending on how you measure them: the price per million tokens is misleading if you do not separate input and output. Here is a method to compare, the calculation with $0.15 and $0.50, and tricks to spend less.

Key points

  • Always compare input and output prices separately, and per million tokens.
  • With $0.15 input and $0.50 output, a call with 1,000 and 500 tokens costs $0.0004.
  • Trimming a 20-turn chat history reduces the cost by about 41%.
  • Also look at what is not in the price: subscriptions, expiration, and error charges.
Coins flowing through a glass pipe into a luminous meter

How to read an API price without being fooled

When you search for cheap AI APIs, the number you see on the cover is rarely enough. There are four things to look at before deciding:

  1. The unit. Some prices are per thousand tokens and others per million. Convert everything to the same unit, for example dollars per million.
  2. Input and output separately. What you send (prompt and history) and what the model generates are charged differently. An average price between the two hides which weighs more in your case.
  3. Surrounding conditions. Mandatory monthly subscription, expiring balance, minimum top up, charge for failed requests.
  4. The context window. A model with a large window allows pasting more text, but each token sent is charged.

I do not give you figures from other providers' prices, because they change often: check their current page and make the same table with their numbers. For the service on this site, the data is this: $0.15 per million input tokens, $0.50 per million output tokens, prepaid balance without subscription, no expiration, and failed or rejected requests are not charged.

The formula and a first example

The cost of a call is simple:

cost = input_tokens × 0.15 / 1,000,000 + output_tokens × 0.50 / 1,000,000

Example: 1,000 input tokens and 500 output tokens. Input costs 1,000 × 0.15 / 1,000,000 = $0.00015. Output, 500 × 0.50 / 1,000,000 = $0.00025. Total: $0.0004. A thousand such calls are $0.40.

Notice the ratio: the output token costs 0.50 / 0.15, a bit more than 3.3 times what the input token costs. That changes the strategy depending on the work. If you summarize long documents, you pay mostly input. If you generate long stories, you pay mostly output.

Three workloads, three bills

WorkPer call (input / output)Cost per callVolumeTotal
Summarize documents3,000 / 300$0.000650 documents$0.03
Extract data in JSON500 / 100$0.00012510,000 records$1.25
Support chat2,000 / 400$0.00055,000 responses$2.50

The calculations: 3,000 × 0.15 / 1,000,000 = $0.00045 and 300 × 0.50 / 1,000,000 = $0.00015, total $0.0006; for 50, $0.03. In the second, $0.000075 plus $0.00005 gives $0.000125; for 10,000, $1.25. In the third, $0.0003 plus $0.0002 gives $0.0005; for 5,000, $2.50.

Notice that a large job, like extracting data from ten thousand records, costs as much as a coffee. The price per token really matters when the volume rises to tens of millions of tokens per month.

Six ways to spend less

1. Trim the chat history

Each turn forwards the entire conversation. Assume a chat of 20 turns, with a system message of 300 tokens, 150 user tokens and 250 response tokens per turn. Without trimming, the total input is 20 × 450 + 400 × (0 + 1 + ... + 19) = 9,000 + 76,000 = 85,000 tokens, and the output 5,000. Cost: 85,000 × 0.15 / 1,000,000 = $0.01275, plus 5,000 × 0.50 / 1,000,000 = $0.0025, totaling $0.01525.

If you keep only the last 6 turns (and summarize the rest), the input drops to 43,000 tokens: $0.00645 for input plus $0.0025 for output, about $0.0089. This is a saving of around 41% with the same number of messages.

2. Limit the output

max_tokens is optional, but setting it prevents excessive responses. A clear length instruction in the prompt does the same.

3. Use stop and JSON mode

A short stop sequence cuts the text when you already have what you need, and response_format: {"type": "json_object"} reduces filler when you only want structured data.

4. Shorten the system message

A system message of 1,500 tokens sent in 10,000 calls is 15 million input tokens: $2.25. If you leave it at 500, it costs $0.75.

5. Test with few samples

Before launching a large batch, run 20 items and check usage. Fixing the prompt in time saves repeating the batch.

6. Monitor the balance

The X-Balance-USD header tells you how much is left after each call, and you can log consumption per task to see which spends more.

Calculate spending from code

A small wrapper that accumulates the cost of each call gives you the real figure, not an estimate:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.apisinrestricciones.com/v1",
    api_key=os.environ["API_KEY"],
)
gasto = 0.0

def preguntar(texto):
    global gasto
    r = client.chat.completions.create(
        model="uncensored",
        messages=[{"role": "user", "content": texto}],
        max_tokens=300,
    )
    gasto += r.usage.prompt_tokens * 0.15 / 1e6
    gasto += r.usage.completion_tokens * 0.50 / 1e6
    return r.choices[0].message.content

print(preguntar("Explica qué es un token en dos frases."))
print(f"Gasto acumulado: ${gasto:.6f}")

With that figure you can project the month: average cost per call multiplied by the number of planned calls.

What else to check before choosing

The price per token is only part of it. Also look at the limits: a full key allows 8 concurrent requests and 300 per minute, and a trial key allows 2 and 60. If your app needs more throughput, those caps weigh more than a few cents of difference.

Top-ups range from $20 to $500 in whole numbers, with a +5% bonus from $50, +10% from $100, and +15% from $200, and are paid in crypto (USDT on TRC20 or USDC on Base). For example, a $100 top-up leaves a balance of $110. The details are on the pricing page. To see actual usage for your case, you can claim the $0.50 free trial credit from the API key page, and all parameters are in the documentation.

Remember that it is a text-only service, with a single open model: if your project needs images or embeddings, this is not the tool.

More guides

Frequently asked questions

How much does a typical call cost?

A call of 1,000 input tokens and 500 output tokens costs $0.0004, with $0.15 and $0.50 per million tokens.

Is there a monthly subscription?

No. It is pay as you go with prepaid credit, and the credit never expires.

Do I get charged for failed requests?

No. Failed or rejected requests are not charged.

How do I know how much I spent?

Each response includes the usage field with the tokens, and the X-Balance-USD header shows the remaining balance.

Your key is one step away

Create an account, copy the key and change the base URL. That's easy.

Get API key
Get API key