EN ▾

Unfiltered Story API: Write Fiction With an LLM

An unfiltered story API is a text endpoint that writes fiction without stopping at dark themes, as long as the use is lawful and adult. Below is a working setup: connect, stream a scene, keep a story bible, and loop through chapters inside a 100,000-token window.

Updated:

Open book with pages turning into streams of light flowing into a terminal, representing story generation over an API

Key points

  • Point any OpenAI SDK at the base URL, use model uncensored, and stream each scene as it is written.
  • Keep a story bible in the system message and a short running summary instead of resending the whole draft.
  • A full key allows 8 concurrent requests, enough to draft several versions of a scene at the same time.
  • The model is for lawful adult use. Sexual content involving minors is a hard limit and is never produced.

What you get and what you do not

The service exposes POST /v1/chat/completions and GET /v1/models in the OpenAI format. If you have ever called an OpenAI client, you already know the shape of the request. You change the base URL to https://api.unfilteredstory.top/v1, pass your key as a Bearer token, and set the model to uncensored.

Behind that name sits one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not the official API of Meta, Mistral, Qwen, DeepSeek, OpenAI, xAI, Google or Anthropic, and it does not route between vendors. For a writer this has one practical meaning: a villain can be menacing, a war scene can be grim, and a morally grey narrator does not get interrupted by a lecture. It still follows your instructions, so tone, point of view and pacing are yours to set.

Some limits are fixed. The API is text only, so there are no images, audio, embeddings or fine-tuning. The context window is 100,000 tokens, counting the prompt and the completion together. And there is one hard rule: no sexual content involving minors, in any framing. Everything else in this article assumes adult readers and adult writers.

If you want the bare integration steps for other tools, the OpenAI-compatible integration guide covers them. This page stays on the fiction workflow.

Connect and stream your first scene

Streaming matters more for fiction than for most uses. A scene of 800 words takes a while to generate, and watching it appear lets you stop early when the voice is wrong instead of paying for the whole thing. Set stream: true and read the deltas as they arrive. Server-sent events carry the text, and usage totals come at the end of the stream.

from openai import OpenAI

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

stream = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "You are a novelist. Write in close third person, past tense. Dark, literary, no moralising."},
        {"role": "user", "content": "Scene: a smuggler waits in a flooded subway station for a client who is late. 600 words."},
    ],
    stream=True,
    temperature=0.9,
    top_p=0.95,
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

The if chunk.choices guard is there because the final chunk can carry only usage data and no text. Leave it in, or the loop will crash on the last event.

The same call from a shell is useful for a quick check that your key works:

curl https://api.unfilteredstory.top/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","stream":true,"messages":[{"role":"user","content":"Open a story with a funeral that goes wrong."}]}'

You need a key first. New accounts 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 card, is valid for 7 days, and is limited to one per person. The trial key has lower limits (2 concurrent requests, 60 per minute), which is plenty for testing prompts.

Write a story bible once, reuse it on every call

The single biggest improvement to long fiction is a story bible: a block of plain text that sits at the top of every request. The model has no memory between calls, so anything you do not resend is gone. A bible turns that limitation into a feature, because the same stable text starts every prompt and the model sees it first.

A useful bible is short, usually 500 to 1,500 words, and contains:

  • Premise and tone. Two or three sentences, plus a few adjectives you actually want, such as bleak, dry, tender.
  • Narration rules. Point of view, tense, sentence length, how much dialogue, whether to use chapter headings.
  • Characters. One short paragraph each: what they want, how they speak, what they hide.
  • World rules. Anything the model could contradict: how magic costs, what year it is, who holds power.
  • Things to avoid. Phrases you are tired of, recurring openings, names you do not want reused.

Keep it as a file in your project and load it at startup. When a character changes in the story, edit the bible, not the prompt in your head.

from pathlib import Path
from openai import OpenAI

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

BIBLE = Path("bible.md").read_text(encoding="utf-8")

def ask(user_text, **kw):
    return client.chat.completions.create(
        model="uncensored",
        messages=[
            {"role": "system", "content": BIBLE},
            {"role": "user", "content": user_text},
        ],
        **kw,
    )

r = ask("Write the opening paragraph of chapter 1.", max_tokens=400)
print(r.choices[0].message.content)
print(r.usage.prompt_tokens, r.usage.completion_tokens)

The max_tokens field is optional. Without it, the completion can use whatever is left of the 100,000-token window. For scene work a cap is still a good habit, since it stops a runaway answer from costing more than you expected.

A chapter loop with a rolling summary

You could paste every earlier chapter into each request. That works for a while and then it gets expensive and slow, and eventually it hits the window. A better pattern keeps three things: the bible, a running summary of everything before, and the tail of the last scene so the prose flows. After each scene, one cheap extra call updates the summary.

from openai import OpenAI

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

bible = open("bible.md", encoding="utf-8").read()
summary = "Nothing has happened yet."
tail = ""

