Get API key

No Filter AI Story Generator via API

A story generator that stops mid-scene because a plot turned dark is a poor writing tool. This article shows how to build one on top of an OpenAI-compatible endpoint, with code you can run today.

Updated

Open book with pages turning into glowing ribbons that flow into a terminal, representing API story generation

Key points

  • Point any OpenAI SDK at the base URL, use the model ID uncensored, and you have a story engine in about twenty lines.
  • A system prompt that sets genre, tone and rules matters more than any sampling setting.
  • The 100,000-token window lets you keep a whole story bible and several chapters in one request.
  • A 1,200-token chapter costs about a tenth of a cent, so cost is rarely the limit.

What a no filter story generator actually is

A no filter ai story generator is a text model that writes fiction without stopping to lecture you, swap your villain for a friendly one, or refuse a scene because the subject is grim. Crime thrillers, war fiction, horror, morally gray protagonists and mature romance between adults all need a model that treats dark material as material, not as an alert.

The service behind this site gives you one open-weight model, tuned to answer without content refusals for lawful adult use. It runs at an independent provider and is reached through a standard OpenAI-style API. You send a list of messages, you get prose back. There is no web editor to learn and no template to fill in, which is the point: you decide how the story tool works, and the model supplies the text.

One rule is fixed. Sexual content involving minors is never allowed, and no prompt changes that. Everything else in lawful adult fiction is yours to write. If you want the general picture of how this compares with a hosted character platform, the page on NoFilter AI versus Character AI covers it.

Your first story in twenty lines of Python

Because the API follows the OpenAI format, the official openai package works unchanged. You only replace the base URL and the key. Install it with pip install openai, then run this.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.nofilterai.cc/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    temperature=0.9,
    messages=[
        {"role": "system", "content": (
            "You are a fiction author. Write in third person, past tense. "
            "Use concrete detail and subtext. Never summarise the scene, "
            "never moralise, never address the reader."
        )},
        {"role": "user", "content": (
            "Genre: noir crime. Setting: a flooded harbour town. "
            "Write the opening 600 words. A smuggler finds a body in his net."
        )},
    ],
)
print(resp.choices[0].message.content)

The model ID is uncensored. The key comes from the API key page. If you have not signed up yet, new users can claim $0.50 of trial credit there with one click, valid for 7 days, so this first script costs you nothing.

The same call works from curl, which is handy for testing a prompt before you wrap it in code.

curl https://api.nofilterai.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "user", "content": "Write a 200 word horror scene set in a lighthouse."}
    ]
  }'

Prompt structure that produces usable fiction

Most disappointing output from a story model comes from vague instructions, not from the model. Three parts of the prompt do the heavy lifting.

The system message sets the author, not the topic

Put voice rules here: point of view, tense, sentence rhythm, what to avoid. A line such as "do not end scenes with a reflection on what it all means" removes a habit that many language models share. Keep this message stable across a whole project so chapters sound alike.

The user message sets the beat

Give one scene at a time. Name the characters, the place, what changes by the end of the scene, and a target length. "Write 700 words. Mara confronts her brother about the missing ledger. She does not get an answer" is far better than "continue the story".

A story bible rides along

Keep a short block with character facts, the timeline so far and open threads, and send it with every request. A bible of 800 tokens costs almost nothing and stops the model from changing an eye colour or resurrecting a character.

  • Use temperature around 0.8 to 1.0 for drafting and 0.5 to 0.7 for editing passes.
  • Use stop sequences if you generate in a fixed format, for example stopping at a line that reads "END SCENE".
  • Use presence_penalty and frequency_penalty lightly if the model repeats pet phrases. Both are passed through to the model.
  • Use seed when you want to compare two prompt versions on equal footing.

Keeping a long story consistent

The context window is 100,000 tokens, counting the prompt and the reply together. That is room for a full story bible, the previous several chapters and a new chapter of output in a single request. For most fiction projects you can stop worrying about memory tricks for a long time.

A simple loop handles a serialised story. Keep a running list of messages, append each chapter the model writes, and add your next instruction. When the list nears the limit, replace the oldest chapters with a short summary that you also ask the model to write.

from openai import OpenAI

client = OpenAI(base_url="https://api.nofilterai.cc/v1", api_key="YOUR_KEY")

bible = "Mara Voss, 34, ferry pilot. Brother Teo owes money. Setting: Harbor Nine, rain every night."
history = [{"role": "system", "content": "Fiction author. Third person, past tense. No moralising.\nBible: " + bible}]

def write(beat):
    history.append({"role": "user", "content": beat})
    r = client.chat.completions.create(model="uncensored", messages=history, temperature=0.85)
    text = r.choices[0].message.content
    history.append({"role": "assistant", "content": text})
    return text

