AI short drama generator:
a cast, a set and an episode from the API
Make vertical short dramas from code: save a cast and sets once, write each shot with @tags and quoted dialogue, then join the shots into an episode for free.
Last updated 2026-11-05
Black Friday deposit bonus
Every qualifying top-up earns free credit, on top of any other offer.
Ends November 30
A short drama lives on the same faces, the same rooms and a line of dialogue every few seconds, episode after episode. That is what video shots are built for. Save your cast once as characters (a turnaround sheet and a voice each) and your sets as scenes. Write every shot as a sentence that tags who and where, In @[Penthouse], @Lena slaps the contract on the table: "You lied to me.", and the shot comes back with those faces, that room, the sound and the line spoken in Lena's voice. Join the finished shots into an episode for free, and keep the storyboard in a project. Vertical 9:16 for short-video apps, 16:9 for everything else, with no code in the video playground.
Hand it to your AI agent
Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.
Build a tool that turns a short drama script into vertical episodes with Lovely Router saved characters, scenes, video shots and free joins. - Docs (read first): https://lovelyrouter.com/docs/api/video-shots.md and https://lovelyrouter.com/docs/api/characters.md - Save the cast and sets (POST https://lovelyrouter.com/v1/characters, /v1/scenes), write each shot with `@handle` tags and quoted dialogue to POST https://lovelyrouter.com/v1/videos/shots (`consent: true`), poll, then POST https://lovelyrouter.com/v1/videos/joins. - Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys. - Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large. - Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt. My task: <the cast, the sets and the episode script>
How it works
Cast the series
Draw each lead as a turnaround sheet with the image generation API and save it with
POST /v1/characters, free. Link a voice to each: a voice designed with text to speech, or a recording of a performer who agreed to it.Build the sets
Save every recurring place, the office, the penthouse, the hospital corridor, with
POST /v1/scenes: a name, a description and a picture. Up to 100 scenes and 100 characters per account.Write the shots
One request per shot: a prompt that tags the characters and the scene, with the dialogue in double quotes. Each tagged one becomes a reference picture, so faces, hair, clothes and the room come from your library, not from the prompt. Shots run 5 to 15 seconds.
Cut the episode
POST /v1/videos/joinsputs up to 50 completed shots of one size together in order, each with its own sound, at no charge. Keep the episode's shot list, characters and scenes in a project so you can come back to it.
An episode in a few requests
import os
import requests
BASE = "https://lovelyrouter.com/v1"
H = {"Authorization": f"Bearer {os.environ['LOVELY_API_KEY']}"}
LENA = "chr_3b9e1f0c7a2d4e58b6c1a9f2" # saved with POST /v1/characters
MARCUS = "chr_1e4b7d0a9c3f2e5b8a6d0c1f"
PENTHOUSE = "scn_5b2d9e0c1a7f4b3e8d6c2a1f" # saved with POST /v1/scenes
project = requests.post(f"{BASE}/videos/projects", headers=H,
json={"name": "The Contract, episode 3", "doc": {"size": "9:16"}}).json()
script = [
'In @[Penthouse], @Lena storms in and slaps the contract on the table: "You lied to me."',
'@Marcus looks up from the window, calm: "I protected you."',
'@Lena laughs once, without humour, and steps closer to @Marcus: "From what?"',
]
shot_ids = []
for line in script:
shot = requests.post(f"{BASE}/videos/shots?wait=300", headers=H, json={
"model": "minimax-h3-video",
"consent": True,
"prompt": line,
"characters": [LENA, MARCUS],
"scenes": [PENTHOUSE],
"size": "9:16",
"seconds": 8,
"project_id": project["id"],
}).json()
while shot["status"] in ("queued", "in_progress"):
shot = requests.get(f"{BASE}/videos/shots/{shot['id']}?wait=120", headers=H).json()
shot_ids.append(shot["id"])
episode = requests.post(f"{BASE}/videos/joins", headers=H,
json={"shots": shot_ids, "project_id": project["id"]}).json()
print(episode["id"], episode["status"])When the join is done, download it from GET /v1/videos/joins/{id}/content. Shots are made one by one here for clarity; an account can have five shots or joins queued or rendering at once, so you can send several before waiting. The video shots reference has the same calls in cURL and Node.js.
The tools for the job
POST /v1/characters: a name, a description and a turnaround sheet (front, three-quarter, side and back, with six expressions). Save a sheet you generated by its image job id with sheet_image_job. See characters.
A character with a linked voice speaks its lines in it: the timbre, pitch and manner of the sample. The first three voiced characters of a shot bring their voices; voices don't change the price.
POST /v1/scenes: the place and its picture, tagged like a character (@[Night Café]).
@Lena, @[Full Name] or the id. Words in double quotes are spoken by the character tagged last before them. A shot takes 1 to 9 pictures.
With two or more characters, a chat model rewrites he, she and they outside the dialogue into tags, so the video model knows who does what. The dialogue is never changed. Send sweep: false to render your prompt exactly as written.
Joins are free and keep each shot's sound. A project stores your own JSON storyboard, up to 200 KB, free, up to 100 per account.
language sets the language the dialogue is spoken in (en, zh, ja, …); style sets the look, such as warm 35mm film; seed makes a shot repeatable.
Writing shots that work
The pictures carry faces and clothes, so the prompt only says what happens. Don't describe what a character looks like; describe what they do.
About one line of dialogue and one action fits a 5 to 8 second shot. A longer speech reads better split over two shots.
For a cut that has to match, send the frame as a scene and write The shot opens exactly on @[Opening frame] as its first frame. The opening follows it closely, though not pixel for pixel.
A new costume is a new sheet: update the character with PATCH /v1/characters/{id} or save the costume as its own character. Videos already made keep the sheet they used.
Any chat model on your key can turn a synopsis into a numbered shot list in this format; you review it before anything renders.
What you pay
A shot is billed per rendered second: $0.13 with one picture, plus $0.06 per second for each extra picture. The model renders on a fixed frame grid, so a 5-second shot bills 5.17 seconds and a 10-second shot 10.13 seconds. A one-minute episode of six 10-second shots, each with two characters and a scene (three pictures), costs about $15.20. The sweep's chat calls are billed as ordinary chat requests on the same key. Characters, scenes, voices, projects and joins are free. Each shot is reserved from your prepaid balance when you submit it and charged when it completes; failed and cancelled shots cost nothing. Sheets and frames cost $0.04 per image. Every price is on pricing.
Terms and responsible use
minimax-h3-video is under the MiniMax H3 terms: every shot sets consent: true, accepting them, including not using the model in the EU, the UK, South Korea or the US. Use faces and voices you own or have permission to use; a cast based on real people needs their consent. The Acceptable Use Policy applies. Finished shots and joins are kept for 7 days, so download each episode when it is done.
Frequently asked questions
Do the characters look the same in every shot?+
Yes, that is the point of tagging. Each tagged character's turnaround sheet is a reference picture for the shot, so face, hair and clothes come from it every time. Don't describe their looks in the prompt.
Can the characters speak?+
Yes. Put the line in double quotes after the character's tag and it is spoken in the shot, with the sound made by the video model. A character with a saved voice speaks in that voice.
How long can a shot be?+
5 to 15 seconds. An episode is a join of up to 50 shots, all of the same size and less than 7 days old.
Can I make dramas in Chinese or Japanese?+
Yes. Set language to zh, ja or another code and write the dialogue in that language. Tags work with any name.
Can I edit one shot without redoing the episode?+
Yes. Render a new version of that shot, then join the shot list again with the new id in its place. Joins are free.
Is there a storyboard tool?+
The playground keeps its storyboards as projects, and you can do the same from code with POST /v1/videos/projects and your own JSON.
Can an AI agent produce episodes for me?+
Yes. Copy the prompt on this page into Claude Code, Cursor or Codex: the agent reads the Markdown docs, drafts the shot list, and makes the shots and the join with your key.
For a singer's music video with the same characters, see music videos; to put your cast into footage you already have, see character replacement, or sign up and get a key.