def write_scene(beat):
    global summary, tail
    messages = [
        {"role": "system", "content": bible},
        {"role": "user", "content": (
            "Story so far (summary):\n" + summary +
            "\n\nEnd of the previous scene:\n" + tail +
            "\n\nWrite the next scene, about 900 words. Beat: " + beat
        )},
    ]
    out = client.chat.completions.create(
        model="uncensored", messages=messages, temperature=0.85
    ).choices[0].message.content

    upd = client.chat.completions.create(
        model="uncensored",
        temperature=0.2,
        messages=[
            {"role": "system", "content": "You maintain a continuity summary. Keep it under 400 words. Keep names, injuries, promises, open questions."},
            {"role": "user", "content": "Old summary:\n" + summary + "\n\nNew scene:\n" + out + "\n\nReturn the updated summary only."},
        ],
    )
    summary = upd.choices[0].message.content
    tail = out[-1200:]
    return out

print(write_scene("Mara finds the ledger is missing and accuses the wrong man."))

Two details help in practice. First, a low temperature for the summary call, so it records facts instead of embroidering them. Second, a hard size on the summary, because a summary that grows without limit eventually defeats its purpose. If the story needs more detail than 400 words allows, keep a separate list of open plot threads and send it as its own short block.

Read the summary yourself every few chapters. Models drop details quietly, and it is much easier to fix a wrong line in a 400-word summary than to untangle a contradiction in chapter twelve.

Draft alternatives in parallel

A full key allows 8 concurrent requests and 300 requests per minute. For fiction that means you can ask for three versions of the same scene at once and pick the one with the best voice, rather than regenerating one at a time. Vary the seed or the temperature, and the drafts will differ.

import time
from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI, RateLimitError

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

def draft(seed):
    for attempt in range(4):
        try:
            r = client.chat.completions.create(
                model="uncensored",
                seed=seed,
                temperature=1.0,
                messages=[{"role": "user", "content": "Write a 300-word scene: two rivals share a lifeboat."}],
            )
            return r.choices[0].message.content
        except RateLimitError:
            time.sleep(5)
    return None

with ThreadPoolExecutor(max_workers=3) as pool:
    versions = list(pool.map(draft, [11, 22, 33]))

for i, v in enumerate(versions, 1):
    print("--- version", i, "---")
    print(v)

Two rules about limits. A streamed request holds its concurrency slot until the stream ends, so ten open streams on a full key will push some calls into a concurrency error. And when the service is briefly overloaded it returns HTTP 429 with a Retry-After: 5 header, so a five-second wait before retrying is the right default. The other 429 code, rate_limited, means you exceeded the per-minute count. Responses also carry X-Request-Id, X-Balance-USD and the two X-RateLimit-Limit headers, which are handy for logging.

Keep character state in JSON

Free prose is bad at bookkeeping. Who is injured, who owes whom, what time of day it is: these facts drift. Pull them out after each chapter in JSON mode and store them next to the summary. The API supports response_format: {"type":"json_object"}, and the prompt should say the word JSON and name the keys you expect.

import json
from openai import OpenAI

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

chapter_text = open("chapter_03.txt", encoding="utf-8").read()

r = client.chat.completions.create(
    model="uncensored",
    temperature=0,
    response_format={"type": "json_object"},
    messages=[
        {"role": "system", "content": "Return JSON with keys: characters (list of objects with name, location, injuries, mood), open_threads (list of strings), time_of_day (string)."},
        {"role": "user", "content": chapter_text},
    ],
)
state = json.loads(r.choices[0].message.content)
print(state["open_threads"])

Feed the resulting object back into the next prompt as a short block. Tool calling is the other route: define a function such as lookup_character in tools, let the model request it when it needs a detail, and answer with a role: "tool" message. That suits big casts, where you do not want to paste every profile on every call. JSON mode is simpler and is where most fiction projects should begin.

Boundaries, costs and where to go next

The model writes for lawful adult use. Violence, crime, cruelty and moral failure are ordinary material for fiction and are not treated as errors. Sexual content involving minors is not available, and nothing in your prompt changes that. Failed or refused requests are not charged, so an unexpected failure does not eat your balance.

Pricing is pay as you go from prepaid credit: $0.15 per 1M input tokens and $0.50 per 1M output tokens, with no subscription and credit that never expires. A 900-word scene is roughly 1,200 output tokens, which is a small fraction of a cent. Top-ups are any whole amount from $20 to $500, with a bonus of 5% from $50, 10% from $100 and 15% from $200. You can pay with crypto (USDT on TRC20, USDC on Base). The pricing page has the details, and the quickstart docs list every parameter that is passed through.

Prompts are not used for training. That is a statement about the provider's use of your text, not a substitute for your own care with anything sensitive, so keep personal data out of drafts you plan to share.

A sensible first project is small: write the bible, generate three scenes with the loop above, and read the summary after each one. By the time you have a chapter, you will know whether the voice holds, and you will have spent well under a cent.

Questions and answers

What model name do I use?

Use uncensored as the model ID and your own key in the Authorization header. The base URL is https://api.unfilteredstory.top/v1.

Can I use it with SillyTavern or other chat front ends?

Any client that lets you add an OpenAI-compatible endpoint can use it. Enter the base URL, your key and the model ID uncensored.

Does it write anything at all?

No. It is tuned to avoid content refusals for lawful adult use, but sexual content involving minors is a hard limit and is never produced.

How long can a story be in one request?

The window is 100,000 tokens for prompt plus completion together. For longer works, send a bible and a rolling summary rather than the whole text.

Is there a free tier?

There is no free tier. New users can claim $0.50 of trial credit with one click after sign-up, valid for 7 days and without a card.

Your key is one form away

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

Get API key