EN ▾
Start now

Token Cost Claude API: How Billing Works vs Ours

If you are pricing a project, what a Claude API call costs per token comes down to two numbers and one multiplication. This page shows the math, then sets it beside the rates on this service.

Last updated

Glass pipeline moving coins from stacked pages into a meter, picturing per-token API billing

Key takeaways

  • LLM APIs bill input and output tokens separately, each at a rate per 1M tokens.
  • Your real bill depends more on how much history you resend than on the headline rate.
  • This service charges $0.15 per 1M input and $0.50 per 1M output tokens, prepaid, with failed requests free.
  • This is not Anthropic's API and not a Claude model; pick it for the behavior, not as a drop-in price swap.

The short answer: two rates and a multiplication

The question behind a search for token cost claude api is how many dollars one call takes. Every major hosted LLM API prices text in tokens, and almost all of them split the price in two: one rate for the tokens you send (input, also called the prompt) and a higher rate for the tokens the model writes back (output, also called the completion). The cost of one call is:

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

That is all the arithmetic there is. The hard parts are knowing the rates, which change, and predicting the token counts, which depend on your prompts. For Anthropic's Claude models, read the rates on Anthropic's own pricing page the day you plan your budget. We do not quote them here because they differ by model and they get revised.

What we can state exactly is our own side. This service charges $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid, there is no subscription, and requests that fail or are refused are not charged. The full table is on the pricing page.

What actually gets counted as a token

A token is a chunk of text, often a short word or part of a longer one. English prose averages a little under one token per four characters, so 1,000 words land somewhere near 1,300 tokens. Code, numbers, URLs and non-English text usually take more tokens per character.

Four things add to your input count that people forget when they sketch a budget:

  • The system prompt. It is sent with every request, so a 600-token system prompt costs 600 input tokens each time.
  • The whole conversation so far. Chat APIs are stateless. To continue a chat you resend earlier turns, and you pay for them again.
  • Tool definitions. JSON schemas for functions are part of the prompt.
  • Retrieved documents. Anything you paste in for context counts as input.

On the output side, you pay for every token the model generates, including long answers you did not need. Setting max_tokens caps that. On this API it is optional, and the completion can use whatever is left of the 100,000-token window.

A worked example at our rates

Take a support-style call: a 500-token system prompt, a 1,500-token pasted document, and a 100-token question, for 2,100 input tokens. The model replies with 400 tokens.

  • Input: 2,100 / 1,000,000 x $0.15 = $0.000315
  • Output: 400 / 1,000,000 x $0.50 = $0.0002
  • Total: $0.000515 per call

Run that 10,000 times a month and the bill is $5.15. Scale it to 1,000,000 calls and it is $515. Substituting any other provider's per-million rates into the same two lines gives you a like-for-like figure, which is the whole point of doing the math yourself instead of trusting a headline number.

Measure your own token cost instead of guessing

Every response includes a usage object with the prompt and completion token counts, and the API also returns an X-Balance-USD header with your remaining credit. This script logs both and computes the cost of each call from the rates. Change the two constants to compare against any other price list you have.

import os
from openai import OpenAI

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

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

raw = client.chat.completions.with_raw_response.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarize what a token is in two sentences."}],
)
resp = raw.parse()
u = resp.usage
cost = u.prompt_tokens / 1e6 * IN_RATE + u.completion_tokens / 1e6 * OUT_RATE

print("input tokens :", u.prompt_tokens)
print("output tokens:", u.completion_tokens)
print("cost (USD)   : %.6f" % cost)
print("balance left :", raw.headers.get("X-Balance-USD"))

Run it on ten of your real prompts and average the results. That average, multiplied by your expected call volume, is a better forecast than any rule of thumb.

How the rates compare, and what the comparison leaves out

It is tempting to line up two price lists and pick the lower one. Do the comparison, but keep three caveats in view.

A different model, not a cheaper Claude

This service is not Anthropic's API and does not serve a Claude model. It runs one open-weight model, hosted by an independent provider and tuned to answer without content refusals for lawful adult use. Output quality, style and strengths will differ from Claude. A lower per-token rate tells you nothing about whether the answers fit your task.

Token counts are not identical across models

Each model family has its own tokenizer. The same paragraph can come out as different token counts on different models, so a per-million comparison is approximate until you measure real prompts on both.

Behavior is the real difference

If your product needs a model that does not refuse fiction, roleplay or adult-oriented writing that is lawful, a refusal-prone model costs you in retries and support, whatever its price. If your use case is regulated or needs a specific vendor's guarantees, use that vendor. Our one hard limit is the same for everyone: no sexual content involving minors.

A budget table for three workloads

Here are three typical workloads priced at this service's rates. Each row uses the formula from the top of the page, so you can copy the structure and drop in another provider's numbers to fill a second column.

WorkloadTokens per call (in / out)Cost per callVolumeMonthly cost
Support bot with pasted help article2,100 / 400$0.00051520,000 calls$10.30
Document summarizer15,000 / 600$0.002553,000 documents$7.65
20-turn chat companion106,000 / 7,000 per chat$0.0194 per chat1,000 chats$19.40

The pattern is consistent. Short single calls are cheap in absolute terms, and the chat row costs the most per user because history is resent. If you plan to compare providers, price the chat row first; it is where small differences in the input rate add up fastest.

Some providers offer discounts for cached prompt prefixes or for batch jobs. If you compare against one that does, check whether those discounts apply to your traffic pattern before you count them. This service has a single flat rate for each side, $0.15 input and $0.50 output, with no tiers to work out.

Ways to keep the bill down on any API

  1. Trim history. Keep the last N turns, or summarize older ones into a short note. In long chats this cuts input cost more than anything else.
  2. Shorten the system prompt. Remove rules the model follows anyway.
  3. Cap output. Ask for the format and length you need, and set max_tokens when a runaway answer would hurt.
  4. Do not retry blindly. On a 429 wait for the Retry-After header instead of hammering the endpoint.
  5. Batch small questions into one prompt when the answers do not depend on each other.

Our guide to price Claude covers the same ideas from the comparison side. When you are ready to test, the docs list every endpoint, and a new account can claim $0.50 of trial credit from the API key page with no card.

Topping up and what you pay in

Credit is added in any whole amount from $20 to $500, with a bonus of 5% from $50, 10% from $100 and 15% from $200. A $100 top-up therefore gives $110 of credit. Payment is in crypto only, USDT on TRC20 or USDC on Base. Credit never expires, so there is no pressure to spend it by a date.

At the example rate above ($0.000515 per call), $20 of credit covers about 38,800 calls. That is 20 / 0.000515, rounded down.

Common questions

How is the token cost of an LLM API call calculated?

Multiply input tokens by the input rate and output tokens by the output rate, each per 1M tokens, and add the two. Most providers publish both rates on a pricing page.

Is this the Claude API at a lower price?

No. This is an independent, OpenAI-compatible API running one open-weight model. It is not affiliated with Anthropic and it does not serve Claude models.

What does this service charge per token?

$0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit. Failed or refused requests are not charged.

How can I see exactly what a request cost?

Read the usage object in the response and apply the two rates, or compare the X-Balance-USD header before and after the call.

Get your API key

Register, copy the key, update the base URL. That is all it takes.

Begin with trial credits

Simple email/password signup. Key displays instantly.

No subscription model. Prepaid credits do not expire.

Start now