EN ▾

Unfiltered Story API Cost: Tokens per Chapter

The unfiltered story api cost for a 3,000-word chapter is about a fifth of a cent on output, and a bit more once you count the context you send. Here is the arithmetic, with examples for chapters, novellas and long chats.

Updated:

Balance scale weighing glowing tokens against coins, illustrating the price of generating story chapters

Key points

  • Output is $0.50 per 1M tokens and input is $0.15 per 1M, so a 4,000-token chapter costs $0.002 to generate.
  • A 30-chapter draft with a rolling summary comes to about $0.08; resending full history costs several times more.
  • There is no free tier. New users can claim $0.50 of trial credit, and paid top-ups start at $20.
  • Credit never expires and failed or refused requests are not charged.

The short answer, in a table

Pricing is per token and has two rates: $0.15 per 1M input tokens (what you send) and $0.50 per 1M output tokens (what the model writes). Using 4,000 tokens for a chapter of about 3,000 words, these are typical bills:

JobInput tokensOutput tokensCost
One chapter, light context1,5004,000$0.002225
One chapter, with summary and last chapter5,0004,000$0.00275
30-chapter draft, rolling summary150,000120,000$0.0825
Same draft, 3 versions of each chapter450,000360,000$0.2475

The numbers are small because text is small. A whole novella costs less than a coffee. The realistic way to spend more is to resend large amounts of history on every call, run many alternative drafts, or hold long chats, and the sections below put figures on each of those.

One honest note up front: there is no free tier. You can claim $0.50 of trial credit once, and after that you top up with prepaid credit.

Turning words into tokens

Billing is in tokens, but you think in words and chapters. For English prose, a common rule is that 1 token is about 0.75 words, which makes 1,000 words roughly 1,330 tokens. A 3,000-word chapter is about 4,000 tokens. The ratio shifts with the text: dialogue with short words is cheaper per word, while invented names and dense description cost more. Treat the figure as an estimate.

You do not need to guess for long. Every response includes a usage object with the real prompt and completion counts, and each response carries an X-Balance-USD header with your remaining credit. This snippet turns one call into a dollar figure:

from openai import OpenAI

client = OpenAI(base_url="https://api.unfilteredstory.top/v1", api_key="YOUR_API_KEY")

IN_PER_M = 0.15    # dollars per 1M input tokens
OUT_PER_M = 0.50   # dollars per 1M output tokens

r = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Write chapter 4: the ferry crossing. About 3,000 words."}],
)
u = r.usage
cost = u.prompt_tokens / 1_000_000 * IN_PER_M + u.completion_tokens / 1_000_000 * OUT_PER_M
print(u.prompt_tokens, u.completion_tokens, f"${cost:.6f}")

To see the balance header from a shell, ask for response headers with curl:

curl -i https://api.unfilteredstory.top/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","max_tokens":20,"messages":[{"role":"user","content":"Say hello."}]}'

Look for X-Balance-USD in the output. Run the script on three or four real chapters and you will have your own words-to-tokens ratio and a real per-chapter cost, which beats any rule of thumb.

Worked example: one chapter

Say you send a 1,500-token prompt (story bible, a short summary and an outline) and get a 4,000-token chapter back.

  • Input: 1,500 ÷ 1,000,000 × $0.15 = $0.000225
  • Output: 4,000 ÷ 1,000,000 × $0.50 = $0.002
  • Total: $0.002225

Now add a fuller prompt: 5,000 input tokens, because you include the previous chapter so the prose flows. Input becomes 5,000 ÷ 1,000,000 × $0.15 = $0.00075, output stays at $0.002, and the chapter costs $0.00275. Note how output dominates: 73% of the bill is the chapter itself, and only 27% is everything you sent.

That ratio explains why trimming your prompt saves less than people expect. Cutting 1,000 input tokens saves $0.00015 per call. Cutting 1,000 output tokens, by asking for tighter scenes, saves $0.0005, more than three times as much.

Worked example: a 30-chapter novella

Now scale up. A 30-chapter draft at 4,000 tokens per chapter is 120,000 output tokens, about 90,000 words. With a rolling summary, each call sends roughly 5,000 input tokens, so the input total is 30 × 5,000 = 150,000 tokens.

  • Input: 150,000 ÷ 1,000,000 × $0.15 = $0.0225
  • Output: 120,000 ÷ 1,000,000 × $0.50 = $0.06
  • Total: $0.0825

About eight cents for a first draft of a full-length book. Now suppose you generate three versions of every chapter and keep the best. Both input and output triple, so the cost is 3 × $0.0825 = $0.2475, about 25 cents. If you also run a continuity-summary call after every accepted chapter, add a small amount: say 6,000 input and 500 output tokens each, 30 times. That is 180,000 × $0.15 ÷ 1M = $0.027 plus 15,000 × $0.50 ÷ 1M = $0.0075, which adds $0.0345 in total.

