All guides

Draft · AI projects · Free guides

Make an animated story video with Claude Code

Turn a story you know into a 60 to 75 second animated reel with voices, music and captions. Claude Code writes the script and the small programs, Gemini draws the frames and does the voices, and the frames move without any AI video tool. My 71-second Akbar and Birbal reel cost about $7 in Gemini. The starter kit has every prompt, my real script, style page and character sheets, and the scripts that make still frames move.

Runs in
Claude Code (Claude desktop app, Code tab) + a Gemini API key
Time
An afternoon for your first one

What you'll make

A vertical 1080x1920 video, about a minute long, that tells one story. Each shot is a still anime-style frame that moves: mouths follow the voices, eyes blink and the camera pushes in slowly. Every character has their own voice, quiet music plays underneath and captions run along the bottom.

The running example is my Akbar and Birbal reel, "The Stick That Grows". Akbar's emerald ring is stolen, Birbal gives eight servants sticks that he says will grow an inch for the thief, and the thief gives himself away by cutting his stick shorter.

What you need

You don't need an AI video tool. I didn't have one on my Gemini account, and moving still frames worked fine.

Try it first with the starter kit

The starter kit is my real Birbal project. It has every prompt from this page in one file, the script, the style page, both character sheets, one real final-frame prompt and the 7 scripts Claude wrote for the reel.

  1. Click the download link below. The file lands in your Downloads folder.
  2. Open the zip. On a Mac, open Finder, click Downloads and double-click story-video-starter-kit.zip. On Windows, open File Explorer, click Downloads, right-click the zip, click Extract All, then Extract.
  3. A folder called story-starter-kit appears. Open README.txt first. It says what each file does.

Part 1: get set up

Step 1. Open Claude Code on a folder

  1. Make a new folder on your Desktop called Story Videos.
  2. Copy the tools folder from the starter kit into it.
  3. Open the Claude desktop app. Get it from claude.ai/download if you don't have it.
  4. Click the Code tab at the top.
  5. Make sure it says Local, not Cloud. Local means Claude can work with the files on your computer.
  6. Click the folder picker and choose your Story Videos folder.

You should see the folder name in the chat box. No Code tab? It needs a paid plan.

Step 2. Get your Gemini key

  1. Go to aistudio.google.com and sign in with your Google account.
  2. Click Get API key in the left menu.
  3. Click Create API key, then copy the key.
  4. Turn on billing for that key's project when AI Studio asks. The image model that makes the final frames needs it.

Treat the key like a password. Never paste it into a chat.

Step 3. Let Claude install the tools

Paste this into Claude Code:

Set up this folder for making story videos. Install anything missing: Python 3 with opencv-python, numpy, pillow and python-dotenv, and ffmpeg. Ask me before anything needs my approval. Then make an empty file called .env and tell me when it's ready for my key. Don't make any images yet.
  1. Read each approval pop-up, then allow it.
  2. When Claude says the .env file is ready, open it yourself. On a Mac, right-click it in Finder and choose Open With → TextEdit. Files starting with a dot are hidden, so press Cmd + Shift + . in Finder to show them.
  3. Type GEMINI_API_KEY= and paste your key straight after it, with no spaces.
  4. Save and close the file.
  5. Tell Claude: The key is in .env. Check that tools/gen.py can make one small test image, and don't print the key.

You should see a small test image in the folder. If you get an error about billing, go back to AI Studio and turn billing on.

Part 2: make the video

Step 4. Write the script line by line

Every shot gets one row: who speaks, how they say it, and the line. The HOW column is the important one. It becomes the direction for the voice in Step 9.

Write a 60 to 75 second story reel of [your story]. One row per shot: who speaks, how they say it, and the line. Write HOW as a full direction, like "Say slyly, like sharing a secret, with small pauses". End on the twist. Keep it to 12 to 15 shots. Save it as script/lines.tsv with tab-separated columns: shot, voice, how, line. Leave the voice column empty for now.

Three real rows from my script:

