Guide · AI tools

Nano Banana keyframes for website hero videos: consistent start and end frames

By Md Mahafuj Alam · Updated

Generate the start frame first, then make the end frame by editing that image, not by writing a new prompt, so the building, product and light stay the same. Decide the camera move before you prompt, pin the lens, time of day and sun direction in a block you paste into both prompts, and render 16:9 for desktop and a separate 9:16 pair for phones. A video model then fills in the motion between the two frames, and a canvas scrubs the result on scroll.

Why keyframes decide the quality of a scroll video

A scroll-driven hero is usually a short AI video clip, cut into frames and drawn on a canvas as the visitor scrolls. The clip starts life as two still images: a start frame and an end frame. The video model's job is to invent the motion in between. It interpolates camera position, light and the shape of every object from one still to the other.

That makes the two stills the real brief. If the tower has 30 floors in the start frame and 28 in the end frame, the model has to explain the difference, and it does so by melting floors away mid-clip. If the sun is on the left in one and on the right in the other, the shadows swing during the move. On a page where the reader scrubs back and forth, every one of those glitches is visible again and again.

Good keyframes have three properties. They show the same world (identical architecture, product and props). They show it under the same light. And they differ only by the camera move you planned, plus any single change you intend, such as lights switching on. Everything in this guide serves those three properties.

Nano Banana is Google's name for its Gemini image generation and editing models. According to the Gemini API image generation docs (October 2026), the family includes Nano Banana 2.1 (gemini-nano-banana-2.1), which Google recommends for new projects, Nano Banana 2, Nano Banana 2 Lite, Nano Banana Pro (gemini-3-pro-image) and the original Nano Banana (gemini-2.5-flash-image). The editing and multi-turn features this workflow relies on are the reason to use it for keyframes. Note that Google lists the Lite model as not optimised for multi-reference input or multi-turn editing, so skip it here.

Decide the camera move before you write a prompt

Write the move as one sentence before you open any tool. "The camera pushes in slowly from the far side of the river towards the tower's entrance." "The camera cranes up from street level to the rooftop pool." "The camera orbits 30 degrees clockwise around the bottle." That sentence tells you what the two frames must look like.

Common hero camera moves and what each keyframe must show
Camera moveStart frameEnd frame
Push-in (dolly)Wide view, subject small and centredSame axis, subject fills the frame
Crane upLow angle near the groundHigh angle, same subject, horizon lower in frame
OrbitSubject seen from one sideSame subject rotated, background shifted in the opposite direction
Fly-throughExterior, opening visibleInterior, looking out through the same opening
Lateral trackSubject at one edgeSubject at the other edge, foreground slides past

Keep the move modest. A push-in to roughly twice the subject size, or an orbit of 20 to 45 degrees, is easy for a video model to fill. A 180-degree orbit, or a jump from a city skyline to a bathroom tap, forces the model to invent most of the clip, and invented content is where drift lives. If the story needs a bigger journey, split it into two or three clips that share keyframes: the end frame of clip one becomes the start frame of clip two. Kestra's hero, for example, is a 443-frame sequence cut from two 4K Kling 3.0 clips.

If you are still shaping the story, the scroll story planning guide covers how to break a page into scenes and moves before any generation starts.

Write the start frame prompt

Google's own best-practice list for these models is short and useful: be hyper-specific, give context and intent, use photographic and cinematic language to control the camera, and describe what you want instead of what you do not want. That last one they call a semantic negative prompt: "an empty, deserted street" rather than "no cars". Apply all four to a keyframe.

Start frame prompttext
Purpose: the first frame of a slow cinematic push-in for a property
developer's website hero. Photorealistic architectural photograph.

Subject: a slender 30-storey residential tower of pale stone and
floor-to-ceiling glass on a calm waterfront, a rooftop pool visible as a
thin turquoise line at the top. A low stone promenade runs along the water
in the foreground.

Camera: 35mm lens, eye level from across the water, tower centred, about
one third of the frame height. Straight verticals, no tilt.

Light and time: late golden hour, sun low from the left, warm light on the
left faces of the tower, soft blue shadows on the right. Clear sky with a
few thin high clouds. Still water with long reflections.

Scene: an empty promenade with no people, no vehicles and no signage.
Clean, uncluttered, calm.

Aspect ratio 16:9.

