Uncensored LLM API for Screenwriting and Video Scripts
An uncensored LLM API for screenwriting gives you a drafting partner that stays in the scene instead of refusing dark or mature material in fiction. It writes text only: scripts, beats and shot lists, not video.
Updated

What this setup is, and what it is not
Writers use an uncensored LLM API for screenwriting when a mainstream assistant keeps softening the work. A crime drama needs a menacing antagonist. A war film needs a battlefield that reads like one. A horror short needs dread that builds. Models tuned to avoid refusals will write these scenes as fiction for lawful adult use, and you stay in charge of the story.
The limits should be clear before you build anything. This service is a text model behind an OpenAI-compatible API. It writes scripts, treatments, dialogue, scene breakdowns and shot lists. It does not make video, images, audio or voices, and it has no embeddings or fine-tuning. If your pipeline ends in a rendered clip, the model sits at the front of it, turning an idea into text that a person or another tool then uses. One content rule is fixed: no sexual content involving minors, in any framing.
The model ID is uncensored, the base URL is https://api.nsfwvideoapi.com/v1, and any OpenAI client works once those two values are set. The documentation lists every supported parameter.
Set up the client once
Install the official SDK, point it at the base URL, and keep the key in an environment variable.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.nsfwvideoapi.com/v1",
api_key=os.environ["API_KEY"],
)
def ask(messages, **kw):
r = client.chat.completions.create(
model="uncensored",
messages=messages,
**kw,
)
return r.choices[0].message.content
The helper does one thing so the rest of the workflow stays short. If you have no key, the key page shows sign-up and the trial credit, which is enough for a few dozen scene drafts.
If you prefer a writing front end over code, many chat clients accept a custom OpenAI-compatible endpoint. You paste the same base URL, the same key and the model name uncensored. The integration page covers how that is usually done.
A system prompt that behaves like a script editor
The biggest quality gain comes from a good system prompt. Tell the model what job it has, what format to use, and what to leave out. A vague prompt gives you vague prose and a different layout on every call.
EDITOR = '''You are a working screenwriter and script editor.
Write in standard screenplay format: scene heading in capitals
(INT. or EXT., place, time), action lines in present tense,
character names in capitals above dialogue.
Rules:
- Show, do not explain. No narration of feelings; use behaviour.
- Keep action lines under four lines each.
- Dialogue is spoken language: interruptions, fragments, subtext.
- Mature themes are allowed in fiction for adult audiences.
- Never write sexual content involving minors.
- Output the scene only, with no commentary before or after.'''
Two choices here matter. The closing instruction removes the chatty preamble ("Here is your scene") that you would otherwise strip by hand. And the length limit on action lines forces the economy that screenplays need. Adjust both to taste. A comedy writer might replace the third rule with something about rhythm and setups.
Revision is where most of the value is. Once a scene exists, send it back with notes: "Cut the exposition in the second exchange and let the silence do the work", or "Make the antagonist more polite, which should feel worse". Put the scene and the note in the same user message and ask for the full revised scene, so you do not have to splice fragments together. Because each call starts fresh, paste the earlier version in every time. This is also how you keep a record: save each pass as its own file and you can always go back to the draft you liked better.
Keep this text in a file under version control. When a scene comes out wrong, you want to change one sentence in one place and rerun, not hunt through ten scripts.
From logline to scenes in three calls
Asking for a whole script in one prompt gives a thin result. Splitting the job into stages gives you a place to steer after each one. A workable order is logline, beat sheet, then scenes.
logline = ask(
[{"role": "system", "content": EDITOR},
{"role": "user", "content": "Logline for a 10-minute thriller set on a night ferry. "
"One location, three characters, a secret in a locked car."}],
temperature=0.9, max_tokens=120,
)
beats = ask(
[{"role": "system", "content": EDITOR},
{"role": "user", "content": f"Logline: {logline}\n\nWrite a beat sheet of 8 beats. "
"One sentence each, numbered."}],
temperature=0.7,
)
scene = ask(
[{"role": "system", "content": EDITOR},
{"role": "user", "content": f"Logline: {logline}\n\nBeats:\n{beats}\n\n"
"Write the full scene for beat 3. About one page."}],
temperature=0.8,
)
print(scene)
Temperature is the main dial. Use a higher value (around 0.9) for logline ideas, where variety helps, and a lower one (0.6 to 0.7) for beat sheets, where you want structure to hold. The top_p, stop, seed and penalty parameters are passed through, so you can tame repetition with a small frequency penalty or fix a seed to compare two versions of a prompt fairly.
After each stage, read the output and edit it before you feed it forward. If beat 5 is weak, rewrite it yourself or ask for three alternatives. The model drafts and you decide, which is also how the final script stays yours.
Turn a scene into a shot list with JSON mode
Video scripts and storyboards need structure: shot number, framing, action, duration. JSON mode asks the model to return a valid JSON object, which you can load straight into a spreadsheet, a storyboard tool or your own pipeline. Name the keys in the prompt, since the mode asks for valid JSON but does not enforce your schema.
import json
SHOTS = '''Convert the scene into a shot list. Return a JSON object with one key,
"shots", holding an array. Each item has: "n" (integer), "framing" (wide, medium,
close-up, insert), "camera" (static, pan, handheld, push-in), "action" (one sentence),
"audio" (dialogue or sound cue), "seconds" (integer estimate).'''
raw = ask(
[{"role": "system", "content": SHOTS},
{"role": "user", "content": scene}],
response_format={"type": "json_object"},
temperature=0.4,
)
shots = json.loads(raw)["shots"]
for s in shots:
print(s["n"], s["framing"], s["camera"], s["seconds"], s["action"])
Keep the temperature low here. Structured output gets worse when the model is encouraged to wander. If json.loads ever fails, the usual cause is a reply cut off by max_tokens, so raise that value or leave it unset. Completion can use whatever is left of the context window.
The seconds are an estimate from text, so treat them as a starting point. Total them against your target runtime, then ask the model to tighten or expand specific scenes. Whatever tool renders the footage afterward is outside this API.
Use the 100,000-token window as a story bible
Consistency is where AI-assisted scripts usually fall apart. Names drift, a character knows something they should not, a location changes colour. The fix is to give the model the facts every time. The context window is 100,000 tokens, shared between prompt and completion, which is room for a long reference document plus the scene.
Build a bible file with sections for characters, locations, running timeline, and style notes. Send it as part of the system message or as the first user message on each call:
- Characters. Name, age, speech habits, what they want, what they hide.
- Locations. A few physical details to reuse: layout, sounds, light.
- Timeline. What has happened so far, as short bullets.
- Style notes. Tone references, banned clichés, sample lines in the voice you want.
A bible of 5,000 words is roughly 7,000 tokens, a small slice of the window. Sending it with every request does add cost, since you pay for input tokens on each call, but at $0.15 per million input tokens a 7,000-token bible adds about $0.001 per request. Output costs more, at $0.50 per million, so a one-page scene of around 600 tokens costs about $0.0003 on the output side. A full set of 40 scene drafts with the bible attached comes to roughly 40 x 7,600 input tokens = 304,000 tokens in ($0.0456) plus 40 x 600 = 24,000 tokens out ($0.012), a total of $0.0576. Check the current rates on the pricing page.
Remember that prompt and reply share the window, so as the project grows, summarise old material into a shorter bible instead of sending everything.
Practical habits and limits to plan for
A few notes from the way this kind of workflow tends to go:
- Generate, then rewrite. A model gives you a fast first draft with plausible structure. The voice, the surprises and the final cut come from you. Treat output as material, not as a finished script.
- Ask for alternatives. "Give me three versions of this exchange, each with a different power balance between the characters" yields more than one request per version.
- Stream in an editor. If you build a tool around this, set
streamtotrueso text appears as it is written. A streamed request holds one of your concurrency slots until it ends. A full key allows 8 at once and 300 requests per minute, a trial key 2 and 60. - Expect 429s in batch jobs. If you draft 30 scenes in a loop, a 429 with
rate_limitedorconcurrencyin the error means slow down. A 429 with aRetry-Afterheader of 5 means wait five seconds and send it again. - Be honest about rights. Check the terms of whoever will publish or produce your script, since producers, festivals and publishers set their own rules about AI-assisted material.
Prompts are not used for training, which matters when your treatment is unreleased. Failed or refused requests are not charged, and credit never expires, so an unfinished project does not cost you anything while it sits.
More guides
Questions and answers
Can this API generate video from my script?
No. It is a text-only model, so it produces scripts, scene beats and shot lists. Any video would come from a separate tool that you run yourself.
What content is off limits?
Sexual content involving minors is never allowed. Everything else is aimed at lawful adult use, including dark or mature themes in fiction.
How long a script can I work with in one request?
The window is 100,000 tokens for prompt and reply combined. For a feature, send a bible and the relevant scenes instead of the whole screenplay each time.
Which model name do I use?
Use uncensored as the model ID, with the API's base URL and your key, in any OpenAI-compatible client.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.