The full-release-site mode of this skill generates chapter hero images through fal.ai. You bring your own API key. The skill does not ship with keys, credits, or a shared account — and you can skip fal.ai entirely (the page renders stunning CSS-only chapter visuals at $0).
| Question | Answer |
|---|---|
| Do I get a fal.ai key with the skill? | No. You create a free fal.ai account and add your own key. |
| Who pays for image generation? | You, directly to fal.ai (pay-as-you-go credits). |
| Is my key exposed in the browser? | No. Keys stay server-side via a Next.js proxy route. |
| Can I skip fal.ai and use my own images? | Yes. Replace manifest asset URLs with your own files in public/. |
- Node.js 18+ and npm
- A Next.js App Router project (or let the skill scaffold one for you)
- A fal.ai account — sign up at https://fal.ai
- About 5 minutes for first-time key setup
Estimated cost for a typical 8-chapter release page: ~$0.50–$2.00 in fal.ai credits (model-dependent). Check current pricing on fal.ai before generating large batches.
-
Go to https://fal.ai and sign up (email or GitHub).
-
Open Dashboard → API Keys (or Settings → Keys).
-
Click Create API Key.
-
Copy the key immediately — it looks like:
abc123def456:9876543210abcdef9876543210abcdefFormat is always
key_id:key_secret(two parts separated by a colon). -
Add billing/credits if fal.ai prompts you. Most accounts need a small credit balance before generation works.
Security: Treat this key like a password. Never commit it to Git, never paste it into client-side React components, and never share it in screenshots.
In your Next.js project root (same folder as package.json):
-
Copy the example env file:
cp .env.example .env.local
-
Open
.env.localand set your key:FAL_KEY="your_key_id:your_key_secret" FAL_IMAGE_MODEL="fal-ai/flux-2-pro" NEXT_PUBLIC_SITE_NAME="My Release Page"
NEVER share this file or screenshot its contents.
.env.localcontains yourFAL_KEY— a billable secret. If shared, anyone can generate images charged to your fal.ai account. Do not paste it into Slack, GitHub issues, AI chat windows, or support threads. If exposed, regenerate it immediately in the fal.ai dashboard. -
Confirm
.env.localis in.gitignore(Next.js adds this by default). Rungit check-ignore -v .env.localto verify before your first commit.
| Variable | Required? | What it does |
|---|---|---|
FAL_KEY |
Yes | Your fal.ai API key. Read only on the server (API routes). |
FAL_IMAGE_MODEL |
No | Image model id. Default: fal-ai/flux-2-pro (see tier table below). |
FAL_VIDEO_MODEL |
No | Optional video model for motion loops. Leave empty until you need video. |
NEXT_PUBLIC_SITE_NAME |
No | Site title shown in the browser tab. Safe to expose (no secret). |
Change FAL_IMAGE_MODEL to switch — no code change needed.
FLUX family — best photorealism, material texture, editorial depth
| Model ID | Cost/img | Speed | When to use |
|---|---|---|---|
fal-ai/flux-2-pro |
~$0.06 | ~4s | Default — SOTA editorial, portraits, materials |
fal-ai/flux-2-max |
~$0.08 | ~5s | Final hero renders, absolute max quality |
fal-ai/flux-2/turbo |
~$0.02 | ~2s | Draft rounds, fast iteration |
fal-ai/flux-pro/v1.1/ultra |
~$0.06 | ~10s | Prev-gen 4MP alternative |
fal-ai/flux-pro/v1.1 |
~$0.05 | ~4.5s | High-volume cost-sensitive batches |
fal-ai/flux/dev |
Avoid | Slow | NON-COMMERCIAL LICENSE — avoid; not for production |
Google "Nano Banana" family — best for text-in-image, conversational editing, complex scene direction
(Yes, "Nano Banana" is the real Google/fal.ai nickname — not a joke.)
| Model ID | Nickname | Cost/img | Speed | When to use |
|---|---|---|---|---|
fal-ai/gemini-3-pro-image-preview |
Nano Banana Pro | ~$0.15 | ~8s | Complex prompts, typography, web-search grounding |
fal-ai/gemini-3.1-flash-image-preview |
Nano Banana 2 | ~$0.07 | ~2s | Newest Flash — fast + accurate text in image |
fal-ai/gemini-2.5-flash-image |
Nano Banana | ~$0.04 | ~2s | Cheapest Google option |
fal-ai/imagen3 |
Imagen 3 | ~$0.04 | ~3s | Strong photorealism at low cost |
When to use Nano Banana instead of FLUX:
- Your chapter heroes need legible text baked into the image (labels, signs, editorial title cards)
- You're doing iterative editing ("darken the background, add fog")
- You need web-search-grounded imagery (real-world references)
FLUX.2 Pro wins for: editorial depth, skin/fabric/material texture, atmospheric still-life — the core use case of this skill.
Typical 8-chapter release page cost:
- FLUX.2 Pro default: 8 × $0.06 = ~$0.48
- Nano Banana 2 alternative: 8 × $0.07 = ~$0.56
- Mixed (6 FLUX + 2 Nano Banana for text-heavy chapters): ~$0.50
From your project root, run one command at a time (do not paste multi-line blocks with # comments — zsh will error):
npm installIf install fails with No matching version found for @studio-freight/lenis:
- The project has the wrong Lenis package. Replace dependencies with the bundled
templates/nextjs/package.json. - Use
lenis(^1.3.23), not@studio-freight/lenis.
Required packages (from bundled template):
npm install choreo-3d framer-motion gsap lenis @fal-ai/client @fal-ai/server-proxy next react react-domIf the skill copied templates from templates/nextjs/, use the bundled package.json instead of merging manually.
The bundled templates use a server-side proxy. Your browser never sees FAL_KEY.
Browser → /api/fal/proxy → fal.ai API
↑
FAL_KEY injected here (server only)
| File | Role |
|---|---|
app/api/fal/proxy/route.ts |
Proxies browser fal requests; key stays on server |
app/api/generate-edition-asset/route.ts |
Server route for chapter image generation |
lib/fal-client.ts |
Client config — sets proxyUrl: '/api/fal/proxy' only |
lib/fal-generate.ts |
Builds prompts and calls fal on the server |
lib/prompt-contract.ts |
Structured prompt schema per chapter |
Rule: If you see FAL_KEY or process.env.FAL_KEY inside a 'use client' component, that is a bug — move the call to an API route.
-
Start the dev server:
npm run dev
-
Test the generation route (replace values with your chapter):
curl -X POST http://localhost:3000/api/generate-edition-asset \ -H "Content-Type: application/json" \ -d '{ "chapterId": "prologue", "subject": "classical marble bust beside a glowing laptop", "productTruth": "AI release notes as editorial artifact", "historicalLayer": "renaissance", "modernLayer": "glass UI panel, monospace code overlay", "palette": ["#0a0a0a", "#f5f0e8", "#c9a227"], "camera": "medium", "outputRole": "hero" }'
-
A successful response includes an image
urlyou can open in the browser. -
If you get
{ "error": "Missing FAL_KEY" }, your.env.localis missing, misnamed, or the dev server was started before you added the key — restartnpm run dev.
Use the bundled batch script — it reads lib/editions-manifest.ts, calls fal once per chapter, and writes both the URL and the binary to public/generated/.
# Dry run: print prompts only, no fal calls, no credit cost
node scripts/generate-chapter-assets.mjs --dry-run
# Generate all chapters with the default model (FLUX.2 Pro)
node scripts/generate-chapter-assets.mjs
# Only regenerate two chapters
node scripts/generate-chapter-assets.mjs --only prologue,studio
# Use a different model just for this run
node scripts/generate-chapter-assets.mjs --model fal-ai/gemini-3-pro-image-previewOutput:
public/generated/
prologue.jpg
agentic.jpg
studio.jpg
…
manifest.json ← {chapterId → {url, local, seed, model}}
Set manifest.assets[id].local paths on your chapter background fields in editions-manifest.ts for production — Next/Image will serve them from the static folder.
curl -X POST http://localhost:3000/api/generate-edition-asset \
-H "Content-Type: application/json" \
-d '{"mode":"queue","chapterId":"prologue", ... }'
# → { "status":"queued", "requestId":"...", "modelId":"fal-ai/flux-2-pro" }The result is POSTed to /api/fal/webhook?chapter=prologue when fal finishes. Wire that route to your DB / KV to persist the URL — see app/api/fal/webhook/route.ts.
- Push code without
.env.local(never commit secrets). - In Vercel: Project → Settings → Environment Variables.
- Add
FAL_KEYwith your key value (Production + Preview). - Optionally add
FAL_IMAGE_MODELandNEXT_PUBLIC_SITE_NAME. - Redeploy.
The same server proxy pattern works on Vercel — no code changes needed.
| Symptom | Likely cause | Fix |
|---|---|---|
Missing FAL_KEY |
Env file not loaded | Create .env.local, set FAL_KEY, restart dev server |
401 / 403 from fal |
Invalid or expired key | Regenerate key in fal.ai dashboard |
402 / insufficient credits |
No fal.ai balance | Add credits in fal.ai billing |
| Images generate but page is blank | Unrelated to fal — scroll/sandbox issue | Apply the Mode A sandbox fallback rules in SKILL.md (§ MODE A) |
| Key visible in browser DevTools | Key used in client code | Move generation to /api/generate-edition-asset only |
You do not need fal.ai to use the scroll page:
- Add your own images to
public/assets/… - Set chapter
asset.srcineditions-manifest.tsto those paths - Skip
/api/generate-edition-assetentirely
The motion system (choreo-3d, parallax, pinning) works the same with static assets.
When using this skill in Claude or Cursor, try:
I'm new to fal.ai. Walk me through creating an API key, setting
.env.local, and generating one test hero image for my release page. Use the bundled templates — do not expose FAL_KEY in client code.
See also examples/PROMPTS.md for full build prompts once setup is complete.