{
  "schema": "leumas.docs.page/1",
  "id": "skill:youtube-video-generator",
  "slug": "skills/youtube-video-generator",
  "kind": "tools",
  "bucket": "skill",
  "title": "youtube-video-generator",
  "name": "Youtube Video Generator",
  "eyebrow": null,
  "chip": null,
  "summary": "Generate a publish-ready YouTube video or short from a topic — script, voice, captions, visuals, thumbnail and SEO — in one headless command.",
  "keywords": [
    "youtube-video-generator",
    "visuals",
    "captions",
    "topic",
    "voice",
    "leumas youtube video generator",
    "youtube",
    "headless"
  ],
  "audience": "both",
  "funnel": {
    "product": null,
    "cta": null
  },
  "body": "\n# YouTube Video Generator — how to actually run it\n\nA full AI video generator in Leumas. The fastest way for an agent to produce a video is the headless\nCLI (no dev server, no login). It picks up your env API keys automatically and always renders even with\nno keys (real **free stock photos** as the default background — topic-relevant CC0/Pexels/Pixabay media —\nfalling back to procedural \"aurora\" gradients + offline voice + a calm heuristic script).\n\n## Run it (primary path)\n\n```bash\nnode ops/tools/yt-generate/index.mjs --type fall-asleep --topic \"a quiet walk through a snowfall at midnight\"\n```\n\nPrints a JSON result to stdout: `{ ok, videoPath, thumbPath, srtPath, durationSec, aspect, visualMode, voiceProvider, seo, renderSeconds }`. `videoPath` is the finished MP4. Progress prints to stderr.\n\n| flag | meaning |\n|---|---|\n| `--type <id>` | video type (default `fall-asleep`). See `--list`. |\n| `--topic \"<idea>\"` | **required** — the idea/description to generate from. |\n| `--minutes <n>` | target length (fractional ok, e.g. `0.5` = 30s). Per-type default otherwise. |\n| `--voice <p>` | `openai` \\| `elevenlabs` \\| `say` \\| `auto`. |\n| `--background <b>` | `auto` (AI stills if keyed → free stock photos → gradient) · `stock` (force real free photos) · a theme: `aurora`·`vivid`·`ocean`·`ember`·`gold`·`slate`. |\n| `--captions <c>` | `calm`·`reddit-bold`·`boxed`·`auto`. |\n| `--images <list>` | comma-separated **local paths OR http(s) URLs** → used as the video's visuals (see MCP below). |\n| `--out <dir>` | output directory (default a temp dir; the path is printed). |\n| `--list` | print the available generators, backgrounds, caption styles, and voices as JSON. |\n\n`node ops/tools/yt-generate/index.mjs --list` first if you're unsure of the ids.\n\n## The 6 types\n\n| id | aspect | what it is |\n|---|---|---|\n| `fall-asleep` | 16:9 | calm slow narration over soothing visuals — a sleep video |\n| `trending-shorts` | 9:16 | punchy vertical Short, fast hook, bold centered captions |\n| `listicle-top10` | 16:9 | narrated Top-10 countdown |\n| `reddit-story` | 9:16 | first-person \"story time\" narration |\n| `quote-motivation` | 9:16 | short motivational quote video |\n| `news-explainer` | 16:9 | clear, neutral topic explainer |\n\n## Premium AI visuals via a connected MCP (e.g. Higgsfield)\n\nThe generator handles script/voice/captions/compose; give it great **b-roll**. If a media MCP is\nconnected in this session (Higgsfield exposes `mcp__higgsfield__generate_image` / `generate_video` /\n`models_explore` / `reframe`), do this:\n\n1. Decide 3–6 scene prompts from the topic (concrete, no on-screen text). Match the type's aspect\n   (16:9 or 9:16 — use `reframe` or the model's size params).\n2. Generate the images with the MCP (`generate_image`; `models_explore(action:'recommend')` if unsure\n   which model). Collect the resulting image **URLs** (from the tool result / `show_generations` /\n   `reveal_generation`).\n3. Pass them straight in — the CLI downloads URLs and uses them as the Ken-Burns slideshow:\n\n```bash\nnode ops/tools/yt-generate/index.mjs --type listicle-top10 --topic \"most beautiful islands\" \\\n  --images \"https://…/img1.png,https://…/img2.png,https://…/img3.png\"\n```\n\n`visualMode` in the result will be `supplied`. (Higgsfield's tools are agent-only — not callable from\nthe server — so `--images` is the bridge that gets their output into the render.) For a fully\nHiggsfield-produced clip you could also just `generate_video` and skip this generator; use the\ngenerator when you want narration + captions + SEO wrapped around AI stills.\n\n## Keys (optional — better output)\n\nSet in the API env (`products/leumas-api/.env`) or the shell:\n- `OPENAI_API_KEY` / `ELEVENLABS_API_KEY` → LLM script + SEO + a natural voice (auto-selected).\n- `STABILITY_API_KEY` / `OPENAI_API_KEY` → AI **still** backgrounds when you don't pass `--images`.\n- `PEXELS_API_KEY` / `PIXABAY_API_KEY` (both free) → higher-res stock photos; without them the generator\n  still pulls **free CC0 photos from Openverse (no key)**, so real topic-relevant media is the baseline.\nWithout any keys it still renders well (real free stock photos → gradient fallback, offline voice, heuristic script).\n\n## In the app (Studio) — when the server is running\n\n- **UI:** `/admin/yt-studio` — Generators · Jobs (durable; leave & come back) · Channels (connect\n  YouTube via OAuth) · Planner (calendar: daily/multi-daily schedules + approval gate).\n- **HTTP:** `POST /api/yt-studio/generate { type, topic, minutes?, voice?, background?, captionStyle? }`\n  → a durable job; poll `GET /api/yt-studio/jobs/:id`.\n- **MCP / functioncall:** the `yt-generator` adapter auto-exposes `generate/status/list/listGenerators`\n  on the Leumas MCP gateway (`/mcp`) and as chatbot functioncalls — for agents talking to the running\n  Leumas API rather than the repo.\n- **Schedule:** `POST /api/planner/plans { kind:'yt-render', cadence:{ cron:'0 21 * * *' }, spec:{ type,\n  topics:[…], channelId }, autoApprove }` — the calendar Planner tab is the UI for this.\n\n## Publish / upload\n\nThe CLI produces the file; it doesn't upload (no auth). To publish: connect a channel in the Studio\n**Channels** tab (needs a Google Cloud OAuth client → `MUSIC_YT_CLIENT_ID/SECRET/REDIRECT_URI`), then\nupload from the **Jobs** tab or `POST /api/yt-studio/jobs/:id/upload { channelId }`.\n\nPair with `leumas-capabilities` (what exists / how it's wired) and `expose-as-mcp` (distribute + price).\n",
  "source": {
    "path": ".claude/skills/youtube-video-generator/SKILL.md",
    "blobSha": "",
    "commit": "",
    "committedAt": "",
    "provenance": "no-git",
    "bytes": 5705,
    "hash": "0d5ea04d5f620cb81f46894e88d3dbf0f3995dc7"
  },
  "urls": {
    "html": "/p/skills/youtube-video-generator",
    "json": "/docs/skills/youtube-video-generator.json",
    "md": "/docs/skills/youtube-video-generator.md"
  },
  "links": {
    "composes": [],
    "usedBy": [],
    "product": [],
    "howTo": [],
    "skills": []
  }
}