WhoHowLine
NarratorSay in a warm, low storyteller voice, a little hushedAkbar's court. And something precious has gone missing.
AkbarSay coldly and quietly, an emperor holding back angerMy emerald ring was in this room last night. One of you took it.
BirbalSay slyly and confidently, like sharing a secret, with small pausesThese are magic sticks. Tonight, the thief's stick will grow. By one inch.
  1. Read the script out loud. If a line is hard to say, ask Claude to rewrite it.
  2. Too long? Ask for 12 shots.
  3. Run the humanizer on it if you have it, or ask: Cut anything that sounds like AI wrote it. Keep every fact.

My whole script is in the starter kit as script/lines.tsv.

Step 5. Write your style page

The style page is one paragraph that goes at the end of every image prompt, so every frame looks like the same show. Add an AVOID line too. Without one, Gemini drifts towards a glossy, glowing look that people recognise as AI.

Write one style page for this story in style/style-page.txt: art style, setting and colours, plus an AVOID line listing what makes images look AI-made (glow, bloom, haze, sparkles, dark vignettes, the glossy AI-illustration look). Check the history: what each person really looked like and wore, and list any facts I should know.

The style page in every frame of my reel:

Art style: modern Japanese TV anime with artistic simplification, like a soft historical court-mystery drama. Characters: clean confident linework, simplified flat cel shading with one soft shadow tone, simple elegant faces (small nose, minimal mouth lines, expressive clear eyes), no excess wrinkles or texture. Backgrounds: painterly and atmospheric with soft watercolour washes. Muted, harmonious palette: dusty rose, sage, ivory, saffron, deep teal, warm sandstone. Setting: Akbar's court at Fatehpur Sikri, 1570s, accurate Mughal clothing, jewellery and red-sandstone architecture. No text, no watermark, no speech bubbles.

It was my second version. The first was softer and more pastel, with bloom and glow. After the reel, I wrote a calmer, flatter version with a full AVOID line: "glow, bloom, light shafts, haze, fog, sparkles, dramatic contrast, dark vignettes, painterly texture, noise, heavy saturation, over-detailed ornament, the glossy AI-illustration look". Both are in the starter kit. Change one thing at a time and compare.

The history check caught real details: Akbar had a moustache and no beard, and Birbal was older than Akbar.

Step 6. Make a character sheet for each person

A character sheet is one image with the person full body, a face close-up and a few expressions. You pass it into every later image so faces stay the same from shot to shot.

Use tools/gen.py to make a character sheet for each person: full body, a face close-up and 4 expressions, on a plain background, with the style page at the end of the prompt. Show me each sheet before moving on.
  1. Look at each sheet. Is the age right? The clothes? The face?
  2. Ask for changes in plain words, like Make Birbal older and heavier, with a grey beard.
  3. Save the one you like as characters/<name>.png.

My Akbar and Birbal sheets are in the starter kit.

Step 7. Draft every shot cheap

Drafts are quick, small images, about 4 cents each. You fix the story here, while a redo is cheap, before you pay for the big final frames.

Make a quick draft of every shot with the Gemini Flash image model at small size (1K), vertical 9:16. Pass the character sheets as reference images. Put all the drafts on one storyboard page (an HTML file) so I can mark each shot approve or redo. Don't make any final frames yet.
  1. Open the storyboard page Claude makes. It opens in your browser.
  2. Mark each shot approve or redo, with a note for every redo, like Shot 5: show the hands holding the sticks.
  3. Send all your notes in one message.
  4. Repeat until every shot is approved.

Check the framing, who is in the shot and the camera angle. Small details get fixed in the finals.

Step 8. Turn the drafts into finals

Each final frame uses the approved draft for framing and the character sheets for faces.

For each approved shot, make the final vertical frame at large size (2K) with the Gemini Pro image model. Pass the draft and the character sheets as reference images. Use this prompt shape for every shot: "Final anime frame, vertical 9:16. Image 1 is a rough sketch: keep its framing and camera angle but redraw it fully finished. The other images are character sheets: match their faces, ages, clothing and colours exactly. Shot: [what happens]. Emotion: [feeling]." Then paste my style page at the end. Save each as shots/sNN/key.png and show me a contact sheet.

My real prompt for shot 6 is in prompts/shot-06-final-frame.txt. The middle of it reads: "Shot: Medium close-up on Birbal, slow push in. Medium close-up of Birbal facing the viewer, raising one finger, a sly confident smile, soft blurred court behind him."

