EN ▾

Uncensored API for developers.

Get API key

Nanbeige API Pricing vs Pay-per-Token Hosting

Token pricing looks cheap until you multiply it by real traffic. Here is the exact math for a hosted, OpenAI-compatible text API, with examples you can adapt to your own workload.

Updated

Balance scale weighing coins against a stream of token blocks, illustrating pay-per-token API cost

Key points

  1. Input costs $0.15 per 1M tokens and output costs $0.50 per 1M tokens, billed from prepaid credit.
  2. A typical chat request of 2,000 tokens in and 500 out costs $0.00055, so 1,000 such requests cost $0.55.
  3. There is no free unlimited tier; new users get a one-time $0.50 trial credit valid for 7 days.
  4. For another provider's rates, check their current pricing page rather than any blog post, including this one.

The price list in one table

If you searched for nanbeige api pricing, you probably want a number. This site is not the Nanbeige vendor and does not resell its API, so it cannot quote you that vendor's rates. What it can give you is exact pricing for its own service, which you can use as a yardstick when you compare. For any other provider, open their current pricing page, because rates change and a secondhand figure goes stale quickly.

ItemPrice
Input tokens$0.15 per 1M
Output tokens$0.50 per 1M
Subscription or monthly feeNone, pay as you go
Failed or refused requestsNot charged
Credit expiryNever
Trial$0.50, one per person, 7 days, no card

Input tokens are everything you send: system prompt, chat history, documents you paste. Output tokens are what the model writes back. Output costs more per token than input, so a short prompt that triggers a long answer costs more than a long prompt with a short answer.

How to turn tokens into dollars

The formula is short. Divide your token count by 1,000,000 and multiply by the rate.

  1. Input cost = input tokens / 1,000,000 x $0.15
  2. Output cost = output tokens / 1,000,000 x $0.50
  3. Request cost = input cost + output cost

A handy reverse view: $1 buys about 6.67 million input tokens, or 2 million output tokens. A rough rule for English text is that a token is a bit under a word, so 2 million output tokens is on the order of a million and a half words. Treat that as an estimate only, since tokenization varies with language and content.

Every API response includes a usage block with the real counts, and streamed responses report usage at the end. Use those numbers rather than guessing. The response header X-Balance-USD also shows your remaining credit after each call, which makes it easy to track spending in a log.

Worked examples

These examples use round numbers so you can check the math by hand. Replace the token counts with your own.

A short chat message

A request with 2,000 input tokens and 500 output tokens:

  • Input: 2,000 / 1,000,000 x $0.15 = $0.0003
  • Output: 500 / 1,000,000 x $0.50 = $0.00025
  • Total: $0.00055 per request

At 1,000 requests that is $0.55. At 10,000 requests it is $5.50. The $0.50 trial credit covers about 909 requests of this size ($0.50 / $0.00055 = 909.09, so 909 whole requests).

A document question with long context

You paste a 20,000-token report and ask for a 1,000-token summary:

  • Input: 20,000 / 1,000,000 x $0.15 = $0.003
  • Output: 1,000 / 1,000,000 x $0.50 = $0.0005
  • Total: $0.0035 per request

One hundred such summaries cost $0.35. Here the input dominates, so trimming the document before sending gives the largest saving.

Filling the whole window

The context window is 100,000 tokens, counting prompt and completion together. A request that uses 90,000 input tokens and 10,000 output tokens costs:

  • Input: 90,000 / 1,000,000 x $0.15 = $0.0135
  • Output: 10,000 / 1,000,000 x $0.50 = $0.005
  • Total: $0.0185 per request

That is the ceiling for a single call, a bit under two cents. Even heavy long-context use stays small per call, so the bill grows from volume, not from any one request.

Chats cost more than you expect

The surprise in conversational apps is history. Chat completions are stateless: every turn resends the earlier messages, and you pay for them as input each time. A conversation does not cost "one prompt plus one answer"; it costs the sum of a growing prompt.

