What Are Tokens in LLM Models? How Billing Works
Tokens are the chunks of text a language model reads and writes, and they are also the unit that appears on your bill. This page shows how they are counted and how to estimate what a request costs.
Updated

Key points
The API follows the OpenAI chat-completions standard, allowing immediate integration with existing SDKs.
Uncensored behavior is enforced by a dedicated open-weight model, not by simple prompt engineering.
Transparent token pricing applies only to actual usage, with no monthly subscriptions or hidden tiers.
Privacy is prioritized: prompts are not used for training, and account creation requires only an email.
Uncensored LLM API for developers
The short answer
If you are asking what are tokens in llm models, the plain answer is this: a token is the smallest unit of text the model works with. Before a model sees your prompt, a tokenizer chops the text into pieces and replaces each piece with an integer ID. The model reads those integers, predicts the next integer, and the tokenizer turns the predicted integers back into text you can read.
A piece can be a whole common word, a fragment of a rarer word, a single punctuation mark, or a space glued to the start of a word. For ordinary English prose, a token averages somewhere around four characters, which is roughly three quarters of a word. That is a rule of thumb, not a guarantee, and it drifts a lot for code, numbers and non-English text.
Tokens matter to you for two reasons. First, they decide how much fits into the model's context window. Second, they are what this API charges for: $0.15 per 1M input tokens and $0.50 per 1M output tokens, paid from prepaid credit. The rest of this page makes both points concrete.
How text becomes tokens
Most current language models use a subword tokenizer. The tokenizer has a fixed vocabulary of pieces, built beforehand by scanning a large amount of text and merging the character sequences that appear together most often. Frequent words end up as a single entry. Rare words are assembled from several smaller entries.
A made-up illustration: the word "unbelievably" might be split into three pieces, something like "un", "believ" and "ably", while the word "the" is one piece by itself. The exact split depends on the tokenizer, so treat the example as a picture of the idea and not as real output.
What tends to cost more tokens
- Rare or invented words.A token is a piece of text, often a short word or part of a word, not a fixed number of characters.
- Numbers.Prompt and reply both count: $0.15 per 1M input tokens and $0.50 per 1M output tokens.
- Source code and JSON.The 100,000-token context window covers the prompt and the completion together.
- Languages other than English.Every response carries a usage object, so you can read exact counts instead of guessing.
Whitespace counts too. A leading space is usually part of the token that follows it, and a long run of blank lines or indentation adds pieces you did not intend to pay for.
Why two tools give two different counts
There is no single universal token. Each model family ships with its own tokenizer, and the same sentence can produce a different number of pieces under different ones. If you paste a paragraph into a counter built for another model, the number you get is an estimate for this API, not a measurement.
The number that matters for your bill is the one the server reports for your request. Every response from this API includes a usage object with prompt tokens, completion tokens and a total. Use that figure for budgeting, and treat any offline counter as a rough sizing aid. After a few real requests you will know your own ratio of characters to tokens, which is more useful than any general rule.
One practical habit: log the usage object next to the request ID. When a bill looks higher than you expected, the per-request log shows which prompt was responsible.
Input tokens, output tokens and the context window
Requests have two sides. Input tokens are everything you send: the system message, the whole chat history, any documents you paste in, tool definitions, and the newest user message. Output tokens are what the model writes back. Output is priced higher than input because generating text is more work than reading it.
The model uncensored has a context window of 100,000 tokens, and that limit is shared. Prompt plus completion must fit inside it. If your prompt is 60,000 tokens, the reply can be at most about 40,000 tokens. You do not have to set max_tokens; when you leave it out, the completion may use whatever room is left in the window. Set it anyway when you want a hard ceiling on cost or length.
The window is also a memory limit in practice. A chat application is stateless on the API side: each request must carry the conversation so far, so the input grows with every turn. That growth is the main reason long chats get more expensive per message than short ones, and the worked example below puts numbers on it.
What tokens cost on this API
The arithmetic is the same each time: divide the token count by one million and multiply by the rate. Input is $0.15 per million, output is $0.50 per million. Failed or refused requests are not charged, and credit never expires, so a half-used balance simply waits for you.
| Input tokens | Output tokens | Input cost | Output cost | Total |
|---|---|---|---|---|
| 500 | 200 | $0.000075 | $0.0001 | $0.000175 |
| 2,000 | 500 | $0.0003 | $0.00025 | $0.00055 |
| 10,000 | 1,000 | $0.0015 | $0.0005 | $0.002 |
| 50,000 | 4,000 | $0.0075 | $0.002 | $0.0095 |
| 90,000 | 10,000 | $0.0135 | $0.005 | $0.0185 |
Take the second row. 2,000 input tokens times $0.15 and divided by 1,000,000 is $0.0003. 500 output tokens times $0.50 and divided by 1,000,000 is $0.00025. Together that is $0.00055 per request. The $0.50 trial credit would cover about 900 requests of that size, and a $20 top-up would cover about 36,000. Even the last row, which nearly fills the whole context window, costs under two cents.
Full details on top-ups and bonuses are on the pricing page.
Reading the usage numbers from a real response
You can check all of this in a few lines. The snippet below sends one short request through the standard OpenAI Python SDK and prints the counts the server returns, then works out the cost from them.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.nsfwsearch.cc/v1",
api_key=os.environ["API_KEY"],
)
resp = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Explain what a token is in two sentences."},
],
max_tokens=150,
)
u = resp.usage
cost = u.prompt_tokens * 0.15 / 1_000_000 + u.completion_tokens * 0.50 / 1_000_000
print(resp.choices[0].message.content)
print(u.prompt_tokens, u.completion_tokens, u.total_tokens)
print(f"cost: ${cost:.6f}")
The same request with curl, printing the response headers so you can see the balance after the call:
curl -i https://api.nsfwsearch.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello."}],"max_tokens":20}'
Look for X-Balance-USD in the headers. If you stream with stream: true, the usage figures arrive at the end of the stream. The quickstart shows streaming and the other parameters.
Worked example: a 20-turn chat
Suppose a companion-style chat app sends a system prompt of 500 tokens. Each user message is about 200 tokens and each reply is about 300 tokens. Because the history is resent every time, the input on turn n is 500 for the system prompt, plus 500 for each earlier exchange, plus 200 for the new message. That is 200 + 500n tokens.
- Turn 1 input: 700 tokens. Turn 10 input: 5,200. Turn 20 input: 10,200.
- Added up over 20 turns, input is 200 x 20 + 500 x 210 = 109,000 tokens.
- Output is 20 x 300 = 6,000 tokens.
Cost: 109,000 x $0.15 / 1M = $0.01635 for input, and 6,000 x $0.50 / 1M = $0.003 for output. The whole conversation comes to $0.01935, under two cents. Notice that input is 109,000 tokens against only 6,000 of output, so even though output costs more per token, the input side is more than five sixths of the bill here. Long histories, not long replies, are what drive cost in chat apps.
Ways to spend fewer tokens
- Trim the history. Keep the last several exchanges verbatim and drop or summarize the rest. Summaries can be written by the same model in a separate call.
- Shorten the system prompt. It is paid for on every single request. A 1,500-token persona sent 1,000 times is 1.5M input tokens, or $0.225.
- Cap replies. Use
max_tokensandstopsequences when you only need a paragraph. - Do not resend what the model does not need. Retrieve the three relevant passages rather than pasting the whole file.
- Use JSON mode for structured output. It saves the tokens spent on chatty preambles you would have to strip anyway.
If you are integrating this API into an application with sensitive themes, the developer checklist covers the non-token decisions as well. To try the numbers on your own prompts, claim a key and use the one-click trial credit, which needs no payment details.
More guides
Questions and answers
How many tokens is 1,000 words?
In ordinary English prose it is often around 1,300 tokens, because a token averages about three quarters of a word. Code, numbers and other languages can be quite different, so check the usage field.
Do I pay for the prompt as well as the answer?
Yes. Input tokens cost $0.15 per 1M and output tokens cost $0.50 per 1M. Failed or refused requests are not charged.
Is the 100,000-token limit for the prompt or the reply?
For both together. Prompt plus completion must fit in 100,000 tokens, so a larger prompt leaves less room for the reply.
Can I count tokens before sending a request?
Only approximately, with an offline counter or the characters-per-token rule of thumb. The exact figure is the usage object returned with each response.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key