# AI Music Video Engine: Setup and First Video (Claude Code edition) **Version:** 1.0, 2026-10-29. **Source:** Tableland Partners' AI Video Content Engine (guide v7.1), the system that produced "Trust Me (Mon ChΓ©ri)" and "Go Touch Something Real". **Who this is for:** an AI Essentials Roundtable member setting the system up in their own accounts, run from **Claude Code** on a Mac. **What you get:** a vertical 9:16, 1080p music video in your Google Drive. It has an original song, a consistent character who lip-syncs the vocals, story cutaways, animated on-screen text, and an end card. You give Claude the idea and approve 4 checkpoints. Claude does the rest. --- ## 0. How to use this document **For the human (you):** read sections 1–3 before you start. The setup takes about 2 hours, once. Steps marked **πŸ‘€ YOU** need your logins, payment details or API keys, so only you can do them. Steps marked **πŸ€– CLAUDE** are done by Claude Code. **For Claude Code (the operator):** this file is your only source of truth. Nobody from Tableland is available to answer questions. 1. Save this file as `ENGINE_GUIDE.md` in the project folder (section 4.3), and keep it updated when something changes. 2. Work through the sections in this order: **4 β†’ 5 β†’ 6.1–6.2 (human steps) β†’ 7 (connect Make) β†’ the πŸ€– part of 6.2 β†’ 6.3–6.7 β†’ 8 β†’ 9**. Don't skip a verification step. Each one exists because that step failed once before. 3. **Never ask the user to paste an API key into the chat, and never write a key into any file, request JSON, log or this guide.** Keys are typed by the human straight into Make (section 6.5). 4. **Never call OmniaKey, Gemini or Hedra directly**, even though Claude Code could reach them. Every paid API call goes through the Make scenarios, so there's one place to see costs, logs and keys. 5. Stop at every β›” GATE and wait for the user's explicit approval. **No video spend (Omni or Hedra) before Gate 3 is approved.** 6. When a step fails, check section 11 (Troubleshooting) before inventing a fix. Then add what you learned to section 11. ### 0.1 The system on one page ``` YOU: idea ──► CLAUDE CODE (your Mac): research, lyrics, timing, scene plan, prompts, QA, assembly (ffmpeg) β”‚ writes request files into the synced Drive folder and calls Make through the Make MCP server β–Ό MAKE.COM (5 scenarios): the only thing that calls the paid APIs 1 Song ........ OmniaKey (Suno v4.5) ──► Song.mp3 2 Stills ...... Gemini image model + your character's reference image ──► opening and cutaway stills 3 Clips Omni .. Gemini Omni video ──► story cutaway clips 4 Hedra Submit / 5 Hedra Collect .. Hedra Character-3 lip-sync ──► singing clips β–Ό GOOGLE DRIVE folder "Claude AI Video Videos" (synced to your Mac by Google Drive for desktop) β–Ό CLAUDE CODE: assemble.py (cuts every scene to the song clock) β–Ί kinetic.py (animated text) β–Ί final MP4 ``` **Production mode used in this guide: Mode C, "Intercut".** Each scene opens with the character singing (Hedra lip-sync), cuts to a story cutaway from a different camera angle (Omni), and goes back to the singing. This is the mode that made both reference videos. Mode A (Hedra only) is cheaper. Mode B (Omni only) has no lip-sync. --- ## 1. Plans and accounts (πŸ‘€ YOU) | # | Service | What it does here | Plan to buy | Why this plan | Cost (Oct 2026) | |---|---|---|---|---|---| | 1 | **Claude** (claude.ai) | Claude Code is the operator | **Pro** works. **Max** is recommended for full videos | A full video is a long session with many tool calls. Pro can hit usage limits partway through | Pro $20/mo, Max from $100/mo | | 2 | **Make.com** | Runs every API call | **Core** (or higher). **Not Free** | Free allows 2 active scenarios, 5-min runs and 5 MB files, and it pauses when you hit its limits. The Song run alone takes up to 5 min, and clips are bigger than 5 MB | Core $10.59/mo ($9/mo billed yearly), 10,000 credits | | 3 | **Google account + Google Drive** | All files, shared between Make and your Mac | Free 15 GB is enough for a first video. Google One 100 GB for regular use | One video's working files (clips, stills, drafts) come to about 1–3 GB | Free, or about $2/mo | | 4 | **Google AI Studio (Gemini API)** | Stills (image model) and story clips (Gemini Omni video) | **Paid tier** (turn billing on) | The image and video models need a billed key. Free-tier keys get refused or rate-limited | Pay as you go: about $0.15–0.25 per 2K still, about $1 per Omni clip | | 5 | **OmniaKey** (omniakey.com) | Song generation through Suno v4.5 | Pay-as-you-go credits | Gives API access to Suno. Suno has no public API | A $10–20 top-up covers several songs | | 6 | **Hedra** (hedra.com) | Lip-sync video (Character-3) | A plan **that includes API access** (Starter or higher). Then buy credits | Free plans have no API key | Our 1080p run: about $13 for 32 clips (a 3:22 song) | **Total cost per 3–4 min video, Mode C:** about **$30–45** (Gemini stills + Omni about $15–25, Hedra about $12–15, song under $2, Make credits covered by Core). **A 60–90 s first test** (section 9 recommends this) costs about **$10–15**. **Computer:** a Mac (macOS 13 or newer) with about 20 GB free. Section 5.3 reads Drive file IDs with a macOS-only method. On Windows, see section 11, row "No Drive ID on Windows". --- ## 2. Get your API keys (πŸ‘€ YOU; do these as you reach section 6.5) Store each key in a password manager. **Never paste a key into Claude, a chat, a file in the project folder, or a Drive file.** You'll paste each key exactly once, into Make. | Key | Where to get it | What it looks like | Where it goes (section 6.5) | |---|---|---|---| | **Gemini API key** | aistudio.google.com β†’ **Get API key** β†’ **Create API key** (in a Google Cloud project). Then **Set up billing** on that project | starts `AIza…` | Make β†’ Connections β†’ **Gemini AI** connection | | **OmniaKey key** | omniakey.com β†’ sign up β†’ Dashboard β†’ **Billing** (add $10–20) β†’ **API Keys** β†’ **Create** | starts `sk-…` | Make β†’ Song scenario β†’ module **20** (Set variable `omnia_auth`) as `Bearer ` | | **Hedra key** | hedra.com β†’ sign in β†’ choose a plan with API access β†’ profile menu β†’ **API** (API Profile page) β†’ **Create API key**. Buy credits on the same page | a long key string | Make β†’ Hedra Submit module **1** and Hedra Collect module **1** (Set variable `hedra_auth`) as `Bearer ` | | **Google Drive** | No key. You sign in with OAuth inside Make | n/a | Make β†’ Connections β†’ **Google Drive** | | **Make (for Claude Code)** | No key. OAuth when you run `/mcp` (section 7) | n/a | Claude Code MCP | --- ## 3. What Claude Code needs on your Mac (overview) - **Google Drive for desktop**, signed in to the same Google account Make uses. Claude reads and writes files in the synced folder, and Make sees them in Drive. - **Homebrew, ffmpeg (with libass), Python 3.10+** and a few Python packages: numpy, pillow, librosa, opencv-python-headless, audio-separator. - **Three fonts:** Anton, Oswald Bold, Pacifico. - **The kit folder:** this guide, the 9 scripts in Appendix B, and the 5 blueprints in Appendix A. - **The Make MCP server** connected to Claude Code. --- ## 4. Computer setup (πŸ€– CLAUDE runs the commands; πŸ‘€ YOU approve installs) ### 4.1 Install tools **πŸ‘€ YOU, in Terminal** (the Homebrew installer asks for your Mac password and a RETURN key press, so Claude Code can't run it): ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # skip if `brew -v` works echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile && eval "$(/opt/homebrew/bin/brew shellenv)" # Apple Silicon; on Intel Macs brew is already in /usr/local/bin ``` **πŸ€– CLAUDE** (or you): ```bash brew install ffmpeg python@3.12 node python3.12 -m venv ~/vera-venv ~/vera-venv/bin/pip install --upgrade pip ~/vera-venv/bin/pip install numpy pillow librosa "opencv-python-headless<5" "audio-separator[cpu]" audioread echo 'export PATH="$HOME/vera-venv/bin:$PATH"' >> ~/.zshrc ``` The venv is the only Python this engine uses: Homebrew's Python refuses global `pip install`, and macOS's own Python is too old. Because `~/vera-venv/bin` is first on PATH, `python3` and `audio-separator` in every later command mean the venv versions. **Open a new Terminal window (and restart `claude`) after this step** so the PATH change applies. ### 4.2 Verify (in a new shell; all must pass) ```bash which python3 # must print /Users//vera-venv/bin/python3 ffmpeg -hide_banner -filters | grep -E " ass |subtitles" # must list "ass" (libass). If missing: brew reinstall ffmpeg python3 -c "import numpy, PIL, librosa, cv2; print('py ok', cv2.__version__); print(hasattr(cv2,'CascadeClassifier'))" # must print True audio-separator --version ``` ### 4.3 Project folder (the kit) ```bash mkdir -p ~/VeraEngine/{scripts/fonts,blueprints,runs,models} ``` - Save this guide as `~/VeraEngine/ENGINE_GUIDE.md`. - **πŸ€– CLAUDE:** write every file in **Appendix B** to `~/VeraEngine/scripts/` exactly as printed (copy the code blocks byte for byte, with no "improvements"). Write every blueprint in **Appendix A** to `~/VeraEngine/blueprints/`. - Create `~/VeraEngine/CLAUDE.md` with the text in section 7.3, so every Claude Code session in this folder loads the operator rules. ### 4.4 Fonts ```bash cd /tmp && npm pack @expo-google-fonts/anton @expo-google-fonts/oswald @expo-google-fonts/pacifico for f in expo-google-fonts-*.tgz; do tar -xzf "$f"; done find package* -name "Anton_400Regular.ttf" -o -name "Oswald_700Bold.ttf" -o -name "Pacifico_400Regular.ttf" | xargs -I{} cp {} ~/VeraEngine/scripts/fonts/ ls ~/VeraEngine/scripts/fonts # must show exactly: Anton_400Regular.ttf Oswald_700Bold.ttf Pacifico_400Regular.ttf ``` If `npm pack` unpacks into the same `package/` folder each time, unpack them one at a time (`tar -xzf && find package -name "*.ttf" …` per font). kinetic.py looks for these fonts by family name ("Anton", "Oswald", "Pacifico") in `scripts/fonts/`. --- ## 5. Google Drive (πŸ‘€ YOU, then πŸ€– CLAUDE verifies) ### 5.1 Folders In **My Drive** (top level, not inside a shared drive or a shortcut), create: ``` Claude AI Video Videos/ ← every output: songs, stills, clips, finals Ready/ ← song request files (the Song scenario watches this folder) Done/ ← run logs (song logs, Hedra job files, Hedra cost logs) ``` **Keep this folder for this engine only.** Other tools or agents writing here will confuse the scenarios. Write down 3 folder IDs. Open each folder in drive.google.com: the ID is the last part of the URL, `https://drive.google.com/drive/folders/`. - `VIDEOS_FOLDER_ID` = Claude AI Video Videos - `READY_FOLDER_ID` = Ready - `DONE_FOLDER_ID` = Done ### 5.2 Google Drive for desktop 1. Install it from google.com/drive/download and sign in with the **same Google account** you'll connect to Make. 2. Settings (gear) β†’ Preferences β†’ Google Drive: either choice works. **Mirror files** is the more reliable one. With **Stream files**, right-click `Claude AI Video Videos` in Finder β†’ **Available offline**, so files aren't cloud-only when Claude reads them. 3. The folder appears at `~/Library/CloudStorage/GoogleDrive-/My Drive/Claude AI Video Videos`. **πŸ€– CLAUDE:** find the exact name and make `$VV` a permanent shell variable (every later command uses it): ```bash ls ~/Library/CloudStorage # shows e.g. GoogleDrive-you@gmail.com echo 'export VV="$HOME/Library/CloudStorage/GoogleDrive-/My Drive/Claude AI Video Videos"' >> ~/.zshrc zsh -ic 'ls "$VV"' # must list Ready and Done ``` Also write the path into CLAUDE.md (section 7.3). If a command ever shows paths like `/Ready/...`, `$VV` is empty in that shell: run `source ~/.zshrc` or use the full path. 4. **Give Claude Code access:** macOS System Settings β†’ Privacy & Security β†’ **Full Disk Access** (or Files and Folders) β†’ enable your terminal app (Terminal, iTerm or the Claude desktop app). Without this, reads in `~/Library/CloudStorage` fail with "Operation not permitted". ### 5.3 Drive file IDs (how Claude finds a file's ID) Make addresses files by Drive ID. Drive for desktop stores each file's ID as a macOS extended attribute once the upload finishes. `scripts/drive_id.py` reads it: ```bash python3 ~/VeraEngine/scripts/drive_id.py "$VV/some file.jpg" # prints: some file.jpg ``` **Verify now:** put any small file in `$VV`, wait 10–20 s, and run the command. Then compare the ID with the file's link in drive.google.com (Share β†’ Copy link: `/file/d//`). They must match. A brand-new file shows `MISSING` until it has uploaded; the script waits up to 120 s. ### 5.4 Your character's hero reference image The whole look depends on **one reference image** of your character. Every still is generated with it attached. 1. Create it in the Gemini app or AI Studio (image model). Use the lock text in section 10.1 with your own details, or bring your own artwork or photo **that you have the rights to**. Make it a clear, front-facing, chest-up portrait, 9:16, in even light. 2. Save it as `Hero.jpg` in `Claude AI Video Videos`. 3. Get its ID with drive_id.py. That's `HERO_IMAGE_ID`. 4. Optional (style library): add 3–10 more looks of the same character (different hair accent color, accessory or art style) and record their IDs. Each video can use a different one as `ref_id`. --- ## 6. Make.com (πŸ‘€ YOU for account, connections and keys; πŸ€– CLAUDE builds the scenarios) **Order:** do 6.1 and 6.2 (πŸ‘€), then section 7 (connect Claude Code to Make), then come back for the πŸ€– step of 6.2 and 6.3–6.7. ### 6.1 Account make.com β†’ sign up β†’ Organization β†’ **Subscription β†’ Core** (or higher). Note your **zone** from the browser URL (e.g. `us2.make.com`) and your **team** (Team β†’ the ID is in the URL). ### 6.2 Connections (πŸ‘€ YOU; they need your logins) In Make β†’ left menu **Connections** β†’ **Add**: 1. **Google Drive** (app "Google Drive") β†’ sign in with the Drive account from section 5 β†’ allow all requested scopes. Name it `AI Video Drive`. 2. **Gemini AI** (app "Gemini AI", by Make) β†’ paste your **Gemini API key** β†’ Save. Name it `AI Video Gemini`. **πŸ€– CLAUDE:** once Make MCP is connected (section 7), run `connections_list` for the team and record both connection IDs (numbers): `GDRIVE_CONN_ID` and `GEMINI_CONN_ID`. ### 6.3 Build the 5 scenarios (πŸ€– CLAUDE, through Make MCP) Appendix A holds 5 blueprint files. Each one has `blueprint` (name, flow, metadata), `scheduling` and, for 4 of them, `interface`. **Step 1: placeholders.** Before creating anything, replace these values in a copy of each blueprint: | Placeholder in the blueprint | Replace with | |---|---| | `111111` (every `"__IMTCONN__": 111111`) | `GDRIVE_CONN_ID` (number) | | `222222` (every `"__IMTCONN__": 222222`) | `GEMINI_CONN_ID` (number) | | the tokens `VIDEOS_FOLDER_ID`, `READY_FOLDER_ID`, `DONE_FOLDER_ID` | each token, **wherever it appears**, with that folder's real ID. Keep the slashes, so `/VIDEOS_FOLDER_ID/READY_FOLDER_ID` becomes `//` | | `HERO_IMAGE_ID` | your hero image's Drive ID | | `PASTE_OMNIAKEY_KEY_HERE`, `PASTE_HEDRA_KEY_HERE` | **leave them as they are.** The human replaces them in section 6.5 | The folder value is a **path of folder IDs from the top of My Drive**. That's why section 5.1 puts the folder at the top of My Drive. If your folder is nested, the path has to list every parent ID in order, e.g. `//`. **Step 2: create.** For each file, in order 1 β†’ 5: 1. `scenarios_create` with `teamId`, `blueprint` = the file's `blueprint`, and `scheduling` = the file's `scheduling`. 2. If the file has `interface`: `scenarios_set-interface` with `{"input": , "output": []}`. 3. Record the new scenario ID in CLAUDE.md (section 7.3). If `scenarios_create` fails with "Module not found", confirm the module name with `app-modules_list` for that app (google-drive, gemini-ai, http, json, util, builtin). The names in Appendix A are copied from a working build. **Manual alternative (πŸ‘€ YOU, if MCP creation fails):** Make β†’ Scenarios β†’ **Create a new scenario** β†’ the **…** menu at the bottom β†’ **Import Blueprint** β†’ choose the `blueprint` part of the file, saved as its own .json. Then **open every Google Drive and Gemini module**, select your connection, and re-pick the folder with the folder picker. Set **Scheduling** (clock icon) to "On demand" (or every 15 min for Song). Add the **Scenario inputs** (scenario settings β†’ Inputs) exactly as listed in the file's `interface`. Click **Save**. ### 6.4 What each scenario does (field reference) **1. AI Video – Song (OmniaKey β†’ Drive)**: schedule "every 15 min", **kept OFF between songs**. | # | Module | Key settings | |---|---|---| | 1 | Google Drive β€Ί Watch Files in a Folder | Folder = Ready; watch = by created time; limit 1 | | 20 | Tools β€Ί Set variable | `omnia_auth` = `Bearer ` (πŸ‘€ human pastes) | | 2 | Google Drive β€Ί Download a File | File ID `{{1.id}}` | | 3 | JSON β€Ί Parse JSON | `{{toString(2.data)}}` | | 4, 5 | JSON β€Ί Transform to JSON | `{{3.input}}`, `{{3.parameters}}` (escapes the lyrics safely) | | 6 | HTTP β€Ί Make a request | POST `https://api.omniakey.com/v1/media/tasks`, headers Authorization / Content-Type / Idempotency-Key, body `{"model":"suno-v4.5","type":"audio","operation":"generate","input":{{4.json}},"parameters":{{5.json}}}` | | 7 | Sleep | 120 s | | 8 | HTTP GET task | `…/v1/media/tasks/{{6.data.id}}` | | 9 | Router | A: status = `succeeded` β†’ 10 download MP3 β†’ 11 upload `Vera--Song.mp3` to Claude AI Video Videos β†’ 12 log to Done. B: not succeeded β†’ 13 sleep 180 β†’ 14 GET again β†’ 15 router β†’ success path 16–18, or failure log 19 | **2. CLAUDE AI Video – Stills from file (Gemini β†’ Drive)**: on demand, ON. Input `request_file_id`. | # | Module | Key settings | |---|---|---| | 6 | Drive β€Ί Download | the request JSON (`request_file_id`) | | 7 | Parse JSON | `{slug, prefix, model?, ref_id?, scenes[{id, setting, prompt}]}` | | 1 | Drive β€Ί Download | reference image = `ifempty(7.ref_id; HERO_IMAGE_ID)` | | 8 | Iterator | `7.scenes` | | 3 | Gemini AI β€Ί Generate an image | model `ifempty(7.model; "gemini-3-pro-image")`; image = the reference; prompt = `prefix` + blank line + scene `prompt`; JPEG, **2K, 9:16**. Error handler: **Ignore** (one failed image doesn't stop the batch) | | 4 | Drive β€Ί Upload | `Vera---.jpg` β†’ Claude AI Video Videos | Optional: duplicate this scenario as "Stills from file **B**" (Make β†’ scenario … β†’ Clone) to run two batches in parallel. One scenario can only run one execution at a time. **3. CLAUDE AI Video – Clips Omni (Gemini Omni β†’ Drive)**: on demand, ON. Inputs `slug`, `prefix`, `scenes_json` = `[{id, still_id, prompt}]`. | # | Module | Key settings | |---|---|---| | 2 | Parse JSON | `scenes_json` (an array, so one bundle per scene) | | 3 | Drive β€Ί Download | `still_id` (the cutaway still) | | 7 | Transform to JSON | `prefix` + blank line + `prompt` | | 8 | Gemini AI β€Ί Make an API call | POST `/v1beta/interactions`, body `{"model":"gemini-omni-1.1-flash","input":[{"type":"image",…base64 still…},{"type":"text","text":<7.json>}],"response_format":{"type":"video","aspect_ratio":"9:16"}}`. Error handler: Ignore | | 9, 10 | Iterators | `8.body.steps` β†’ `9.content` | | 11 | Drive β€Ί Upload | filter `10.type = video`; `toBinary(10.data; base64)` β†’ `Vera---Omni.mp4` | **4. CLAUDE AI Video – Hedra Submit (no wait)**: on demand, ON. Inputs `slug`, `run_tag`, `prefix`, `scenes_json` = `[{id, still_id, audio_id, prompt}]`. | # | Module | Key settings | |---|---|---| | 1 | Set variable | `hedra_auth` = `Bearer ` (πŸ‘€ human pastes) | | 2 | Parse JSON | scenes | | 3, 4 | Drive download still β†’ HTTP POST `https://api.hedra.com/v3/files` (multipart `file`) | uploads the opening still to Hedra | | 5, 6 | Drive download audio β†’ POST `/v3/files` | uploads the vocal slice | | 7 | Transform to JSON | `prefix` + `prompt` | | 8 | HTTP POST `https://api.hedra.com/v3/models/hedra-character-3` | `{"input":{"prompt":…,"start_image":{"source":"url","url":<4.data.url>},"audio":{"source":"url","url":<6.data.url>},"aspect_ratio":"9:16","resolution":"1080p"},"idempotency_key":"vera---"}` | | 9 | Drive β€Ί Create file from text β†’ **Done** | `Vera---HedraJob` with content `|` | **5. CLAUDE AI Video – Hedra Collect**: on demand, ON. Inputs `slug`, `jobs_json` = `[{id, job_id}]`. | # | Module | Key settings | |---|---|---| | 1 | Set variable | `hedra_auth` (πŸ‘€ human pastes) | | 2 | Parse JSON | jobs | | 10 | HTTP GET `https://api.hedra.com/v3/jobs/{{2.job_id}}` | status | | 12 | HTTP GET `{{10.data.outputs[1].url}}` | filter: status = `COMPLETED`; parse response **No** | | 13 | Drive β€Ί Upload | `Vera---Hedra.mp4` β†’ Claude AI Video Videos | | 14 | Drive β€Ί Create file from text β†’ Done | `…-HedraLog` with status and **cost** (the Hedra spend record) | ### 6.5 Paste the keys (πŸ‘€ YOU; Claude must not do this or watch it) 1. Make β†’ Scenarios β†’ **AI Video – Song** β†’ click module **20** (Set variable) β†’ Variable value: replace `Bearer PASTE_OMNIAKEY_KEY_HERE` with `Bearer ` followed by your OmniaKey key (one space after Bearer) β†’ **OK** β†’ **Save** (bottom toolbar, or Ctrl/Cmd+S). 2. **Hedra Submit** β†’ module **1** β†’ `Bearer ` β†’ OK β†’ **Save**. 3. **Hedra Collect** β†’ module **1** β†’ the same β†’ OK β†’ **Save**. 4. The Gemini key already lives in the Gemini AI connection (6.2). Forgetting **Save** is the most common failure. It shows up as `Unauthorized` at the first HTTP module. ### 6.6 Turn scenarios ON and OFF (scheduling states) | Scenario | State | Why | |---|---|---| | Stills from file (and B) | **ON** | On-demand scenarios must be active before `scenarios_run` works. Being ON costs nothing; they only run when called | | Clips Omni | **ON** | same | | Hedra Submit, Hedra Collect | **ON** | same | | **Song** | **OFF between songs** | It's a watch scenario. While ON it checks Ready every 15 min, and every check spends a credit even when the folder is empty. Turn it ON only to make a song (section 9, step 5), then OFF | πŸ€– CLAUDE: `scenarios_activate` for scenarios 2–5 now. Leave Song inactive. ### 6.7 Verify the build (πŸ€– CLAUDE) For each scenario, run `scenarios_get` and confirm: - no `111111`, `222222`, `VIDEOS_FOLDER_ID`, `READY_FOLDER_ID`, `DONE_FOLDER_ID` or `HERO_IMAGE_ID` text is left anywhere; - `scenarios_interface` returns the inputs from Appendix A; - (πŸ‘€ YOU) in the Make editor, every Drive module shows your folder **name** (not a blank), and Song module 20 and Hedra module 1 hold your key (just check it's there; don't show it to Claude). --- ## 7. Connect Claude Code to Make (πŸ‘€ YOU once, then πŸ€– CLAUDE) ### 7.1 Add the Make MCP server In Terminal: ```bash cd ~/VeraEngine && claude mcp add --scope user --transport http make https://mcp.make.com/claude claude ``` Inside Claude Code, type `/mcp`, choose **make**, and authenticate. In the browser window, **select your organization and team, and allow all scopes** (Claude needs to create, read, activate, deactivate and run scenarios, and to read executions). The status should turn to connected. If the connection fails, use an API-key URL instead (Make β†’ profile β†’ **API access** β†’ add a token with all scopes, then `claude mcp add --scope user --transport http make "https:///mcp/u//v2"`). **That URL contains a secret.** Add it yourself in Terminal. Never paste it into the chat, and never commit it to a file. ### 7.2 Verify (πŸ€– CLAUDE) - `scenarios_list` for the team returns your scenarios. - `connections_list` shows the Drive and Gemini connections. - Calling a scenario: `scenarios_run` with `scenarioId` and `data` = an object whose keys match the scenario inputs exactly (e.g. `{"slug":"Test1","prefix":"…","scenes_json":"[…]"}`; `scenes_json` and `jobs_json` are **strings** holding JSON arrays). Make may also list each on-demand scenario as its own tool (named like `s_`); either way works. - Tool timeouts: a Make MCP call returns after about 25 s (OAuth) or 40 s (API-key URL). Longer runs keep going in Make. The call returns an `executionId`: poll `executions_get` until `displayStatus` is SUCCESS or ERROR. **Never re-run a scenario because a call returned early.** Make also refuses a second run while one is in progress ("Scenario is already being executed"). ### 7.3 CLAUDE.md (πŸ€– CLAUDE writes it to `~/VeraEngine/CLAUDE.md`) ``` # Video engine operator rules Read ENGINE_GUIDE.md first in every session. Follow section 9 in order and stop at every β›” gate. Never ask for, print, store or paste API keys. Keys live only in Make (human-entered). Never call OmniaKey, Gemini or Hedra directly. Use the Make scenarios. No Omni or Hedra spend before Gate 3 approval. Hard stop after one video. Record every new failure and its fix in ENGINE_GUIDE.md section 11. ## IDs (fill in during setup) VV (synced output folder) = ~/Library/CloudStorage/GoogleDrive-/My Drive/Claude AI Video Videos VIDEOS_FOLDER_ID = … READY_FOLDER_ID = … DONE_FOLDER_ID = … HERO_IMAGE_ID = … STYLE_REF_IDS = … Make team ID = … zone = … GDRIVE_CONN_ID = … GEMINI_CONN_ID = … Scenario IDs: SONG = … STILLS = … STILLS_B = … OMNI = … HEDRA_SUBMIT = … HEDRA_COLLECT = … Python = ~/vera-venv/bin/python3 (first on PATH as python3) ``` --- ## 8. Smoke tests (πŸ€– CLAUDE; about $3–5 total). Run all five before a real video. Use slug `Test1`. Write files to `$VV` with shell commands, then get their IDs with `drive_id.py`. **About `` in file names:** Make stamps the files it writes with the **New York** date (`formatDate(now; "YYYYMMDD"; "America/New_York")`). Set `DATE=$(TZ=America/New_York date +%Y%m%d)` and use `$DATE` for files you write. **For files Make wrote, never build the name from a date.** List them (`ls "$VV"/*-Test1-*`) and use the real name. A run that spans midnight in New York mixes dates; the scripts' `*--…` patterns handle that. Run `DATE=$(TZ=America/New_York date +%Y%m%d)` in every new shell before these commands. If a Make-written file isn't found under the `$DATE` name, `ls "$VV"/*-Test1-*` and use the real name. **T1 Song (OmniaKey through Make).** 1. Write `$VV/Ready/Vera-Test1-SongRequest.json`: ```json {"slug":"Test1","input":{"prompt":"Upbeat indie pop, female vocal mid-20s, clear diction, 110 BPM","lyrics":"[Verse]\nTesting one two, the engine is on,\nWrite me a song and then it is gone.\n[Chorus]\nThis is a test, this is a test,\nShort little song, then we can rest."},"parameters":{"title":"Engine Test"}} ``` 2. Wait until `drive_id.py` prints an ID for it (the file has reached Drive). 3. `scenarios_activate` SONG. A run should start within seconds (check with `executions_list`). If none starts within 60 s, ask the human to open the Song scenario in Make and click **Run once**. 4. Wait about 2–5 min. Pass = `$VV/Vera$DATE-Test1-Song.mp3` exists and plays, and `Done/` has a SongLog. 5. `scenarios_deactivate` SONG. **Always**, pass or fail. **T2 Still.** Write `$VV/Vera$DATE-Test1-StillsReq.json`: ```json {"slug":"Test1","prefix":"
","scenes":[{"id":"S01","setting":"Open-Cafe","prompt":"Outfit: cream knit sweater.\n\nScene: chest-up portrait at a sunny cafe table, relaxed, about to sing."}]} ``` Get its ID, then `scenarios_run` STILLS with `{"request_file_id":""}`. Pass = `Vera$DATE-Test1-S01-Open-Cafe.jpg` lands in `$VV`, upright, looking like the hero. **T3 Omni clip.** `scenarios_run` OMNI with `slug` = `Test1`, `prefix` = the section 10.4 cutaway prefix, and `scenes_json` = `[{"id":"S01","still_id":"","prompt":"Within the first 2 seconds she lifts a coffee cup and smiles."}]`. Pass = `…-Test1-S01-Omni.mp4` (about 10 s) lands. **If the run finished in under 3 s, it was a hidden Gemini 503** (the Ignore handler hides it). Wait 20–30 min and retry. **T4 Hedra lip-sync.** 1. Make the vocal stem and a 6 s slice: ```bash cd ~/VeraEngine/runs && mkdir -p Test1 && cd Test1 audio-separator "$VV/Vera$DATE-Test1-Song.mp3" --model_filename UVR-MDX-NET-Voc_FT.onnx --output_format WAV --model_file_dir ~/VeraEngine/models echo '[{"id":"S01","start":0,"end":6}]' > scenes_t.json python3 ~/VeraEngine/scripts/slices.py *"(Vocals)"*.wav scenes_t.json "$VV" Vera$DATE-Test1 python3 ~/VeraEngine/scripts/chestcrop.py "$VV/Vera$DATE-Test1-S01-Open-Cafe.jpg" "$VV/Vera$DATE-Test1-S01-Close.jpg" python3 ~/VeraEngine/scripts/drive_id.py "$VV/Vera$DATE-Test1-S01-Vox.mp3" "$VV/Vera$DATE-Test1-S01-Close.jpg" ``` 2. `scenarios_run` HEDRA_SUBMIT with `slug` = `Test1`, `run_tag` = `t1`, `prefix` = the section 10.5 Hedra prefix, and `scenes_json` = `[{"id":"S01","still_id":"","audio_id":"","prompt":"Mood: bright, playful."}]`. 3. Read `$VV/Done/Vera$DATE-Test1-S01-HedraJob` (content `S01|`). 4. Wait about 5–10 min, then `scenarios_run` HEDRA_COLLECT with `slug` = `Test1`, `jobs_json` = `[{"id":"S01","job_id":""}]`. If nothing lands, the job isn't finished yet: wait 5 min and collect again (collecting is free to repeat). 5. Pass = `…-Test1-S01-Hedra.mp4` with mouth movement in sync, plus a HedraLog in Done that shows the cost. **T5 Assembly + text.** ```bash cd ~/VeraEngine/runs/Test1 echo '[{"id":"S01","start":0,"end":6,"lyric":"Testing one two"}]' > scenes.json python3 ~/VeraEngine/scripts/make_manifest.py scenes.json "$VV" Test1 manifest.json ffmpeg -v error -y -i "$VV/Vera$DATE-Test1-Song.mp3" -t 6 song6.mp3 MANIFEST=manifest.json RES=1080 END_CARD_SEC=2 python3 ~/VeraEngine/scripts/assemble.py x "$VV" song6.mp3 "$PWD/base.mp4" echo '[{"t0":0.5,"t1":4.5,"style":"stamp","big":"ENGINE TEST","small":"it works"}]' > text.json python3 ~/VeraEngine/scripts/kinetic.py base.mp4 text.json "$PWD/final.mp4" song6.mp3 ffprobe -v error -count_frames -select_streams v -show_entries stream=nb_read_frames -of csv=p=0 final.mp4 # must print 180 ``` Pass = 180 frames, the Hedra clip plays with the cutaway intercut, and "ENGINE TEST" slams in with the script line wiping in under it. **When T1–T5 pass, setup is complete.** Write "Setup verified " at the top of CLAUDE.md. --- ## 9. Runbook: making a video (πŸ€– CLAUDE follows this every time) **Recommended first real video:** 60–90 s, about 10–14 scenes, Mode C. **Dates:** run `DATE=$(TZ=America/New_York date +%Y%m%d)` at the start of each shell session. Find Make-written files by listing `"$VV"/*--*`, not by building names from `$DATE`. **Files per run** live in `~/VeraEngine/runs//`. Drive outputs go to `$VV`. **Slug** = a short CamelCase name, e.g. `CoffeeRun`. Every retry or re-render uses a **new slug suffix** (`CoffeeRun2b`) or a **new file name** (`…-r2.json`). Drive for desktop and Make can serve a stale copy of an overwritten file. **Step 0. Goal.** Ask once: the idea, tone, visual feel, must-use lines, length (60–90 s for a first video), mode (recommend C), and which character look (`ref_id`) to use. Record the answers in `runs//brief.md`. **Step 1. Research (web search).** If the song is about real events, find 5–7 concrete, named, checkable examples with direct personal impact. Separate **confirmed** facts (with links) from **open questions**, and phrase the open ones as questions, not claims. **Step 2. One Big Idea.** One sentence that everything serves. Arc: problem β†’ turn β†’ hope. The hopeful part gets the last 30%. **Step 3. β›” GATE 1: lyrics.** Present the research summary, the Big Idea, the **Suno style prompt** and the **full lyrics with `[Section]` tags**. Lyric rules that worked: - The chorus is simple, literal, and repeats the Big Idea. - Verses are half-time and conversational, so every word is understood. Ask for "very clear crisp diction, dry upfront lead vocal, minimal reverb" in the style prompt (it makes lip-sync and timing easier). - One light deadpan joke line. - If you use another language, keep it to short hooks a listener can read on screen. - A short spoken intro or outro is fine, but it may be too quiet to time (step 6). - The style prompt sets genre, BPM, voice, instruments and mood. Change the genre every video. Wait for approval. **Step 4. Character look.** Pick the `ref_id` (hero or a style-library image). Record it. **Step 5. Song.** 1. Write `$VV/Ready/Vera$DATE--SongRequest.json` = `{"slug":"","input":{"prompt":"