What an unrestricted story generator actually needs
Most people who search for an unrestricted ai story generator have hit the same wall: a hosted chat tool that stops mid-scene, rewrites a villain into a polite bystander, or declines a war story because it contains violence. The fix is rarely a better prompt. It is a model that was tuned to answer without content refusals, plus an interface that lets you control the whole conversation instead of a single text box.
That is what this API gives you. It is one open-weight model, run by an independent provider, and it speaks the same protocol as OpenAI's chat completions. You send a list of messages, you get text back, and you decide what goes into the list. The model ID is uncensored. It is text only, so there are no illustrations or audio, but for fiction that is usually what you want from an API anyway.
The rule that stays in place is simple. The service is meant for lawful adult use, and sexual content involving minors is blocked. Everything else about the genre, tone and darkness of your fiction is up to you and your system prompt. If you want the longer discussion of what unrestricted does and does not mean, the page on API myths and facts covers it.
You have two realistic ways to use the endpoint for stories. You can write a short script that drives the model directly, which is the best choice if you are building a tool, a game or a batch pipeline. Or you can point a front end such as SillyTavern at it, which suits interactive roleplay and character chat. The sections below cover both.
A minimal story script in Python
Install the official SDK with pip install openai, get a key from the API key page, and export it as an environment variable. The first script asks for one scene and prints it as it arrives.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.unrestrictedai.top/v1",
api_key=os.environ["UNRESTRICTED_KEY"],
)
SYSTEM = (
"You are a novelist writing for adult readers. Write in third person, "
"past tense, with concrete sensory detail. Never break character to "
"comment on the story. Do not summarise; write the scene itself."
)
stream = client.chat.completions.create(
model="uncensored",
stream=True,
temperature=0.9,
messages=[
{"role": "system", "content": SYSTEM},
{"role": "user", "content": "Scene: a smuggler negotiates with a corrupt harbour inspector at night. Around 600 words."},
],
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Three details matter here. First, stream=True sends tokens over server-sent events, so your reader sees the first words quickly instead of waiting for the whole scene. Second, a streamed request holds one of your concurrency slots until the stream ends, which only matters if you run many scenes at once. Third, the if chunk.choices guard is there because the final chunk can carry usage data and no text.
The same call works from any language. If you prefer curl for a quick test:
curl https://api.unrestrictedai.top/v1/chat/completions \
-H "Authorization: Bearer $UNRESTRICTED_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Open a gothic novel in two paragraphs."}]}'
Prompting for fiction that holds together
A model with no refusals still needs direction. The difference between a flat draft and a usable chapter is mostly in the system message and in how you hand over context.
Put the rules in the system message
State point of view, tense, length, tone and what the model must not do. Negative rules work best when they are specific: "do not end the scene with a moral" is more useful than "avoid clichés". If you want a particular voice, paste a 200-word sample and say "match this register".
Keep a story bible
Characters drift when the model has nothing to anchor them. Keep a plain-text block with names, ages, speech habits, the setting and the plot so far. Send it at the start of every request. With a 100,000-token window you can include a bible of several thousand words and still have room for the previous chapters.
Use temperature as a dial
For brainstorming and dialogue, 0.9 to 1.1 gives variety. For continuity edits, such as "rewrite this paragraph so the knife is in her left hand", drop to 0.4 or lower. The seed parameter is passed through, so you can re-run a scene with the same seed while you tweak the prompt and see what actually changed.
Steer with the last message
The most reliable beat-by-beat control is a final user message that says what happens next and how long it should run: "Continue. She finds the letter and says nothing. 300 words, end on the sound of the door." Short, concrete beats beat vague requests like "make it more intense".
Writing a long story without losing the plot
Chapter-length work is where the context window earns its keep. There are two common patterns, and you can mix them.
The first is the rolling transcript. Keep the full message list and append each new scene and each instruction. It is simple and the model sees everything, but the prompt grows with every turn, and you pay for the whole prompt each time.
The second is the summary chain. After each chapter, ask the model for a 150-word summary of what happened, including any change in who knows what. Store the summaries. The next request carries the story bible, the summaries of earlier chapters, and only the last chapter in full. Prompts stay small and continuity errors stay low.
def next_chapter(client, bible, summaries, last_chapter, beat):
messages = [
{"role": "system", "content": bible},
{"role": "user", "content": "Story so far:\n" + "\n".join(summaries)},
{"role": "assistant", "content": last_chapter},
{"role": "user", "content": beat},
]
r = client.chat.completions.create(
model="uncensored", messages=messages, temperature=0.85
)
return r.choices[0].message.content
You do not have to set max_tokens; the completion can use whatever is left of the window. If you want chapters of a predictable size, ask for a word count in the prompt and set max_tokens a little above it as a safety stop.
Using SillyTavern for interactive stories
If you would rather write with a front end than a script, SillyTavern can talk to any OpenAI-compatible endpoint. In the API connection panel choose Chat Completion, then the custom OpenAI-compatible source. Paste https://api.unrestrictedai.top/v1 as the endpoint, paste your key, and type uncensored as the model name if the list does not fill in by itself. The endpoint answers GET /v1/models, so a model list can load once the connection is made.
Menus change between SillyTavern versions, so check its own documentation if a label differs. Two settings are worth adjusting. Keep the context size at or below 100,000 tokens, since that is the window of the model, and set a reply length you are comfortable paying for. Character cards and lorebooks become part of the prompt, so large ones raise the per-message cost, which the next section quantifies.
The documentation lists the parameters that are passed through, including temperature, top_p, stop sequences and the repetition penalties that story writers tend to tune.
What a chapter costs
Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit. Here are two worked examples.
| Request | Input | Output | Cost |
|---|---|---|---|
| Summary-chain chapter | 2,000 tokens | 1,000 tokens | $0.0003 + $0.0005 = $0.0008 |
| Full-context scene | 50,000 tokens | 1,500 tokens | $0.0075 + $0.00075 = $0.00825 |
The math for the first row: 2,000 / 1,000,000 x $0.15 = $0.0003, and 1,000 / 1,000,000 x $0.50 = $0.0005. A $20 top-up covers 25,000 chapters at that size. The second row shows why the summary chain pays off: sending 50,000 tokens of history every time costs about ten times as much per scene. Even so, $20 buys roughly 2,400 of those full-context scenes.
Failed or refused requests are not charged, and credit does not expire. Top-ups can be 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). Full details sit on the pricing page.
New users can claim $0.50 of trial credit with one click on the key page after sign-up. It needs no card, lasts 7 days, and at the first row's size it covers about 625 chapters. That is plenty to decide whether the output suits your genre.
Limits and troubleshooting
A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 concurrent requests and 60 per minute. If a batch job of parallel chapters exceeds that, the API answers HTTP 429. The error code tells you which limit you hit: rate_limited for requests per minute, concurrency for too many at once. A temporary overload also returns 429 with a Retry-After: 5 header. Wait that long and retry rather than hammering the endpoint.
If a scene comes out too short, ask for a word count and give a structure: opening image, conflict, turn, ending beat. If the model keeps repeating phrases, raise frequency_penalty a little, to 0.3 or so, and lower the temperature slightly. If a character changes eye colour in chapter four, the story bible is missing that detail, so add it.
The response headers include X-Balance-USD, which is handy for a small readout in your tool so you know when to top up. Prompts are not used for training, which matters if you are drafting unpublished manuscripts.
