Unfiltered AI for Writing: A Fiction API Workflow

Updated
Unfiltered AI for writing means a model that keeps working when your story goes somewhere dark, violent or morally messy. This article shows a practical fiction workflow on an OpenAI-compatible text API.
Key points
- Use a fixed story bible in the system prompt and a rolling summary for older chapters.
- Stream the output so you can read and stop a scene while it is still being written.
- The 100,000-token window holds the bible, a long summary and several recent chapters at once.
- A full 40-chapter draft costs a few cents at $0.15 and $0.50 per 1M tokens.
What unfiltered AI for writing actually means
Fiction needs villains who frighten people, wars with casualties, grief that does not resolve in one paragraph, and characters who do things you would not approve of in real life. Many chat assistants answer such scenes with a disclaimer, a softened rewrite or a refusal. For a novelist, a screenwriter or a game master, that is a workflow problem: the draft stalls and you spend the evening arguing with the tool instead of editing.
The API on this site serves one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not a vendor's official endpoint and it is not a router across several models. You send the same POST /v1/chat/completions request you would send to any OpenAI-style service, and the model writes what the scene calls for. One rule has no exceptions: no sexual content involving minors.
That is the whole promise, and it is a narrow one. The model does not make you a better writer. It removes one obstacle. The rest of this article is about the part you still have to do: giving the model enough structure that a 90,000-word manuscript stays consistent.
Set up the connection
Any OpenAI SDK works once you change the base URL and the key. Get a key on the API key page, then install the Python package with pip install openai.
from openai import OpenAI
client = OpenAI(
base_url="https://api.unfilteredaiimage.cc/v1",
api_key="YOUR_KEY",
)
resp = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You are a fiction co-writer."},
{"role": "user", "content": "Write the opening paragraph of a noir story set in a flooded city."},
],
temperature=0.9,
)
print(resp.choices[0].message.content)
The model ID is uncensored and authentication is a standard bearer header. If you want to confirm the setup first, GET /v1/models returns the model list. The documentation page has the same details in reference form.
Build a story bible the model reads every time
The most useful habit in AI-assisted fiction is a fixed block of text that travels with every request. Call it the story bible. It lives in the system message and does not change unless you change it on purpose.
A good bible is short and specific. Long, vague bibles produce long, vague prose. Aim for these parts:
- Voice. Person and tense, sentence length, how much interior thought, what the narrator never explains. Two sample sentences beat a paragraph of adjectives.
- Cast. One line per character: want, fear, a speech habit, one physical detail. Add a line on what each character knows at this point in the book.
- World rules. Technology, magic, politics, geography. Only the rules the plot touches.
- Hard constraints. Things the model must not do: do not resolve the mystery, do not use the word "suddenly", do not summarise the chapter at the end.
- Rating note. A sentence that tells the model this is adult fiction and that violence and dark themes are allowed on the page, while the minors rule stays in force.
Because the window is 100,000 tokens, a bible of 1,500 to 3,000 tokens costs you almost nothing in space. Cost per request is tiny as well, which the cost section below shows with numbers.
Write a scene with streaming
For long prose, stream the response. You see the first sentences in a moment, and if the scene drifts you cancel the request instead of waiting for 2,000 words you will throw away. Set stream: true and read the chunks as they arrive. Usage is reported at the end of the stream.
BIBLE = open("bible.txt", encoding="utf-8").read()
SUMMARY = open("summary.txt", encoding="utf-8").read()
def write_scene(brief, last_pages=""):
messages = [
{"role": "system", "content": BIBLE},
{"role": "user", "content": "Story so far:\n" + SUMMARY},
{"role": "user", "content": "Previous pages:\n" + last_pages},
{"role": "user", "content": "Write the next scene. Brief: " + brief},
]
stream = client.chat.completions.create(
model="uncensored",
messages=messages,
temperature=0.9,
top_p=0.95,
presence_penalty=0.3,
stream=True,
)
parts = []
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
piece = chunk.choices[0].delta.content
print(piece, end="", flush=True)
parts.append(piece)
return "".join(parts)
A few sampling notes from practice. A temperature between 0.8 and 1.0 gives varied sentences for drafting; drop to 0.5 to 0.7 when you want a careful edit pass. A small presence or frequency penalty reduces repeated phrases, which long generations tend to produce. You do not need max_tokens: the completion may use whatever is left of the window. Set it only if you want to cap scene length.
One thing to remember: a streamed request holds its concurrency slot until the stream ends. A full key allows 8 requests at once, a trial key allows 2.
Keep a long book consistent with a rolling summary
A 100,000-token window is large, but a novel is larger. A manuscript of 90,000 words is well over the window, so you cannot paste the whole book into every request. The standard fix is a rolling summary.
- After you accept a chapter, ask the model for a summary of 150 to 250 words: plot events, changed relationships, open questions, any facts stated about the world.
- Append that summary to a running file, one block per chapter.
- When writing chapter N, send the bible, the full summaries of chapters 1 to N-3, the complete text of chapters N-2 and N-1, and your brief for chapter N.
Recent chapters carry voice and detail. Older chapters carry facts. This split keeps the prompt near 20,000 to 40,000 tokens for most of a book, leaving plenty of room for the completion.
def summarise(chapter_text):
r = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You write neutral continuity notes for a novelist."},
{"role": "user", "content": "Summarise in 200 words: events, character changes, "
"new facts about the world, unresolved threads.\n\n" + chapter_text},
],
temperature=0.3,
)
return r.choices[0].message.content
Keep the summary prompt neutral and low temperature. The point is accuracy, not style. Read each summary yourself before you save it; a wrong fact in the summary will be repeated faithfully in every later chapter.
Other writing jobs that fit the same API
Dialogue passes
Paste a scene and ask for a rewrite of the dialogue only, with each character's speech habit from the bible. Use JSON mode (response_format: {"type":"json_object"}) when you want line-by-line output you can diff against the original.
Roleplay and companion apps
Interactive fiction for adults, game-master tools and companion apps all use the same chat endpoint. Keep the persona and world in the system message, send the last 20 to 40 turns, and summarise anything older. The minors rule applies to every one of these use cases.
Worldbuilding and brainstorming
Ask for ten options, then ask the model to critique its own list. Dark premises, flawed protagonists and morally grey factions are all fair material. Use a higher temperature, around 1.0, and run the request twice.
Tool calling for continuity checks
The API supports tool calling. You can define a function such as lookup_character(name) that reads from your own notes file, and let the model call it when a scene mentions someone from chapter three. Results go back as role: "tool" messages.
What a draft costs
Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit. As a rule of thumb, assume 1,000 English words come to about 1,300 tokens; your own count will vary.
Take a novel of 40 chapters at 2,000 words each, 80,000 words in total.
- Output: 80,000 words is about 104,000 tokens. 104,000 x $0.50 / 1M = $0.052.
- Input: each chapter request carries about 6,000 tokens of bible, summaries and recent pages. 40 x 6,000 = 240,000 tokens. 240,000 x $0.15 / 1M = $0.036.
- Total for the first draft: $0.052 + $0.036 = $0.088.
Rewrites matter more than the first pass. If you regenerate every chapter four times, multiply the figure by four and you are at $0.352. The smallest top-up is $20, so credit is not the limit on how much you write; your time is. Failed or refused requests are not charged, and credit never expires. Full details are on the pricing page.
Pitfalls and fixes
- Repetitive openings. If every scene begins with weather, add a hard constraint to the bible and raise the presence penalty a little.
- Characters who know too much. Put a "knows / does not know" line in the cast section for the current chapter.
- Drifting voice. Include the last two pages verbatim. Style is carried by example far better than by description.
- Summaries that grow. Compress old summaries every ten chapters into a single paragraph per act.
- HTTP 429. Error code
rate_limitedmeans too many requests per minute;concurrencymeans too many at once. A 429 withRetry-After: 5is temporary overload. Wait and retry.
Sign-up is with Google or with email and password. New users can claim a $0.50 trial on the key page with one click, which is enough to test a whole workflow before you pay anything. Prompts are not used for training, and crypto top-ups (USDT on TRC20 or USDC on Base) start at $20.
More guides
Questions and answers
Can I write a whole novel with this API?
Yes. The 100,000-token window plus a story bible and rolling summaries lets you keep a book-length project consistent. You still do the planning and editing.
Is there a content filter on the output?
The model is tuned to answer without content refusals for lawful adult use. Sexual content involving minors is never allowed.
Which tools can I use besides Python?
Any OpenAI-compatible client works. Change the base URL to the one in the docs, use model ID uncensored and add your key.
How do I try it before paying?
Claim the $0.50 trial credit on the API key page after sign-up. It is valid for 7 days, needs no payment details and is limited to one per person.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.