print(write("Chapter 1, 700 words: Mara finds Teo's boat adrift."))
print(write("Chapter 2, 700 words: she searches the cabin and finds a second ledger."))

When you reach the limit, do not truncate silently. A model that loses the opening of the story often keeps the plot but forgets small facts. A written summary of 500 to 800 tokens, inserted after the system message, keeps those facts alive at a small cost.

Failed or refused requests are not charged, so a retry after an error never doubles your bill. The full parameter list is in the API documentation.

Streaming and interactive fiction

For a text adventure or a live writing assistant, you want words on screen as they arrive. Set stream: true and read the server-sent events. Usage numbers arrive at the end of the stream.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.nofilterai.cc/v1",
  apiKey: process.env.NOFILTER_KEY,
});

const stream = await client.chat.completions.create({
  model: "uncensored",
  stream: true,
  messages: [
    { role: "system", content: "You are the narrator of a survival horror text adventure. Second person, present tense." },
    { role: "user", content: "I open the cellar door." },
  ],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Two practical limits apply. A full key allows 8 concurrent requests and 300 requests per minute; a trial key allows 2 and 60. A streamed request holds its concurrency slot until the stream ends, so a slow reader on a web page can block a slot longer than you expect. If you exceed a limit you receive HTTP 429 with the error code rate_limited or concurrency. On brief overload you also get a 429 with Retry-After: 5, and waiting five seconds before retrying is the right response.

Why generated stories go flat, and the fixes

Even without refusals, a model can write dull fiction. The usual causes are easy to repair once you know them.

The first is the summary reflex. Left alone, a model compresses events into a tidy recap. Ask for one scene, name its length, and forbid recaps in the system message. The second is sameness: every character speaks in the same polite register. Give each speaking character a two-line voice note, such as "clipped, never finishes sentences" or "formal, uses titles even for friends". The third is missing stakes. A beat like "they talk about the plan" produces filler, while "she needs him to agree before dawn, and he knows it" produces tension.

Finally, read the output as an editor. If the same sentence shape opens four paragraphs in a row, tell the model so in the next request and ask for a rewrite. You are steering, not accepting whatever arrives. Writers who treat the first output as a rough draft get far better chapters than those who expect a finished one.

What a story costs

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit with no subscription. Credit does not expire. The numbers below are worked from those two prices.

JobInput tokensOutput tokensCost
One chapter with bible and earlier text3,0001,200$0.00045 + $0.0006 = $0.00105
100 such chapters300,000120,000$0.045 + $0.06 = $0.105
Interactive session: 50 turns, 20,000-token context each, 1,000-token replies1,000,00050,000$0.15 + $0.025 = $0.175
One request that fills the window with input100,0000$0.015

Even a hundred chapters cost about ten cents. Top-ups start at $20 and go up to $500 in any whole amount, with a 5% bonus from $50, 10% from $100 and 15% from $200. Payment is crypto only, using USDT on TRC20 or USDC on Base. Current details are on the pricing page.

The costly habit is resending a very long history on every turn of an interactive story. Summarise old turns and your input tokens fall sharply.

Practical advice and limits

A few points save time once you start building.

  • Text only. The service does not generate images, audio or video, and it offers no embeddings or fine-tuning. For cover art or voice, use another tool.
  • JSON mode helps with structure. Ask for response_format: {"type":"json_object"} when you want the model to return a character sheet or a scene list that your code parses.
  • Your prompts are not used for training. That matters if your manuscript is unpublished.
  • Edit in passes. Draft at a high temperature, then send the draft back with an instruction to tighten dialogue or cut adverbs at a lower one.
  • Check the output. A model without refusals will follow your lead, so the tone you get is the tone you ask for.

The model is a general open-weight model, not a vendor's official API, so test it on your own genre before building a product around it. Start with the trial credit and a few real chapters.

Questions and answers

Is there a free way to try a no filter AI story generator through the API?

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. It needs no payment, is valid for 7 days and is limited to one per person.

How long can a single story request be?

The context window is 100,000 tokens, shared by the prompt and the reply. The reply can use whatever the prompt leaves free, and max_tokens is optional.

Can I use it with tools that already support OpenAI?

Yes. Any client that lets you set a custom base URL and key works, using the model ID uncensored. The supported methods are POST /v1/chat/completions and GET /v1/models.

Is there any content the model will not write?

Sexual content involving minors is never allowed. Beyond that, the model is tuned to answer without content refusals for lawful adult use.

Do you store or train on my stories?

Prompts are not used for training.

Your key is one form away

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