---
reliability: 3.8 # computed: 5.0 − 0.3 (8-keyframe image batch) − 0.6 (8-clip i2v batch) − 0.3 (gpt-image title card); beat map + ffmpeg finishing −0.0; TTS optional (−0.2 if used); 5 stages, no overflow; no E2E showcase bonus
---

# 15-second anime opening — agent playbook

> Paste this whole file (with the BRIEF filled in) into Claude cowork, chat, or Code. The agent walks through it with you and stops for your approval at every step that matters. **This is the most-watched 15 seconds in anime culture** — the title sequence that fans loop, GIF, and theorize about. The playbook builds one in 25 minutes with a character that holds across every cut and edits that land on the beat.

## What you'll get

A title-sequence-quality opening built around your protagonist and your track:

- **Beat-locked timing map** — every cut aligned to a downbeat or accent in your music. No "feels close enough" approximations.
- **Character-anchored sequence** — your protagonist holds across all 8 keyframes via LoRA or kontext-edit reference. The face fans recognize when they hear the song.
- **8 character-moment keyframes** — silhouette intro, eye reveal, action pose, environment shot, ally cameo, antagonist tease, emotional beat, hero-pose finale. The grammar of every great anime OP.
- **8 animated clips (~1.5s each)** — keyframes brought into motion via `seedance-i2v` (resolution `"auto"`), each cut sized to land on a beat.
- **Typography title card** — your `series_title` rendered with the gpt-image typography model and episode-count subtitle ("Episodes 1–{N}"), composited as a final hold.
- **Voiced cold-open line** — optional 4-second voiceover from your attached voice library, delivered over the title card.
- **Beat-aligned final cut** — `ffmpeg-concat` with the cuts landing on the rhythm, music + voice muxed over the full cut via `ffmpeg-mux` (`audio_fill:"loop"` so the bed never dies early), exported in 16:9 (default) or 9:16 vertical for socials.
- **Series-bible-ready archive** — every keyframe and clip URL persisted to the project, ready to re-cut as the show progresses.

**Time**: ~25 minutes wall clock. **Your attention**: about 6 minutes across 7 approvals. **Cost**: $2.20–$4.00 end to end.

## Tell the agent about the opening

```yaml
series_title:         # e.g. "Salt & Iron" — appears on the title card
protagonist_name:     # e.g. Mika — used in voiceover + bible references
protagonist_lora_id:  # OPTIONAL — if set, character anchor uses LoRA. Leave blank to train one (adds 10-20 min) or use kontext-edit reference instead
music_url:            # the track — Suno URL, your own .mp3 / .wav, or anything ffmpeg can read
palette_hex:          # 3-4 hex colors space-separated, e.g. #1A1B26 #C8A165 #E5A4CB #6B2E2B
mood:                 # heroic · melancholic · comedic · ominous · bittersweet
aspect_ratio:         # 16:9 (default) or 9:16 for TikTok-cut release
episode_count_hint:   # for the subtitle, e.g. "12" → "Episodes 1–12" · or "Pilot" · or "Season 2"
voiceover_line:       # OPTIONAL — 4-second cold-open line. Blank = no VO
voice_id:             # OPTIONAL — voice from your library (voice_list to see options)
opening_slug:         # kebab-case, used in filenames, e.g. salt-and-iron-op
```

## How the agent should run this (interaction contract)

1. **CONFIRM (one turn, no render):** restate in 1 line ("15s OP for {series_title}, {mood}, protagonist via {LoRA|reference}") + the 3 choices that matter: **anchor source** (reference is the default — LoRA only for a real multi-episode series), **mood**, **16:9 vs 9:16**. Quote ~$2.20–$4 / ~25 min. One question max (anchor source if no LoRA and no refs supplied); otherwise assume and start.
2. **PREVIEW CHECKPOINT = the 8-keyframe sheet** (Step 3, ~$1.20). Show all 8 + the consistency-critic verdict BEFORE animation fires: "reply 'go' to animate (~$1.20, ~8 min) or redo [#]". The beat map (Step 2) is a free earlier checkpoint — one message.
3. **NARRATE:** during the i2v batch post "clip 5/8 done, ~2 min left" per clip (async `job_id` + `get_create_media`, waves of ≤4–5). Title card + mux are <2 min, one line each. Never silent >2 min.
4. **FAIL GRACEFULLY:** `seedance-i2v` hang → `ltx-q-i2v` `resolution:"auto"` → `cosmos-3-i2v` → Ken-Burns zoompan on that keyframe. Keyframe 422 → soften prompt → `gemini-image`. gpt-image title card fail/slow → `hyperframes-caption` on a palette backdrop (80% as good, stated honestly). Max 2 retries per clip; a 7-clip OP with one Ken-Burns slot still ships on the beat map.
5. **DELIVER:** the OP + 1 honest line ("clips 2 and 6 show mild style drift from the keyframes — normal for current i2v") + ONE next step ("run series-bible-pilot with the same anchor?").