Even with all of this, the project stays under 30 cents. Editing passes are the bigger lever: rewriting every chapter once more doubles the output, and that is the point where your own time costs far more than the tokens.

The expensive mistake: resending everything

The way to make a story expensive is to put every earlier chapter into each request. Take a 12-chapter project with a 1,000-token base prompt. Chapter n sends 1,000 + 4,000 × (n − 1) input tokens, so the total is 12 × 1,000 + 4,000 × (0 + 1 + ... + 11) = 12,000 + 4,000 × 66 = 276,000 tokens.

  • Input: 276,000 ÷ 1,000,000 × $0.15 = $0.0414
  • Output: 48,000 ÷ 1,000,000 × $0.50 = $0.024
  • Total: $0.0654

The same 12 chapters with a rolling summary use 12 × 5,000 = 60,000 input tokens, which is $0.009, plus the same $0.024 for output, total $0.033. The difference is a factor of two at 12 chapters, and it grows because full-history input rises with the square of the chapter count. It also runs into the 100,000-token window sooner or later, as prompt and completion share that space.

The cost is still small in absolute terms, so full history is fine for a short story. For a long project, the summary method is cheaper and more predictable. The article on OpenAI-compatible integration shows how the request itself is built, if you need the basics first.

Interactive stories and long chats

Roleplay and interactive fiction behave differently from chapter writing. Each turn is short, but the history is resent every time. Take a session of 50 turns where each request carries about 8,000 input tokens (bible plus recent turns) and the reply is 300 tokens.

  • Input per turn: 8,000 ÷ 1,000,000 × $0.15 = $0.0012
  • Output per turn: 300 ÷ 1,000,000 × $0.50 = $0.00015
  • Per turn: $0.00135, so 50 turns cost $0.0675

At 1,000 turns that is $1.35. Here input is 89% of the bill, the reverse of chapter writing, so a lean system prompt and a trimmed history matter much more for chats. Cap the history to the last 20 or so messages and keep older material as a short summary.

Streaming does not change the price; it only changes how fast the text appears. It does affect limits: a streamed request holds its concurrency slot until the stream finishes, and a full key has 8 slots and 300 requests per minute. A trial key has 2 slots and 60 requests per minute.

What your top-up buys

Top-ups are any whole amount from $20 to $500, paid with crypto (USDT on TRC20, USDC on Base). Larger top-ups carry a bonus: +5% from $50, +10% from $100, +15% from $200.

Top-upBonusCredit30-chapter drafts at $0.0825
$20none$20.00about 242
$50+5%$52.50about 636
$100+10%$110.00about 1,333
$200+15%$230.00about 2,787

The right column divides credit by $0.0825 and rounds down. For most writers the minimum $20 is far more than a project needs, and credit never expires, so the unused balance simply stays for next time. There is no subscription and nothing renews. Failed or refused requests are not charged, which keeps retries from eating credit.

To test before paying, sign up and claim the trial on the API key page. It is $0.50, one per person, valid for 7 days, and needs no card. At $0.00275 per chapter that is about 181 chapters, enough to write roughly six 30-chapter drafts or to run a lot of prompt experiments. The pricing page has the current rates and the top-up options in one place.

Ways to keep the bill small

  • Stream and stop early. If the first 200 words show the voice is wrong, cancel and fix the prompt. You pay for the tokens generated, not the ones you never asked for.
  • Use max_tokens as a guard. A cap prevents a runaway reply from running to the end of the window.
  • Summarise old chapters. It keeps input flat, as the 12-chapter example shows.
  • Test on short scenes. Tune tone with 300-word samples before generating full chapters.
  • Log usage per call. Five lines of code and you know what each workflow costs, with no spreadsheet guesses.

The model itself is for lawful adult use, with a hard rule against sexual content involving minors, so the cost figures above apply only to work within those terms. Prompts are not used for training, and the quickstart docs explain every parameter that is passed through, including temperature, top_p, stop, seed and the penalties.

Questions and answers

How much does one chapter cost?

A chapter of about 3,000 words is roughly 4,000 output tokens, or $0.002. With 5,000 input tokens of context the total is about $0.00275.

Is there a free tier?

No. New users can claim a one-time $0.50 trial credit, valid for 7 days, with no card. After that you pay as you go from prepaid credit starting at $20.

Do I pay for failed or refused requests?

No. Failed or refused requests are not charged, so retrying after an error does not use up your balance.

Does credit expire?

No. Credit never expires, and there is no subscription. Whatever you do not spend stays on your account.

Why are output tokens priced higher than input?

The rates are $0.50 per 1M for output and $0.15 per 1M for input. For chapter writing, output makes up most of the bill; for long chats, input does.

Your key is one form away

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

Get API key