---
name: keyframe-and-svg-assets
description: Route, generate, optimize, and verify visual production assets across Black Forest Labs FLUX 3 Image, Google Nano Banana 2.1, ByteDance Seedream 5.5, Recraft V4.1 (native SVG), and Ideogram 4.6 with Star-Branch naming, SVGO cleanup, WebP encoding, and exact dimension checks.
---

# Keyframe Still, Cutout & Vector SVG Asset Protocol

Whenever asked to generate or process visual assets for AI video keyframes, thumbnails, or web landing sections, enforce this deterministic routing and file-hygiene standard:

## 1. Strict Tool Routing by Asset Type
- **Editable Icons, Logos & Diagrams (`.svg`) -> `Recraft V4.1` (`$0.08/SVG`, `$0.035/raster`):** Pass explicit RGB/hex color arrays (`controls.colors`) and save raw XML `.svg`. Never trace raster PNGs when native SVG is needed. (Legacy `Recraft V3` remains available at `$0.08/SVG` only if a workflow specifically requires V3's curated `vector_illustration` preset.)
- **Transparent Foreground Cutouts & Layer Kits (`.png`) -> `ByteDance Seedream 5.5` (`$0.020–$0.035` BytePlus / `$0.03–$0.0405` fal.ai up to 2K; native RGBA PNGs + `/layerize` up to 99 layers), `Ideogram 4.6` (`background: "transparent"` up to 4K), or `OpenAI GPT-Image-2.6` (`background: "transparent"`, token-billed at `$30`/1M output tokens):** Use whenever subjects or products need true alpha transparency for Figma, Remotion, or Resolve overlays.
- **Character / Product Keyframe Editing (`.png`) -> `FLUX 3 Image` (`/v1/flux-3-image`, `$0.048/1K`, `$0.10/2K`, up to 10 free reference images; `/v1/flux-3-image-klein` `$0.009/1K`) or `Nano Banana 2.1` (`$0.0336` at 1K):** Always branch Shot 01..N directly off `level0_anchor.png` (Depth 1)—never chain edit-of-edit.
- **High-Contrast Typographic Covers (`.png`) -> `Ideogram 4.6` (`/v2/image/generate/ideogram-4-6`, `$0.008` Very Low 2K draft -> `$0.06` Medium 2K -> `$0.12` Medium 4K / `$0.20` High 4K, plus masked `/v2/image/precise-edit/ideogram-4-6`):** Always reserve bottom-right `220x80px` empty on `16:9` YouTube covers.

## 2. Video Keyframe Dimension Hygiene
- Save video opening frames as **lossless PNG** (`keyframes/shot_01_16x9.png`)—never JPEG-compress opening frames before Image-to-Video.
- Match target aspect ratio upfront (`16:9` vs `9:16`), and ensure local ComfyUI keyframes divide cleanly by `32` (`1344x768` or `768x1344`) so Wan 2.2 and LTX-2 never crash on tensor shape errors.

## 3. Web Asset Optimization & Zero-CLS Contract
- Convert raster web assets to `.webp` via `sharp` (`quality: 90–92`) and optimize `.svg` outputs cleanly (strip redundant editor metadata, preserve explicit `viewBox`).
- Whenever embedding any asset in HTML/Astro/React, read exact pixel dimensions and write explicit numeric `width`, `height`, and descriptive `alt` text (`CLS = 0`).

## 4. Mandatory Visual Inspection Step
Never commit or feed a generated keyframe or SVG blindly into a paid video render. Open/inspect every generated file first to verify exact text spelling, clean edges, and lighting direction match.