Gate discipline: 4 stops (brief, beat map, keyframes, final). Title card + VO are reviewed together in the final gate; Steps 4–6 STOPs are advisory unless something failed.

## Quality controls (new — auto-applied)


This playbook leverages the closed quality loop. The agent applies these by default; you don't have to ask:

- **Cost upfront.** Before any multi-step batch fires, the agent calls `submit_plan` with `confirm:false` and shows you the proposed steps + total cost. Nothing runs until you approve.
- **Auto-retry on weak shots.** The server default is `quality_threshold: 0.7`. For character-anchored keyframes the playbook step tells the agent to pass `quality_threshold: 0.85` so a low-confidence first try gets one auto-retry before you see it.
- **Critic verdict on the result.** When a multi-shot step finishes, the agent reads the `critique` field on the response (verdict: ship / iterate, plus issues / missing items) and surfaces it for your review. After the 8-keyframe batch, `critique_shot` runs across the set with `focus: "consistency"` to catch face drift before animation fires.
- **One-click recovery.** If a step fails, `get_plan` returns a `recovery` hint pointing at `replan({plan_id})` — the agent classifies the failure and proposes a recovery plan you can approve.
- **End-of-project scorecard.** The final wrap-up calls `get_scorecard({project_id})` with succeeded count, mean quality score, critic verdict, total cost, and wall time.

You can override any of these per step: pass `quality_gate: false` on cost-sensitive tries, `quality_threshold: 0.6` for stylized/abstract work where strict adherence isn't the point, or `submit_plan({plan_id, confirm:true})` to skip the cost-preview pause when you trust the chain.

## How this works

Anime openings are an editing discipline first and an animation art second. The cuts have to hit. The face has to hold. The title card has to read. Every existing AI video tool fails one of those three — either the character drifts across shots, or the cuts land on dead beats, or the typography is hallucinated nonsense. This playbook nails all three because beat-extraction, LoRA character lock, and gpt-image typography are first-class primitives on the network.

Seven gates. The first two — beat map and character lock — are the foundation; once they're approved the rest of the pipeline is mechanical.

## The steps

### Step 0 — Confirm the brief

The agent reads back the BRIEF, previews `music_url` (waveform if available), and confirms whether a LoRA is set or a kontext-edit reference workflow is needed.

**STOP**: "Brief looks right? (approve / edit [field] [new value])"

### Step 1 — Character anchor lock (~30s if LoRA preset, ~12 min if training)

If `protagonist_lora_id` is set: `apply_lora({lora_id})` and confirm the load. Done in 5 seconds.

If not: **default to kontext-edit reference** — 8 keyframes is within reference-anchor range and it adds zero time and zero failure modes. Only offer LoRA training (OPTIONAL, +10–20 min, +1 failure mode) when the user is shipping a real multi-episode series; state the default and keep moving rather than blocking on the question.

> **For the agent**: if training, run `submit_lora_train` with the 4-8 reference images the user provides and poll `get_lora_train` every 30s. If reference-only, pick the strongest reference image from the brief as `quality_anchor_url` for every subsequent keyframe.

**STOP**: "Character anchor locked. Proceed to beat extraction? (approve / change anchor)"

### Step 2 — Beat-extract the music (~15s, ~$0.03)

**Honesty note: no audio-beat-detection cap is live on production.** The agent builds the timing map from ffprobe duration + BPM math (ask the user for BPM — Suno displays it — or estimate from genre) + LLM structure analysis. Good to ~100–200ms, which reads as on-beat at OP pacing. For a 15-second window the agent picks the 8 strongest cut points — typically downbeats spaced ~1.5s apart with one held longer for the title card.

