EN ▾
Get API key

Ollamansfw API Pricing: Token Costs Explained

The API is billed per token from prepaid credit, with no subscription. This page does the math on real workloads so you can estimate a month before you spend anything.

Updated

Balance scale weighing glowing tokens against coins, illustrating per-token API pricing

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).

Get API key

Key points

  • Input tokens cost $0.15 per 1M and output tokens cost $0.50 per 1M.
  • Credit is prepaid in whole amounts from $20 to $500, never expires, and has bonuses of 5%, 10% and 15% at higher tiers.
  • Failed or refused requests are not charged.
  • There is a one-time $0.50 trial, but no free unlimited tier.

The rates

Here is the answer for anyone searching ollamansfw api pricing. You pay $0.15 for every 1M input tokens (your prompt and conversation history) and $0.50 for every 1M output tokens (what the model writes back). Nothing else is added: no monthly fee, no seat price, no minimum usage.

You buy credit in advance and requests draw it down. The credit never expires, and requests that fail or are refused are not charged. Every response carries an X-Balance-USD header, so your application can read the remaining balance without a separate call. There is no free unlimited tier. The only free credit is the one-time trial described below.

What a token is, roughly

Tokens are chunks of text, typically a short word or a piece of a longer one. For plain English prose a rule of thumb is that a token is a bit under one word, so 1,000 words come to somewhere around 1,300 tokens. Treat that as an estimate only. Code, other languages and unusual names usually take more tokens per word. The exact counts come back in the usage field of each response, and that is what you are billed on.

The key habit is to separate the two sides. Input is cheap. Output costs more than three times as much per token ($0.50 against $0.15). A job that reads a lot and writes a little is inexpensive. A job that asks for long generations costs more per token, though it is still small in absolute terms.

Worked examples

All figures below are computed as input tokens x $0.15 / 1M plus output tokens x $0.50 / 1M.

WorkloadInputOutputMathCost
One chat turn2,000500$0.0003 + $0.00025$0.00055
1,000 chat turns2,000,000500,000$0.30 + $0.25$0.55
Long document read50,0002,000$0.0075 + $0.001$0.0085
100 story requests600,00040,000$0.09 + $0.02$0.11
Output-heavy batch, 1,000 requests500,0001,500,000$0.075 + $0.75$0.825
One full pass, 1M in and 1M out1,000,0001,000,000$0.15 + $0.50$0.65

The long document row is worth looking at. Filling half of the 100,000-token context window with input costs under a cent. That makes long-context work affordable as long as the output stays modest.

What the trial covers

New users can claim $0.50 of trial credit with one click on the API key page after signing up with Google or with email and password. It needs no payment, it is limited to one per person, and it is valid for 7 days.

At the chat-turn cost above, $0.50 / $0.00055 is about 909 turns of 2,000 input and 500 output tokens. That is enough to test streaming, tool calling and JSON mode, and to see whether the writing style suits your project. The trial key has lower limits than a full key: 2 concurrent requests and 60 requests per minute, against 8 and 300.

Top-ups and bonuses

You can add any whole amount from $20 to $500. Larger top-ups add a bonus to your credit:

Top-upBonusCredit you receive
$20none$20.00
$50+5%$52.50
$100+10%$110.00
$200+15%$230.00
$500+15%$575.00

Payment on this site is crypto only: USDT on TRC20 or USDC on Base. The smallest top-up of $20 covers 36,363 chat turns at $0.00055 each, which is just under $20 of usage. The pricing page is the place to check the current top-up screen.

Because credit does not expire, there is no pressure to spend it by a deadline. A $20 balance can sit unused for months and still be there.

Estimate your own month

Take a small app that sends 10,000 requests a month, each with about 3,000 input tokens and 700 output tokens. Input is 30,000,000 tokens, which is 30 x $0.15 = $4.50. Output is 7,000,000 tokens, which is 7 x $0.50 = $3.50. The month costs $8.00.

Now a heavier case: a roleplay front end where each turn resends a growing history. If the average request carries 12,000 input tokens and 400 output tokens, one request costs 12,000 x $0.15 / 1M = $0.0018 plus 400 x $0.50 / 1M = $0.0002, so $0.002. A thousand such turns cost $2.00. History is the dominant cost here, so trimming old messages or summarizing them is the best saving.

Here is a short Python snippet that reads the usage the API reports and turns it into dollars:

from openai import OpenAI

client = OpenAI(base_url="https://api.ollamansfw.com/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Describe a rainy harbor town in four sentences."}],
)

u = resp.usage
cost = u.prompt_tokens * 0.15 / 1_000_000 + u.completion_tokens * 0.50 / 1_000_000
print(f"in={u.prompt_tokens} out={u.completion_tokens} cost=${cost:.6f}")

Log that number per request and your forecast stops being a guess. For setup details and parameters, see the quickstart.

How this compares when you read other price lists

Price lists from different services are hard to compare unless you convert them to the same workload. Pick a typical request for your own app, count its input and output tokens, and compute the cost in dollars per 1,000 requests. For this API the formula is (input tokens x 0.15 + output tokens x 0.50) / 1,000, with tokens counted per request. For a request with 1,500 input and 600 output tokens that gives (225 + 300) / 1,000 = $0.525 per 1,000 requests.

Then do the same for any alternative, using the numbers from that provider's own page, since prices and model sizes change. Also compare what you get for the money: context length (here 100,000 tokens), whether refusals are charged, and whether credit expires. Here refused and failed requests cost nothing and the balance never lapses, which matters if you top up once and use the credit slowly.

Ways to keep the bill small

  • Cap history. Send the last N turns plus a short summary, not the whole transcript.
  • Set max_tokens when you need a bound. It is optional, and completions can otherwise use the rest of the 100,000-token window.
  • Prefer one clear prompt over several retries. Each retry that succeeds is billed again.
  • Respect limits. A full key allows 8 concurrent requests and 300 per minute. HTTP 429 responses are not a reason to hammer the endpoint; wait for Retry-After.

Prompts are not used for training. The model is one open-weight model run by an independent provider and is not an official vendor API. Content rules apply, including a hard ban on sexual content involving minors.

Questions and answers

How much does the API cost per request?

It depends on tokens. A request with 2,000 input and 500 output tokens costs $0.00055. Multiply input tokens by $0.15 and output tokens by $0.50, then divide by 1,000,000.

Is there a monthly subscription?

No. You buy prepaid credit in whole amounts from $20 to $500 and pay per token. Credit never expires.

Am I charged for failed requests?

No. Failed or refused requests are not charged, and the X-Balance-USD response header shows your remaining balance.

Is there a free plan?

There is a one-time $0.50 trial credit, valid for 7 days, claimed with one click after sign-up. There is no free unlimited tier.