EN ▾
Get API key

Wan 2.2 Prompt Structure: Templates to Fill via API

The wan 2.2 prompt structure that works in practice is a fixed order of slots: subject, scene, motion, camera, light and style. Below are templates for three shot types and a script that fills the slots in batches.

Updated

Six glowing slot blocks with simple icons in a row, illustrating a fixed video prompt structure
Terminal at a desk taking in streams of feed items and sending out chat bubbles, illustrating a Discord news bot

Key points

  • Treat a prompt as six slots in a fixed order, each one or two sentences.
  • One clip, one action. Put the motion in its own slot with start and end states.
  • Use a template per shot type, then let a text API fill the slots from short ideas.
  • Filling slots for 1,000 clips costs about 12 cents in API fees; the video generation happens elsewhere.

The six slots

Wan 2.2 is an open video generation model. Different interfaces handle prompts slightly differently, so confirm details in your tool's documentation. A structure that most users find reliable splits the prompt into slots, always written in the same order so you can compare results between runs.

SlotAnswersGood detailWeak detail
SubjectWho or what is on screen?"weathered fisherman, grey beard, yellow rain jacket""a man"
SceneWhere and when?"wooden pier at dusk, light drizzle, moored boats""outside"
MotionWhat changes during the clip?"coils a rope, then looks up at the sky""moves around"
CameraShot size, angle, movement"medium shot, eye level, slow push in""cinematic camera"
Light and colorSource, quality, palette"cold blue dusk, warm lantern glow on his face""nice lighting"
StyleOverall look"35mm film grain, muted colors""masterpiece, best quality"

The structure matters more than any single keyword. When a clip fails, you can look at the six slots and ask which one was vague.

Writing the motion slot

Motion is where most prompts fall apart. A clip lasts a few seconds, so one clear action fits and three do not. Describe the action as a sequence with a start and an end: "starts looking down at the rope, finishes looking up at the sky". Add speed words ("slowly", "in one quick motion") and direction ("left to right", "toward the camera").

Separate subject motion from camera motion. "The fisherman coils a rope while the camera pushes in slowly" says both things clearly. Mixing them ("a moving shot of moving things") leaves the model to guess what is supposed to move.

A before-and-after shows the effect. Weak motion slot: "the fisherman works on the pier". Strong motion slot: "the fisherman crouches, lifts a coil of wet rope with both hands, then stands and looks out to sea; slow, tired movements". The second version tells the model where the action starts, what happens and where it ends, and gives a pace. Models cannot guess any of that reliably.

If your tool offers a negative prompt field, use it for visible artifacts you want to avoid, such as extra limbs, flicker or watermarks. Keep it short and factual.

Three fill-in templates

Templates cut the thinking to a few blanks. Here are three, one per shot type.

PERSON
[subject: age range, build, clothing, one distinctive detail]. [scene: place, time, weather].
[motion: one action with start and end]. [camera: shot size, angle, movement].
[light: source and color]. [style: film look].

PRODUCT
[object with material and color] on [surface] in [setting]. [motion: rotation, steam rising, droplets].
[camera: macro or close-up, slow orbit]. [light: soft box, rim light, reflections]. [style: clean commercial].

SCENERY
[terrain and key features] under [sky and weather] at [time of day]. [motion: clouds, water, wind in grass].
[camera: wide, drone-style rise or slow pan]. [light: direction and color]. [style: documentary or painterly].

Write 5 to 10 templates for the shots you make most often. Keep them in a file so your whole pipeline uses the same structure. The API documentation explains the JSON mode used in the next section.

A script that fills the slots in batches

You can write each slot by hand, or give a text model a short idea and a template, and let it fill the slots. The script below does that for a list of ideas and writes a CSV that you paste into your video workflow. Get a key on the API key page first.

import csv, json
from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI

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

TEMPLATES = {
    "person": "subject, scene, motion, camera, light, style",
    "product": "object, setting, motion, camera, light, style",
    "scenery": "terrain, sky, motion, camera, light, style",
}

def fill(kind, idea):
    slots = TEMPLATES[kind]
    system = (
        "You write slot values for a text-to-video prompt. Return JSON with exactly these keys: "
        + slots + ". Each value is one or two concrete visual sentences. "
        "Motion is a single action with a start and an end. No text overlays, no logos. "
        "All people are adults."
    )
    r = client.chat.completions.create(
        model="uncensored",
        temperature=0.7,
        response_format={"type": "json_object"},
        messages=[{"role": "system", "content": system},
                  {"role": "user", "content": "Idea: " + idea}],
    )
    data = json.loads(r.choices[0].message.content)
    return " ".join(str(v) for v in data.values()), data

jobs = [("person", "fisherman coiling rope on a pier at dusk"),
        ("product", "ceramic coffee cup with steam"),
        ("scenery", "glacier valley after a storm")]

def run(job):
    kind, idea = job
    try:
        text, data = fill(kind, idea)
        return kind, idea, text
    except Exception as e:
        return kind, idea, "ERROR " + str(e)

with ThreadPoolExecutor(max_workers=3) as pool, open("slots.csv", "w", newline="") as f:
    w = csv.writer(f)
    w.writerow(["kind", "idea", "prompt"])
    for row in pool.map(run, jobs):
        w.writerow(row)

Because slot values are separate keys, you control the order of the final prompt yourself. The code joins them in the order the model returned them; to force the order, build the string from a fixed list of keys instead of data.values().

Consistency across a series of clips

For several clips of the same character or location, keep the subject and style slots identical word for word and vary only motion and camera. Store those fixed slots as constants, and ask the API only for the changing ones. That keeps the look steady and shrinks the input, because the model writes less.

A short continuity sheet helps as well: wardrobe colors, hair, props, time of day. Include it in the system message when you fill slots, with the rule "reuse these details exactly". Without it, a red jacket in clip one becomes orange in clip four.

Resist the urge to change three slots at once when a clip disappoints. Change one, regenerate with the same seed if your tool allows it, and compare. That is slower for the first few tries and much faster after that, since you learn which slot matters for which problem.

Keep a log of the final prompt, seed and result for each clip. After a few dozen clips you will see which slot wording gives you the best motion, and you can move those phrases into your templates.

Cost and limits for batch filling

Rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens. A slot-fill call is small: about 400 tokens in and 120 out.

  • Input: 400 / 1,000,000 x $0.15 = $0.00006
  • Output: 120 / 1,000,000 x $0.50 = $0.00006
  • One call: $0.00012
  • One thousand calls: $0.12

The API only writes text. Rendering the clips, which is where the real compute cost sits, happens in your own Wan 2.2 setup. Failed or refused requests are not charged. Top-ups start at $20; the pricing page lists amounts and crypto payment options (USDT on TRC20 or USDC on Base).

A full key allows 8 concurrent requests and 300 per minute, and a trial key 2 and 60, so keep the thread pool at 2 for a trial key. If you hit HTTP 429, the code rate_limited or concurrency names the limit, and a Retry-After: 5 header means wait five seconds. This service is independent and not affiliated with the makers of Wan. Sexual content involving minors is never allowed.

Questions and answers

What order should the parts of a Wan 2.2 prompt go in?

A reliable order is subject, scene, motion, camera, light and color, then style. Keep it the same across runs so you can compare results.

How long should the prompt be?

One paragraph of roughly 60 to 120 words works for many setups, but check the limit of the tool you use.

Can the API render the video?

No. It is text only. It fills in prompt slots, and you render the clip in your own Wan 2.2 workflow.

Can I try the script for free?

New users can claim $0.50 of trial credit with one click on the API key page. It needs no payment method and lasts 7 days.

Your key is one form away

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