> **For the agent**: surface the timing map as a list ("cut at 0.0s, 1.6s, 3.1s, 4.4s, 5.8s, 7.4s, 9.0s, 11.0s — title card holds 11.0–15.0") so the user sees the rhythm they're committing to. If the track has a clear pre-chorus or drop, bias one cut to land there.

**STOP**: "Beat map shown. Approve the 8 cut points, or shift one? (approve / shift [#] [direction])"

### Step 3 — Generate 8 character-moment keyframes (~6 min, ~$1.20)

The agent fans out 8 parallel `create_media` calls. Each keyframe pairs the character anchor (LoRA or reference) with a moment-specific prompt drawn from the anime-OP grammar:

1. **Silhouette intro** — back-lit, character facing away, signature pose
2. **Eye reveal** — close-up, single eye in frame, dramatic lighting
3. **Action burst** — mid-motion, signature move from the series
4. **Environment shot** — character small in a wide world frame, atmosphere heavy
5. **Ally cameo** — protagonist + one supporting character if your brief allows, otherwise solo emotional close
6. **Antagonist tease** — shadowed, partial reveal of the rival or threat
7. **Emotional beat** — quiet, character-internal moment that grounds the sequence
8. **Hero-pose finale** — full body, confident, ready for the title

Palette anchored from `palette_hex`, mood inflected by `mood` ("heroic" → upward camera, "melancholic" → soft side-light, "comedic" → punchy color), aspect ratio from brief.

> **For the agent**: use `flux-dev` with LoRA if `protagonist_lora_id` is set; otherwise `kontext-edit` with the reference image as `image_url`. Pass `quality_threshold: 0.85` on every keyframe and the anchor as `quality_anchor_url`. After all 8 land, call `critique_shot` with `focus: "consistency"` across the batch to flag face drift before animation fires (animation amplifies drift).

**STOP**: "8 keyframes + consistency critic shown. Approve all, or redo specific? (approve / redo [#] [direction])"

### Step 4 — Animate each keyframe to ~1.5s clips (~8 min, ~$1.20)

The agent calls `submit_plan` for 8 parallel `create_media({ action: "animate", model_override: "seedance-i2v", source_url: <keyframe_url>, resolution: "auto", duration: <beat_slot_seconds> })` jobs. Each clip is sized to its beat slot from Step 2 — most ~1.5s, the title-card holder ~4s. Motion prompts match the keyframe ("slow back-of-head turn" for silhouette intro, "eye widen, pull focus" for eye reveal, "explosive forward motion" for action burst, "atmospheric drift, character still" for environment).

> **For the agent**: always pass `resolution: "auto"` (fixed resolutions 422 on the ltx tier). Pass `quality_threshold: 0.8` per clip — animation drift is harder to retry than image drift, so lower threshold is fine and saves cost. If `aspect_ratio` is 9:16, request portrait i2v output. For a more fluid camera, `grok-imagine-video` is the premium alternative. Surface total cost in the `submit_plan` preview before firing.

**STOP**: "8 animated clips shown. Approve all, or redo a clip? (approve / redo [#] [direction])"

### Step 5 — Typography title card (~30s, ~$0.10)

`create_media` with `gpt-image` (model_override) — the only model on the network that gets typography right. Prompt: `series_title` rendered in a treatment matched to `mood` (heroic → bold serifs with metallic glint; melancholic → thin geometric with halftone shadow; comedic → bouncy display font with palette accents). Subtitle: "Episodes 1–{episode_count_hint}" in a smaller weight underneath. Composited onto a backdrop pulled from `palette_hex`.

Optional: `hyperframes-caption` overlay applied to the held title-card video clip from Step 4 so the title fades in as the held shot plays underneath.

> **For the agent**: gpt-image is non-negotiable here. flux-dev / recraft will hallucinate the letters. If the user objects to gpt-image cost, fall back to `hyperframes-caption` on a plain palette backdrop (saves $0.10, looks 80% as good).

**STOP**: "Title card shown. Approve, or refine? (approve / refine [direction])"

### Step 6 — Optional cold-open voiceover (~10s, ~$0.05)

If `voiceover_line` is set with a `voice_id`: the agent calls `voice_list` to resolve the voice, then `create_media({ action: "generate", model_override: "chatterbox-tts", prompt: voiceover_line, audio_url: <voice_sample_url> })` — the `audio_url` is the clone reference. 4-second delivery, calibrated to land in the held title-card window.