Notice what is fixed: lens, height, sun side, time of day, weather and the state of the water. Notice what is left out: any text. Signs, logos and lettering are the hardest thing to hold steady across two frames and a video, so describe the scene without them and set your headline in HTML over the canvas. If you need lettering in the image, Google's docs note the model works best when you settle the text first and then ask for an image containing it.

Generate four to six variations and pick on composition, not detail. You are choosing the frame the whole clip will grow from, so check the edges: anything cut off at the edge of the start frame will be invented when the camera reveals it.

Make the end frame by editing the start frame

This is the step that most often goes wrong. If you write a second prompt from scratch ("the same tower, closer"), the model designs a new tower. The facade pattern changes, the balconies move, the pool becomes a terrace. Instead, give the model the start frame as an input image and ask for an edit.

Nano Banana models accept images with a text instruction and can add, remove or modify elements while keeping the rest. Google's docs also recommend multi-turn editing for iteration, with follow-ups such as "Keep everything the same, but..." That phrase is a good template for every end frame.

End frame edit (attach the chosen start frame)text
Using this image as the exact reference, keep the same tower, the same
facade, the same number of floors, the same promenade, the same golden-hour
light from the left and the same sky.

Change only the camera: move it forward across the water so the tower's
lower ten floors and the entrance fill the frame. Same 35mm lens, same eye
height, verticals still straight.

Keep the promenade empty with no people or vehicles. Aspect ratio 16:9.

Edit in small steps

If one edit cannot get from the start to the end without the building changing, take two smaller steps and keep the middle image as a spare keyframe. A three-frame chain (start, middle, end) also lets you render two shorter clips if the single long one drifts.

Pass extra references when the subject is a real product

For a product, add clean photos of the real item as further reference images. Google allows up to 14 reference images in total and lists per-model limits: Nano Banana 2.1 and Nano Banana 2 keep up to 10 objects at high fidelity, and the original Nano Banana works best with up to 3 input images. Fewer, cleaner references beat many mixed ones. The Nano Banana product keyframe prompts page has start and end pairs for bottles, phones, packaging and more.

Lock lighting, lens and time of day

Drift between keyframes is rarely the subject. It is usually the light. One frame comes back slightly cooler, the sun a little higher, the sky with more cloud. The video model then animates a weather change you did not ask for. The fix is a continuity block: a short paragraph you paste, unchanged, into every prompt for a scene.

Continuity block (paste into every prompt for the scene)text
Continuity: 35mm lens at eye level. Late golden hour, sun low from the
left at about 15 degrees above the horizon. Warm key light, cool blue
shadows. Clear sky with thin high cloud. Still water. Natural colour, gentle
contrast, no lens flare, no haze.
  • Lens. Name a focal length and keep it. A push-in should be the camera moving, not a zoom, unless you want the background to flatten.
  • Sun direction and height. State the side and roughly how high. "From the left, low" is enough to keep shadows on the same side.
  • Time of day and weather. One phrase each. Do not leave the sky to chance.
  • Grade. Describe contrast and colour once ("natural colour, gentle contrast") and keep it. Mood words like "dramatic" invite the model to restyle.

The one exception is a deliberate change. If the story is day to dusk, or lights switching on in the windows, make that the only change in the edit instruction and keep the camera still. Never change the light and move the camera in the same pair.

Aspect ratios and resolution for desktop and phones

Render desktop keyframes at 16:9 and a separate portrait pair at 9:16 for phones. Cropping a 16:9 video to portrait throws away about two thirds of each frame and usually cuts the subject. Kestra and Orbitly both ship dedicated portrait frames for phones for this reason.

In the API you set aspect_ratio and image_size in the response format. The size value must use an uppercase K (2K, not 2k); Google says lowercase values are rejected. The sizes Google publishes for Nano Banana 2.1 are below.

Nano Banana 2.1 output sizes, from Google's Gemini API docs (October 2026)
Aspect ratio1K2K4K
16:9 (desktop)1376 × 7682752 × 15365504 × 3072
9:16 (phone)768 × 13761536 × 27523072 × 5504
21:9 (wide banner)1584 × 6723168 × 13446336 × 2688

The original Nano Banana (gemini-2.5-flash-image) has a single size per ratio, 1344 × 768 at 16:9. Nano Banana 2 Lite only produces 1K. For a hero that ends up around 1920 pixels wide on screen, 2K keyframes give the video model a sharp source with headroom. Work at 1K while you iterate, then render the chosen pair at 2K or 4K by repeating the final edit with the larger size.