Take a roleplay or companion chat where each turn adds roughly 300 tokens from the user and 300 from the model, and the system prompt is 500 tokens. On turn 1 the input is about 800 tokens (500 + 300). On turn 10 it is about 500 + 9 x 600 + 300 = 6,200 tokens. On turn 20 it is about 500 + 19 x 600 + 300 = 12,200 tokens.

The input on turn t is 500 + (t - 1) x 600 + 300, which simplifies to 200 + 600t. Summing that over 20 turns gives 20 x 200 + 600 x 210 = 4,000 + 126,000 = 130,000 input tokens in total. Output is 20 x 300 = 6,000 tokens.

  • Input: 130,000 / 1,000,000 x $0.15 = $0.0195
  • Output: 6,000 / 1,000,000 x $0.50 = $0.003
  • Total for the 20-turn conversation: $0.0225, a little over two cents

Input is about 96% of the tokens here, and about 87% of the cost. History is the main cost driver. Summarize old turns, cap how much history you send, or move stable instructions to a shorter system prompt. Each of those trims input tokens directly.

Top-ups, bonuses and the trial

You prepay credit and spend it down. Any whole amount from $20 to $500 works. Larger top-ups carry a bonus:

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

Payment is by crypto (USDT on TRC20, USDC on Base). Credit never expires, so there is no pressure to spend it by a deadline, and the bonus makes a bigger top-up cheaper per token. The pricing page shows the current tiers.

At the short-chat price of $0.00055 per request, a $20 top-up covers about 36,363 requests ($20 / $0.00055 = 36,363.6). That is plenty for a prototype and a few weeks of light production use.

The trial

New users claim $0.50 of trial credit with one click on the API key page after sign-up. It is one per person, valid for 7 days and needs no card. A trial key is limited to 2 concurrent requests and 60 requests per minute, which is enough to test prompts but not to load-test. See how to get a key for the steps.

There is no free unlimited tier

Say it plainly: there is no free plan with unlimited use here. Searches for a free API often land on pages that promise one, and those promises tend to come with a cap, a queue or a catch. This service has a small trial, then you pay per token. The trade is that you get predictable costs, no monthly minimum and no expiring credit.

It also helps to know what you are not paying for. Failed or refused requests are not charged. There is no seat fee and no subscription. But there are also no image, audio or embedding features to buy, since the API is text only.

Comparing against other providers fairly

To compare honestly, do the same math for each provider using their current published rates. Pull three numbers from your own logs: average input tokens, average output tokens and requests per day. Then compute the daily cost for each option, and add anything else that matters to you.

  • Output share. If most of your cost is output tokens, compare output rates first.
  • Refusal behavior. A cheaper model that refuses half your prompts costs more in retries and rewrites. This service runs a model tuned to answer without content refusals for lawful adult use, and refused requests are not charged.
  • Limits. A full key here allows 8 concurrent requests and 300 requests per minute. If you need more parallelism than that, another provider may suit you better.
  • Features you need. Embeddings, image generation and fine-tuning are not offered here.

If you work out that another service is cheaper or a better fit for your case, use it. The docs show how little code it takes to switch back if your needs change, because the interface is OpenAI-compatible.

One more budgeting tip: set a monthly ceiling in your own code. Read X-Balance-USD, log it, and alert when it drops below a threshold. With prepaid credit the worst case is that the balance runs out, not that a surprise invoice arrives.

Questions and answers

How much does this API cost per request?

It depends on tokens. A request with 2,000 input and 500 output tokens costs $0.00055, using $0.15 per 1M input and $0.50 per 1M output.

Is there a free tier?

Not an unlimited one. New users can claim $0.50 of trial credit, one per person, valid for 7 days with no card. After that you pay per token from prepaid credit.

Does credit expire?

No. Prepaid credit never expires, and failed or refused requests are not charged.

What is the minimum top-up?

$20, in any whole amount up to $500. Bonuses of 5%, 10% and 15% apply from $50, $100 and $200.

Is this the Nanbeige vendor's pricing?

No. This is an independent service running a different open-weight model, so the rates here say nothing about any vendor's own pricing. Check their current pricing page.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.