If `voice_id` is blank but `voiceover_line` is set: use `gemini-tts` with a tone keyword from `mood` (e.g. "heroic male, serious cadence") and no `audio_url`.

If both are blank: skip this step.

> **For the agent**: voice attachment is via `voice_attach({project_id, voice_id})` if the user wants this voice locked to the project for the rest of the series. Surface that suggestion at the end of this step.

**STOP**: "Voiceover approved? (approve / refine [direction] / skip)"

### Step 7 — Beat-aligned concat + mux + export (~2 min, ~$0.10)

The pipeline fires as one approved plan:

1. `create_media({ model_override: "ffmpeg-concat", ... })` on the 8 clips with the cut points from Step 2 — `transition: "cut"` (anime OPs almost never crossfade; cuts are the language)
2. `create_media({ model_override: "ffmpeg-mux", source_url: <concat_url>, audio_url: <music_url>, audio_fill: "loop" })` — the music track over the full cut. If a voiceover exists from Step 6, first mux it onto the title-card window, then mux the music bed under everything (`audio_fill: "loop"` guarantees coverage edge to edge).
3. `create_media({ model_override: "ffmpeg-export", source_url: <muxed_url>, ... })` to MP4 at `aspect_ratio` from brief, 1080p, 30fps

If the brief requested both 16:9 and 9:16, two parallel `ffmpeg-export` calls (scale+crop for the 9:16) produce both versions.

> **For the agent**: `ffmpeg-concat` with 8+ clips needs the direct-SDK fallback pattern (MCP envelope drops array params over a certain length). Surface a final cost-preview via `submit_plan` before firing the export; the user has one last chance to bail.

### Final step — scorecard wrap-up

Call `get_scorecard({project_id: ...})` — paste output to your channel.

```
Scorecard for cjob_xxx
N/N keyframes shipped — critic: SHIP
Title: {series_title} OP
Steps: N/N succeeded (100%)
Quality: mean X.XX · M/N passed · K retries
Critic verdict: SHIP — character face consistency 0.XX across all keyframes
Cost: $X.XX actual (est $Y.YY) · Ts wall time
Viewer: <project URL>
```

## When you're done

The agent prints:

```
✅ Opening (16:9): <URL>
✅ Opening (9:16) [if requested]: <URL>
✅ 8 character keyframes: <URL × 8>
✅ 8 animated clips: <URL × 8>
✅ Title card: <URL>
✅ Beat timing map: <project JSON URL>
✅ Project viewer: <project URL>

Total spent: $X.XX
Total wall-clock: MM:SS
Critic verdict: SHIP — character face consistency 0.XX across all keyframes
```

## What can disappoint (cap ceilings)

- **i2v drifts off anime style.** seedance/ltx pull 2D anime keyframes toward photoreal/3D over the clip; at ~1.5s per cut the drift is mostly invisible — that's why the clips are short. Don't extend clips past ~3s expecting the keyframe's line work to hold.
- **Beat alignment is estimated** (no audio-beat cap live) — within ~100–200ms, fine for an OP, not frame-perfect.
- **Title-card typography:** gpt-image is the only model that gets letters mostly right; still proofread every glyph. flux/recraft will garble the title — never route it there.
- **fal video latency:** plan for 1–2 hung clips per 8; the fallback chain is normal operation.

## What to do next

The keyframes you just made are not throwaway — they're the visual lexicon of your series. Save them to the project, and the next time you cut a recap reel, a teaser, or a season-2 OP, the same anchor LoRA + the same palette + the same mood keywords produce a sequence that recognizably belongs to the same show. That's the cohesion fans pick up on without being able to name.

If the OP works, run `series-bible-pilot.md` next — it builds the show bible and pilot key frames anchored to the same character. By the time you pitch the series, you have an OP, a pilot frame set, and a character bible that all share the same anchor. That's the package a network actually responds to.

If you're posting this to socials, the 9:16 cut hits TikTok and Reels natively. Anime-OP edits are one of the highest-retention formats on those platforms — a 15-second cut with a recognizable face, hard cuts on the beat, and a title hold reliably out-performs longer-form content. Run a few cuts of the same OP with different palettes; A/B which beat pattern lands.
