EN ▾
Get API keyapi.wanuncensored.top/v1
  1. wanuncensored.top
  2. What Is an Example of Wan? A Prompt Workflow

What Is an Example of Wan? A Prompt Workflow

Wan is a family of video generation models, and a typical project starts with text: an idea, a shot list, then prompts. Here is one full example, with code for the text half.

Updated

A conveyor belt turning a scroll into five film-frame tiles, showing a text-to-video prompt workflow

Key points

  • An example of Wan in practice: a rough idea becomes a shot list, then one prompt per shot, then clips.
  • This API handles the text half only; it does not run Wan or generate video.
  • JSON mode makes the shot list easy for a script to loop over.
  • The whole text side of the example costs about a tenth of a cent at $0.15 and $0.50 per 1M tokens.

A concrete example from idea to clip

When people ask what is an example of wan, they often mean one of two things: an example of the model's output, or an example of how it fits into a real project. This page covers the second. Wan is a family of video generation models from Alibaba. You give such a model a text prompt, sometimes plus an image, and it returns a short video clip. Everything that happens before that prompt is text work, and that is the part we serve.

Here is the example we will build. A creator wants a 30-second trailer for a fantasy short story. The steps are:

  1. Write a one-paragraph idea.
  2. Ask a text model to break it into five shots, each with a visual description and a camera note.
  3. Turn each shot into a detailed prompt suited to a video model.
  4. Send the prompts to the video tool of your choice, one clip per shot.
  5. Assemble the clips in an editor and add voice-over drafted by the same text model.

Steps one, two, three and five are text. Step four is the video model, which this API does not provide.

What this site is, and what it is not

The API here is OpenAI-compatible and serves a single open-weight text model, with the model ID uncensored. It is run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not an official API of Alibaba, Wan's developer, nor of any other vendor, and it does not route across vendors.

There is no image, audio or video generation, no embeddings and no fine-tuning. If you need a clip, you still need a video model elsewhere. What you get is a drafting partner that will write a grim battle, a ghost story or an adult drama as text without stopping to lecture. Sexual content involving minors is the one thing that is never allowed.

The Wan-specific details, such as how long a prompt can be or which resolutions are offered, belong to the video tool you pick. Check its own documentation.

Step 1 and 2: from idea to JSON shot list

JSON mode makes the output predictable. Set response_format to a JSON object, describe the shape in the system message, and parse the answer.

import json
from openai import OpenAI

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

idea = (
    "A blind cartographer crosses a salt desert to redraw a map "
    "that her dying mentor got wrong. Melancholic, golden hour."
)

resp = client.chat.completions.create(
    model="uncensored",
    response_format={"type": "json_object"},
    messages=[
        {"role": "system", "content": (
            'Reply with JSON only: {"shots":[{"id":1,"summary":"...","camera":"..."}]}. '
            "Exactly 5 shots, 6 seconds each."
        )},
        {"role": "user", "content": idea},
    ],
    temperature=0.7,
)
shots = json.loads(resp.choices[0].message.content)["shots"]
for s in shots:
    print(s["id"], s["summary"])

If json.loads fails, retry once. A failed request is not charged, and malformed output is rare but possible with any model.

Step 3: one detailed prompt per shot

Short summaries are not yet prompts. Video models usually respond better to text that names the subject, the action, the setting, the camera movement, the light and the mood. A second pass can expand each shot. Running the shots concurrently saves time, but remember the limits: a full key allows 8 concurrent requests, a trial key 2.

from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI

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

def expand(shot):
    r = client.chat.completions.create(
        model="uncensored",
        messages=[
            {"role": "system", "content": (
                "Write one video prompt, a single paragraph. Include subject, action, "
                "setting, camera movement, lighting and mood. No preamble."
            )},
            {"role": "user", "content": f"Shot: {shot['summary']}. Camera: {shot['camera']}."},
        ],
        temperature=0.8,
        max_tokens=300,
    )
    return r.choices[0].message.content.strip()

with ThreadPoolExecutor(max_workers=4) as pool:
    prompts = list(pool.map(expand, shots))

for p in prompts:
    print(p, "\n")

