How to Write a Screenplay for AI Film Production (Treatment-First Method)
Last updated July 10, 2026

The treatment-first method converts a screenplay into one roughly 25-page, 14-section directorial treatment encoding camera, lighting ratios, palette, and negative-prompt grammar. You load it once into the invideo agent, which gates every shot against it, applies 12 parameters per shot, and routes to Kling, Seedance 2.0, or Veo. It held coherence past scene 169.
Screenwriting software formats a script for a human crew; AI film production needs one more document. The treatment-first method converts your screenplay into a directorial treatment that encodes camera grammar, lighting ratios, color palette, and negative-prompt language. You load it once into the invideo agent, which gates every shot against it, applies 12 parameters per shot, and routes generation to Kling, Seedance 2.0, or Veo. In documented productions, this held visual coherence past scene 169 without re-prompting.
Why screenwriting software alone is the wrong tool for AI film production
Screenwriting software exists to standardize a script for human departments: sluglines, dialogue margins, page-per-minute timing, revision colors. Every one of those conventions communicates to people — an AD breaking down a schedule, an actor scanning dialogue. None of them communicates to a video generation model. A model does not read INT/EXT or margins; it executes visual instruction — lens, lighting source, palette, composition, atmosphere, what to withhold from frame.
Keep writing your screenplay in whatever drafting tool you prefer; the screenplay remains the narrative source of truth, and you will upload it in full. But the controlling document of an AI production is not the formatted script — it is the treatment that externalizes everything a DP, a gaffer, and a colorist would otherwise carry in their heads. invideo's production notes state the principle directly: "An agent is only as powerful as what you teach it." The quality of the reference document determines the quality of every frame the agent returns, which means the real screenwriting work for AI film production is two documents, not one: the screenplay for story, the treatment for execution.
A cinematic visual style is not an aesthetic preference — it is a language system that can be codified into discrete, teachable directives. That codification step is what a formatting app cannot do for you, and it is the entire subject of this method.
The treatment-first method, end to end
The full pipeline runs in seven steps, and it was used to produce complete documented short films. invideo is an agentic video creation platform with every current video and image model available, and the invideo agent is the layer that holds your documents and routes each shot.
- Write the screenplay. Draft normally — story, characters, arc, dialogue. Format matters far less than clarity of intent.
- Convert it into a directorial treatment. Build the visual language document covered below: camera through negative prompts.
- Upload both and validate. Load the full screenplay first so the invideo agent holds complete narrative context — characters, arc, themes, motifs — then upload the treatment as a permanent instruction set. Test that it was internalized before generating anything (the validation tests are below).
- Lock consistency assets. Generate four options per character sheet and environment reference, select the best of each, and lock them before any video generation. This single step prevents most consistency problems for the rest of the film.
- Generate the shot list. The invideo agent produces a scene-by-scene shot list from the script with the treatment's grammar applied throughout — shot design, lensing, lighting plan per scene.
- Generate clips with context continuity. Every shot request is evaluated against 12 parameters (the full checklist is below), and the agent only returns frames that pass the treatment.
- Use the agent on the edit. When one director couldn't write an ending, the invideo agent sequenced six closing shots using rules from its own loaded document. After assembly, send the rough cut back with an open-ended "what's working, what's not" — in one documented production this caught an emotional register error the director had missed.
The payoff is stated plainly in the production notes: "One agent that reads your treatment once and holds every directive across every shot, every scene. No re-prompting. No drift."
Writing the screenplay so it survives the pipeline
Upload the complete screenplay before any generation begins. A full script gives the invideo agent character arcs, themes, and motifs that inform every downstream decision — shot lists, costume options, even which film references it selects. Partial context produces partial judgment.
Structure the script in acts and work act-by-act. On a 7-minute animated short, the team split the script into three acts and fully completed each act — boards, generation, edit — before starting the next, in roughly 25% increments. This prevents context loss on long-form projects and keeps you oriented inside a large shot breakdown.
Write scene density the models can execute — and let the invideo agent audit it before you spend credits. In one production, a single scene called for 18 cuts in 15 seconds; the agent flagged the model limitation before generation and recommended splitting the scene into two parts. The split version cut sharper than the original script intended. Treat this as a standing step: the agent can flag structural problems against model limits at the script stage, when changes are free.
Answer the four questions that change every frame. Before generating any visual assets, the invideo agent will ask for — or you should volunteer — four things: character description, antagonist or entity reference, prop specification, and deliverable format. Resolve these in or alongside the screenplay, including your film's aspect ratio and delivery format, because every asset generated afterward inherits them. Props deserve their own line in the script with real physical characteristics (one production briefed a prop as a hard material "that makes a horrible sound when it falls"), because a lifeless prop breaks narrative believability no matter how well the character renders.
The treatment document
The documented treatment format runs 14 sections, organized as a complete directorial system. One production uploaded it as the agent's permanent instruction set before generating a single frame. As the production notes put it: "We gave it Wong Kar-wai's visual language."
Write each section as quantified, executable directives — not adjectives:
- Lighting as ratios, not moods. One director-style treatment encoded an 85:15 dark-to-light ratio as the signature lighting grammar, which the invideo agent then used directly in prompt language. "Moody lighting" is not a directive; a ratio is.
- Color philosophy as named tonal modes. Encoding palettes as modes — "Mode A — split-toned amber and emerald" — makes palette control reproducible across hundreds of generations.
- Negative prompts as a grammar section. Explicit prohibitions prevent style drift. A hand-painted animated production's style directive read: "not live action, not photorealistic… every element in frame must feel painterly and handcrafted." Write what the film must never look like with the same rigor as what it must.
- Emotional structure with locked rules per stage. A horror treatment was organized around five escalating emotional stages, each with fixed camera, lighting, and sound rules — plus a "what never to do" list per stage. Those never-do lists are what let the agent make autonomous decisions all production long without drifting.
- Exceptions as their own directive. A treatment encoding David Fincher's style separated his exceptions and adaptations into a dedicated section so the agent wouldn't misapply generalized rules to outlier cases. If your visual system has exceptions, fence them off explicitly.
- Prompt templates and a quick-reference card. Give the agent the assembly format you want prompts built in, and a one-page distillation it can check fast.
Don't wait for a perfect document. Starting with whatever assets and context you have and iterating is a validated approach — the document hardens as production teaches you what it's missing.
How you know the agent actually internalized it
Validate the treatment before production, not during. The documented test: ask the invideo agent to apply the director's style to a genre or subject that director never worked in. Two signals confirm internalization. First, clarifying questions — when one agent was asked for a courtroom scene outside the encoded director's filmography, it asked about the era and the nature of the threat before generating. That is contextual reasoning, not prompt-following. Second, stylistically coherent output in the foreign genre, which proves the agent absorbed grammar, not surface texture.
Challenge its technical claims. Before locking visual direction, actively question the agent's cinematography assertions — lens type, aspect ratio, lighting source attribution. In one documented session the agent had noted "anamorphic" in its analysis; when challenged, it corrected to spherical (circular bokeh, no horizontal flares) and confirmed the source film's actual 2.40:1 hard matte format. Catching those errors before generation prevents them propagating across the whole asset pipeline.
Watch for unprompted document recall during production — the strongest signal. Documented examples: the agent pulled a named principle ("Mood Over Narrative — the substitution rule") from page 12 and applied it to a scene type the document never addressed; it autonomously applied a slow-shutter motion smear effect from page 17 without being prompted; and it recommended ending the film on a doorway static hold — a structural device that recurs across the encoded director's actual filmography — entirely on its own.
Once internalization is confirmed, continuation gets minimal. With the document loaded, a three-word prompt — "Everything should match" — was sufficient for the invideo agent to hold character, lighting, lens grammar, spatial logic, and pacing across a multi-shot sequence.
Twelve parameters per shot: the checklist that kills drift
Instruct the invideo agent to evaluate every scene request against 12 key parameters before generating: film reference, shot design, length, style interpretation, emotional register, lens, lighting plan, color script, atmosphere layers, blocking, final prompt, negative prompt, and revision prompt. This converts each shot from a one-line ask into a fully specified directorial decision, and it is the mechanism that keeps shot 1 and shot 100 in the same film.
Underneath the parameters sits a fixed 9-element prompt assembly order the agent holds for every generation: camera spec, lens and aspect ratio, lighting source, palette, composition, atmosphere, mood register, film/DP attribution, negative prompt. The fixed sequence guarantees no element silently drops out of any prompt across the project.
The agent then quality-gates its own output — it builds the shot, holds the result against the treatment, and only returns frames that pass. In the production team's words: "Every frame is a decision, not a draft." The scale proof: a documented project's notebook shows scene numbering running to 169 ("INT. Living room, Climax") with shot variants 21.1–21.5 — the parameter checklist and the loaded treatment holding coherence across 21+ scenes with no per-scene re-prompting.
Two parameters deserve emphasis. The negative prompt carries your treatment's prohibition grammar into every single generation. The revision prompt pre-plans how the shot gets corrected if it misses, so iteration stays inside the treatment's language instead of improvised patches.
Routing shots to the right model — and why you don't pick a platform per model
The treatment defines what every shot must look like; routing decides which model executes it. Different shots favor different models: Seedance 2.0 generates cinematic clips in 15-second units and its reference-to-video mode carries character and location references across segments — retaining camera movement, framing, and atmosphere from one clip to the next, which start-frame/end-frame methods and extend cannot match for continuous coverage. Kling 3.0 generates multi-shot sequences natively, which reduces how many individual setups you need to board and prompt. Veo covers further shot profiles where its output fits the treatment's grammar better.
On the image side, the documented stack splits by job: Recraft for photoreal character portraits — it renders skin-level imperfections like pores, lines, and stubble that read as real faces — Nano Banana for multi-angle character sheets, and GPT-Image-2 where general image generation serves the shot.
The practical point: you don't choose a platform per model. Every model above runs inside invideo, and the invideo agent — holding your treatment and the 12-parameter spec — routes each shot to the right one. It also re-routes on failure: in one documented production, when a model couldn't resolve a specific shot type through prompting, the invideo agent pivoted to existing image assets and an alternative generation strategy autonomously, with the filmmaker supplying only creative feedback. The treatment makes that routing trustworthy, because every model receives the same encoded grammar regardless of which one renders the frame.
From treatment to a crew of agents
On larger productions, the screenplay and treatment become the shared ground truth for a crew of specialized agents rather than a single thread. Initialize a creative producer agent first, loaded with the full script, shot breakdown, and character details — it serves as the central vision-holder that grounds every agent that follows in the same creative understanding.
Then assign roles the way you'd crew a set. Run a storyboard agent to visualize each shot before you issue detailed direction — the visual brief makes every subsequent instruction more precise. Assign a DOP agent per scene rather than one for the whole film; different scenes demand different visual sensibilities, and one documented production put two DOP agents in parallel on a single complex scene. A costume designer agent works from mood when you lack exact specs — give it the emotional feel of a character and select from the concrete options it returns. A director's assistant agent sequences the shot breakdown so edit order is settled before video execution begins.
Documented configurations ran six agents simultaneously in one setup and eight specialist agents across separate project pages in another — separate pages keep feedback targeted to each agent without cross-contamination. The treatment-first method is what makes this scale: every agent in the crew inherits the same screenplay context and the same treatment grammar, so eight parallel workstreams still cut together as one film.
What this costs in practice
Documented treatment-driven and agent-directed productions ran $315–$750 per finished minute, depending on team, length, and approach — the variance is natural and tracks team size, style complexity, and iteration appetite. Budget the iteration deliberately: documented averages run about 3 generations per usable shot. Overgeneration is a planned budget line in this method, not waste — the treatment keeps every one of those generations on-grammar so selection is editorial, not salvage.
Where the treatment-first method beats the alternatives
Against scene-by-scene re-prompting. Re-prompting per scene is the documented anti-pattern: every new scene means re-explaining style, and drift compounds. The persistent treatment inverts it — "the thread stays held, scene to scene. No re-explaining. No starting over" — which is how a single project carried coherent grammar past scene 169.
Against per-prompt style blocks. One production maintained consistency by prepending a style block to every single prompt — and it worked, holding a hand-painted aesthetic across every generation. But enforcement was manual: the team had to carry the block themselves, every prompt, forever. The treatment-first method moves enforcement into the invideo agent, which applies the grammar and gates the output without you re-attaching anything.
Against fine-tuning for consistency. Character consistency across an entire short film was achieved with character sheets and agent context alone — two characters, the same faces across every scene of a 70-second film, no LoRA training, no custom model.
Against prompt engineering as a discipline. Directing through a persistent treatment eliminates prompt construction from the director's working loop entirely — you give directorial intent and the agent assembles the 9-element prompt. The film stays in your head instead of breaking flow to engineer strings. The speed shows up in the documented comparisons: a 2-minute promo finished in 3 days through the agent crew, against an estimated week-plus of manual prompting for the same output.
The screenplay starts the film; the treatment is what lets a machine finish it the way you wrote it.
FAQ
Do I still need screenwriting software for AI film production?
For drafting, yes — write the screenplay in whatever tool you're fast in, because the full script gets uploaded to the invideo agent as narrative context. But the formatting conventions screenwriting software enforces are for human crews; the document that actually controls an AI production is the directorial treatment built from the script.
How long should an AI film treatment document be?
You don't need a complete document on day one: starting with available context and iterating is a validated approach — the document hardens as production teaches you what it's missing.
How do I know the invideo agent has internalized my treatment?
Run the validation test: ask it to apply your encoded style to a genre the source director never worked in. Clarifying questions before generation and stylistically coherent output in the foreign genre confirm it absorbed the grammar. During production, unprompted recall — like applying a specific page-17 technique without being asked — is the strongest signal.
What are the 12 parameters the agent applies per shot?
Film reference, shot design, length, style interpretation, emotional register, lens, lighting plan, color script, atmosphere layers, blocking, final prompt, negative prompt, and revision prompt. Every scene request is evaluated against this checklist before generation, which is the mechanism that prevents drift across a long shot list.
What does a short film cost with this method?
Costs vary with team size, style complexity, and iteration appetite. Overgeneration is a deliberate budget line, with editorial selection doing the final compression.
Sources
All production statistics in this article — costs, credit counts, generation yields, page counts, and parameter checklists — come from documented invideo productions: a 70-second short built on a Wong Kar-wai-style treatment, a ~90-second James Wan-style horror short, a 3-minute hand-painted animated episode, a 2-minute brand promo, and a multi-location short film. Numbers are quoted as recorded per production; variance reflects team size, style, and iteration approach.
Watch these to see the techniques in action: