Generate a 4K storyboard image from a commercial script using fal.ai Nano Banana 2. Use when the user wants to create, regenerate, or update the storyboard for a commercial. Covers prompt writing, API calls, and image output.
Generate a single 4K storyboard image from a commercial script. The image is a 2x3 grid (2 columns, 3 rows) of cinematic panels — one per scene.
<commercial>/venv/fal-client, python-dotenv, and requests must be installed in the venv.env file must contain a valid FAL_KEYIf any prerequisite is missing, set it up before proceeding.
<commercial>/script.md to understand scenes and visual direction<commercial>/storyboard/prompt.txt with a single natural-language prompt describing all 6 panels in a 2x3 grid
<commercial>/storyboard/generate.py which:
prompt.txtfal-ai/nano-banana-2 with resolution: 4K, aspect_ratio: 1:1, thinking_level: high<commercial>/storyboard/storyboard.pngfal_client.subscribe("fal-ai/nano-banana-2", arguments={
"prompt": prompt,
"num_images": 1,
"aspect_ratio": "1:1",
"resolution": "4K",
"output_format": "png",
"safety_tolerance": "5",
"thinking_level": "high",
})
<commercial>/
├── script.md # Source script with scenes
├── .env # API keys
├── storyboard/
│ ├── prompt.txt # Plain-text prompt (edit this to iterate)
│ ├── generate.py # Generation script
│ └── storyboard.png # Output image
To regenerate with changes: update prompt.txt, then re-run generate.py. The script makes a single API call each run.