No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Get API keyKey points
- Cost = input tokens / 1,000,000 x $0.15 + output tokens / 1,000,000 x $0.50.
- A typical 1,500-token prompt with a 400-token reply costs $0.000425, so $20 covers about 47,000 such requests.
- Chat history is resent every turn, so input tokens grow faster than most people expect.
- The API returns exact token counts and your balance, so you can verify any estimate.
The formula
Every request on this API is billed from two counters, and nothing else:
cost = input_tokens / 1,000,000 x 0.15 + output_tokens / 1,000,000 x 0.50
Input tokens are everything you send: system prompt, chat history, pasted documents and tool definitions. Output tokens are what the model writes back. The rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens. Output is a little over three times the input rate, so a long reply weighs more than a long prompt of the same size.
There is no subscription and no seat price. You draw down prepaid credit, and credit never expires. Failed or refused requests are not charged, so your calculation only has to cover requests that succeed.
Worked examples you can check by hand
Here are five common jobs, each computed from the formula. Use them as anchors to place your own workload.
| Job | Input | Output | Input cost | Output cost | Total |
|---|---|---|---|---|---|
| Short chat reply | 2,000 | 500 | $0.0003 | $0.00025 | $0.00055 |
| Support bot answer | 1,500 | 400 | $0.000225 | $0.0002 | $0.000425 |
| Story chapter | 1,000 | 3,000 | $0.00015 | $0.0015 | $0.00165 |
| Long document summary | 80,000 | 2,000 | $0.012 | $0.001 | $0.013 |
| Near-full window | 98,000 | 2,000 | $0.0147 | $0.001 | $0.0157 |
The pattern is easy to see. Short jobs cost a fraction of a cent. Even a request that nearly fills the 100,000-token window stays under two cents. What adds up is volume, not size.
Take the support bot row. At $0.000425 per request, $20 of credit pays for about 47,000 requests ($20 / $0.000425 = 47,058). If you handle 30,000 such requests a month, the bill is 30,000 x $0.000425 = $12.75.
A calculator you can paste
You do not need a web form for this. A few lines of code do the job and can live inside your own tooling.
Python
INPUT_PER_M = 0.15
OUTPUT_PER_M = 0.50
def cost_usd(input_tokens: int, output_tokens: int) -> float:
return (input_tokens / 1_000_000) * INPUT_PER_M + (output_tokens / 1_000_000) * OUTPUT_PER_M
def requests_per_budget(budget_usd: float, input_tokens: int, output_tokens: int) -> int:
return int(budget_usd / cost_usd(input_tokens, output_tokens))
print(f"{cost_usd(1500, 400):.6f}") # 0.000425
print(requests_per_budget(20, 1500, 400)) # 47058JavaScript
const IN_PER_M = 0.15;
const OUT_PER_M = 0.5;
const costUsd = (inputTokens, outputTokens) =>
(inputTokens / 1e6) * IN_PER_M + (outputTokens / 1e6) * OUT_PER_M;
console.log(costUsd(80000, 2000).toFixed(4)); // 0.0130Swap in your own averages. If you do not know them yet, send a hundred real requests and average the token counts that come back, as shown in the last section.
Input-heavy and output-heavy workloads
The two rates differ, so the shape of your job matters as much as its size. Compare two workloads with the same number of requests, 10,000 each.
- Classification. Each request sends 3,000 tokens (instructions plus a text to label) and gets 20 tokens back. Cost per request: 3,000 / 1,000,000 x $0.15 = $0.00045, plus 20 / 1,000,000 x $0.50 = $0.00001, so $0.00046. For 10,000 requests that is $4.60.
- Generation. Each request sends 300 tokens and gets 2,000 back. Cost per request: $0.000045 for input plus $0.001 for output, so $0.001045. For 10,000 requests that is $10.45.
The generation job sends one tenth of the input and still costs more than twice as much, because output tokens dominate the bill. For writing tools, cap the reply length where you can. For extraction and labelling jobs, shrink the prompt and the repeated instructions instead.
A batch job, start to finish
Say you need to process 500 documents, each about 6,000 tokens, and you want a 500-token digest of each. Input: 500 x 6,000 = 3,000,000 tokens, which costs 3 x $0.15 = $0.45. Output: 500 x 500 = 250,000 tokens, which costs 0.25 x $0.50 = $0.125. The whole batch is $0.575. With a full key you can run 8 requests at once, so the job also finishes quickly; a trial key allows 2 at a time.
Where estimates go wrong: the growing history
The most common error in a cost estimate is treating a chat as a series of independent messages. It is not. A chat model has no memory, so every turn resends the whole conversation so far. The input side of the bill grows with each turn.
Here is a concrete case. A roleplay session has a 500-token system prompt. Each turn the user writes 100 tokens and the model replies with 300. Over 20 turns, the input for turn n is 500 + 400 x (n - 1) + 100 tokens.
- Turn 1 sends 600 tokens, turn 2 sends 1,000, turn 20 sends 8,200.
- Total input over 20 turns: 20 x 600 + 400 x (0 + 1 + ... + 19) = 12,000 + 400 x 190 = 88,000 tokens.
- Total output: 20 x 300 = 6,000 tokens.
- Cost: 88,000 / 1,000,000 x $0.15 = $0.0132, plus 6,000 / 1,000,000 x $0.50 = $0.003, giving $0.0162.
If you had naively counted only the new tokens (2,000 in, 6,000 out) you would have guessed $0.0033. The real figure is nearly five times that. The fix is simple: model the history in your estimate, or cap it by trimming old turns. Either way, the input line is the one to watch in long conversations.
Cheap ways to lower the number
If the estimate looks higher than you like, there are only a few levers, and each one maps directly onto the formula.
- Shorten the system prompt. It is billed on every call. Cutting 2,000 tokens from it across 100,000 requests removes 200,000,000 input tokens, or 200 x $0.15 = $30.
- Trim the history. Keep the last few turns plus a short running summary rather than the whole log.
- Set
max_tokens. It caps the output side, which carries the higher rate. - Send less context. Retrieve the two relevant paragraphs instead of the whole file.
None of these needs a different model or a different plan. They are edits to your own prompts.
Turning per-request cost into a budget
Once you know the cost of one typical request, planning is multiplication. Write down three numbers: requests per day, average input tokens, average output tokens. Compute the daily cost with the function above, then multiply by 30.
For top-ups, the useful numbers are these. Any whole amount from $20 to $500 works. The bonus adds credit on larger amounts: +5% from $50 gives $52.50, +10% from $100 gives $110, and +15% from $200 gives $230. The rate per token never changes, you just receive more credit for the same payment. You can pay with crypto (USDT on TRC20, USDC on Base).
Keep a margin. Real traffic is lumpier than an average, and a single feature that suddenly sends long documents can double your input tokens. The pricing page has the current rates and top-up options in one place.
A monthly projection
Suppose a support assistant handles 2,000 conversations a day, one request each, at the 1,500-token input and 400-token output profile from the table. The daily cost is 2,000 x $0.000425 = $0.85. Over a 30-day month that is $25.50. A $50 top-up, which carries the +5% bonus and gives $52.50 of credit, would last a little over two months at that pace. Redo the sum with your own averages and add the margin for growth before you pick a top-up amount.
Check your estimate against real numbers
An estimate is only as good as its inputs, so measure. Every response includes a usage object with the real prompt and completion token counts. The response headers also include X-Balance-USD, your remaining credit after the request, which lets you confirm the cost to the cent.
from openai import OpenAI
client = OpenAI(base_url="https://api.llmtokenprices.com/v1", api_key="YOUR_API_KEY")
raw = client.chat.completions.with_raw_response.create(
model="uncensored",
messages=[{"role": "user", "content": "Write two sentences about the sea."}],
)
r = raw.parse()
print("balance:", raw.headers.get("X-Balance-USD"))
print(r.usage.prompt_tokens, r.usage.completion_tokens)Run a batch of representative requests, add up the usage figures and compare with the drop in balance. If the two agree, your calculator is right and you can plan with it. If you do not have a key yet, the API key page offers $0.50 of trial credit after sign-up, which is more than enough for this test. Setup details are in the quickstart.