For shots where someone will talk, ask for the face large in frame with the mouth closed. Step 9 needs a closed mouth to start from.

Step 9. Make it move

This is the part that replaces AI video. For each talking shot, Gemini redraws the same frame 5 more times: 4 mouth shapes and one with the eyes closed. A small program then swaps between them in time with the voice and adds blinks and a slow camera move.

First, make the voices (you need them for lip sync). Paste:

Voice every line with Gemini text-to-speech using tools/tts.py. Give each character their own prebuilt voice and use the HOW column as the --style direction. Play me a 2 second sample of 3 different voices for each character first so I can pick. Save one wav per shot in audio/v/.

My cast:

CharacterGemini voiceDirection
NarratorCharonSay in a warm, low storyteller voice, a little hushed
AkbarAlgenibSay coldly and quietly, an emperor holding back anger
BirbalPuckSay slyly and confidently, like sharing a secret, with small pauses
ServantEnceladusSay desperately, a frightened young servant begging, voice breaking

Then the motion:

Make each frame move without AI video. For every shot where someone talks, run tools/variants.py to get 4 mouth shapes and a closed-eyes version, then tools/locate.py to find where the mouth and eyes are. Write a rig_cfg.py for each shot (see example/rig_cfg-shot-06.py) and run tools/rig2.py to render it: mouths that follow the voice, blinks, and a slow camera push. Show me one shot before doing the rest.

The edit prompt inside variants.py is the key. It says exactly what to change and then forbids everything else:

Edit this image: change only Birbal's mouth: mouth open in a rounded "oh" shape. Change NOTHING else at all: identical framing, pose, face shape, expression of the rest of the face, other characters, clothes, background, line style and colours. Keep the moustache and beard exactly the same.

  1. Watch the first shot Claude renders.
  2. Mouth jumping around? Ask Claude to check locate.py's output. The mouth zone is probably too big.
  3. Face looks frozen? Ask for more blinks or a little head sway.
  4. Shots with no talking still get the camera push, dust in the light and a lamp flicker, so they don't sit still.

Rather use a real voice? Record each line on your phone, drop the files in audio/v/ with the same names, and skip the text-to-speech prompt.

Step 10. Add music and small sounds

Make soft background music for this story with Lyria (tools/music.py), no singing, about 80 seconds, matching the mood. Turn it down under every voice line. Add small sounds where they help, like a heartbeat when someone is scared or a whoosh into a close-up.
  1. Listen to the music on its own first. If it's busy or has a strong beat, ask for something calmer.
  2. Keep it quiet. In my reel the music plays at about a third of the voices' volume and dips further whenever anyone speaks.
  3. My sounds are a heartbeat when the servant is scared, a whoosh into his eyes and a knife scraping the stick. Claude made all three in code, so they cost nothing.

Step 11. Captions, stitch and check

Run tools/assemble.py: add short captions timed to each voice line and join the shots into one 1080x1920 video with the music and sounds. Then pull a frame every 2 seconds into one contact sheet and check that nothing covers a face, no caption is cut off, and every real photo matches the story.
  1. Watch the whole video once with sound.
  2. Open the contact sheet and look at every frame.
  3. Send any fixes in one message, like Shot 3 is too long, cut it to 4 seconds.

assemble.py in the kit has Birbal's shot names and sounds written into it. Ask Claude to adapt it to your shots.

Other looks that cost nothing

The steps above are for AI-drawn frames. Two other looks skip the image costs completely.

Drawn in code. My Ramayana scroll is hand-drawn shapes in one web page, with no AI images. Paste:

Draw every scene in one HTML file with SVG and a seek(t) function, so the same time always draws the same frame. Then record it to a 1080x1920 video.

It's free and quick to change, but the drawings are simpler.

3D cartoon. My cooking stories are 3D characters in a toon-shaded kitchen, built with three.js inside Remotion, a tool that turns code into video. Ask Claude to set up a Remotion project with a three.js scene. It takes longer to set up the first time, and after that each new video renders in under a minute.

Explainers. Same steps, but the story is a real event. For my plane explainer, Gemini made cutouts of a jet on a plain green background, Claude removed the green so only the cutout showed, and Remotion animated them with smoke, clouds and sound.

What went wrong for me

Quick checklist