Four workers stay safely under the full-key limit of 8. With a trial key, set max_workers=2, or you will see HTTP 429 with the code concurrency. If it happens, wait and retry; an overload response carries Retry-After: 5.

What a good video prompt contains

Most video models respond to the same handful of ingredients. You can put them in the system message so every expansion call follows one pattern.

IngredientExample
SubjectA blind cartographer in a long linen coat
ActionKneels and runs her fingers across a cracked salt plate
SettingFlat white desert, a distant line of dunes
CameraLow tracking shot, slow push-in
LightLow golden sun, long shadows
MoodQuiet, melancholic

Treat this as a starting point and check the guidance of the video tool you use, since each one has its own preferences on length and phrasing.

Variations on the same pipeline

The same structure fits many projects. A music video swaps the story idea for lyrics and asks for one shot per line. A product ad asks for three short scenes and a tagline. A game studio can feed a quest description and ask for cutscene shots in a consistent art style, repeating a style string in every prompt so the clips match.

If you want the model to hand results to your code directly, use tool calling: define a function such as save_shot in the tools list, set tool_choice, and read the arguments from tool_calls. Return results as a message with role: "tool". For most pipelines JSON mode is simpler, but tools help when the model should decide how many shots to save.

Two pitfalls come up often. Characters drift between shots if each prompt describes them differently, so keep a short character sheet in the system message and tell the model to copy it word for word. And long histories get expensive, so start a fresh conversation for each shot rather than extending one thread.

Checking the result before you spend on video

Video generation is the slow, costly part of the pipeline, so inspect the text first. Print all five prompts and read them in order. Do they describe the same character the same way? Does each shot move the story forward? Is any prompt longer than the video tool accepts? Fixing a paragraph takes seconds, while regenerating a clip takes much longer. Save the approved prompts to a file with the date and the idea that produced them, so you can rerun or tweak a single shot later without redoing the whole chain.

A cheap trick is a review call. Send the five prompts back to the model and ask it to list inconsistencies in names, clothing, time of day and location. Apply the fixes, then send the final prompts to the video tool. The review costs a fraction of a cent and often catches a character who changes coat between shots.

Step 5: voice-over and captions

Once the clips exist, the same model can write the narration. Give it the finished shot list and ask for one line per shot, limited to a word count that fits six seconds of speech, roughly 12 to 15 words. Then ask for a second version in a different tone, for example dry and sparse versus warm and storytelling, and pick the one that suits the cut. This is also the place to request SRT-style captions, which are plain text.

A trailer needs a title card line and a closing line too. Ask for three options of each and choose by ear. Because each call costs a fraction of a cent, generating several options is cheaper than arguing about one.

Cost of the text half

Price is $0.15 per 1M input tokens and $0.50 per 1M output tokens. For the example above, take the shot-list call as 300 input and 400 output tokens: 300 x $0.15 / 1M = $0.000045 and 400 x $0.50 / 1M = $0.0002, so $0.000245. The five expansion calls are about 120 input and 250 output tokens each: 120 x $0.15 / 1M = $0.000018 and 250 x $0.50 / 1M = $0.000125, which is $0.000143 each, or $0.000715 for five. The narration pass, about the size of one expansion call, adds $0.000143, so the whole trailer text comes to roughly $0.0011.

That is about a tenth of a cent for the entire text side. The trial gives $0.50 of credit, which covers a few hundred such trailers. See pricing for top-ups, which start at $20, and bonuses, which add 5%, 10% or 15% from $50, $100 and $200.

If you also work with Runway, the Runway API explainer on this site covers that side. For endpoints and parameters, open the quickstart docs, and to start, get a key and claim the trial after signing up with Google or with email and password. Prompts are not used for training.

Questions and answers

Can you give a simple example of Wan?

Wan is a family of video generation models. A common example is turning a text prompt into a short clip, with the prompt itself drafted by a language model such as the one on this API.

Does this API run Wan?

No. It is a text-only API with one model, model ID uncensored. You send its output to a video tool.

Can I use it for fiction and roleplay prompts?

Yes, for lawful adult use. Sexual content involving minors is never allowed.

How many requests can I make at once?

A full key allows 8 concurrent requests and 300 per minute. A trial key allows 2 and 60.

Your key is one form away

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