For the phone pair, do not just ask for 9:16 with the desktop prompt. Recompose: the subject sits higher, the move is usually vertical (crane up or down), and there is less foreground. Make the portrait start frame its own prompt, then edit it into its end frame in the same way.

Common mistakes and how to catch them

  • Drift. Colour temperature, sky or contrast shifts between the frames. Fix it with the continuity block and by editing, not regenerating.
  • Changed architecture. Floor counts, window rhythm or balcony shapes differ. Name the details to keep ("the same number of floors, the same vertical fins") in the edit instruction.
  • Text artefacts. Signs and labels turn to near-letters. Keep text out of keyframes and add it in HTML.
  • Edge invention. The end frame reveals a side of the building the start frame never showed. Choose moves that reveal little, or render a middle frame.
  • Two changes at once. The camera moves and the lights come on. Split it into two clips.
  • Mismatched sizes. One frame is 2K and the other 1K, or one was cropped. The video tool may rescale or reject the pair.

Before you spend credits on video, compare the pair with ffmpeg. A difference blend shows anything that changed: a camera move lights up edges everywhere, but a sky that should match and does not shows as a bright wash. The blend needs both images at the same size, so check that first.

Terminalbash
# Both frames must report the same width and height
ffprobe -v error -show_entries stream=width,height -of csv=p=0 start.png
ffprobe -v error -show_entries stream=width,height -of csv=p=0 end.png

# Difference image: bright areas are what changed
ffmpeg -i start.png -i end.png -filter_complex "blend=all_mode=difference" diff.png

# One-second flick between the two frames, to watch on loop
ffmpeg -loop 1 -t 0.5 -i start.png -loop 1 -t 0.5 -i end.png \
  -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0,scale=1280:-2,format=yuv420p" -r 25 flick.mp4

Play flick.mp4 on loop. Your eye catches a moved window or a flipped shadow far faster in motion than side by side.

Hand the frames to a video model

With a matched pair, the video prompt only needs to describe the motion: the camera move sentence you wrote first, its speed, and an instruction that nothing else changes. Feed the start frame as the first frame and the end frame as the last frame. How each model takes start and end frames, and what clip lengths and resolutions it offers, is covered in the Kling 3.0 website video guide and the Seedance scroll video guide.

Keep a record of every keyframe: the prompt, the edit instruction, the model and the size. When a clip drifts, you can go back one step instead of starting over. It also lets you re-skin the scene later for a new brand by changing the subject while reusing the continuity block.

Every generated image carries a SynthID watermark, according to Google's docs. It does not change how you use the frames in a video pipeline.

Once you have the clip, the video to frames tool turns it into an image sequence for a canvas. The full workflow, from story to deploy, is in the guide to building a 3D website with Claude. To see where these keyframes end up, the Kestra template ships the exact Nano Banana keyframe prompts and Kling 3.0 clip prompts used to make its footage, and the rest of the Motion templates include the prompts behind every scene.

FAQ

Questions, answered.

The questions people ask most about this topic.

01What is Nano Banana?

Nano Banana is Google's name for its Gemini image generation and editing models. As of October 2026 the Gemini API lists Nano Banana 2.1, Nano Banana 2, Nano Banana 2 Lite, Nano Banana Pro and the original Nano Banana, with Nano Banana 2.1 recommended for new projects.

02Why make the end frame by editing the start frame?

A fresh prompt redesigns the subject, so the building or product changes between frames and the video model animates that change. Editing the start frame keeps the architecture, props and light, and changes only what you ask for, usually the camera position.

03What resolution should website keyframes be?

Iterate at 1K, then render the chosen pair at 2K or 4K. At 16:9, Nano Banana 2.1 gives 2752 × 1536 at 2K and 5504 × 3072 at 4K, which leaves headroom for a hero shown around 1920 pixels wide.

04Do I need separate keyframes for mobile?

Yes, for the best result. Cropping a 16:9 clip to 9:16 loses about two thirds of the frame. Compose a separate 9:16 start frame, edit it into its own end frame and render a portrait clip.

05Should keyframes contain text or logos?

Avoid it. Lettering is hard to keep identical across two frames and a video, and it tends to warp mid-clip. Set headlines and labels in HTML over the canvas instead.