Skip to content

🎬 Open-source, self-hosted AI agent that runs a YouTube channel end to end: researches topics, writes scripts, generates narration, visuals and video, optimizes SEO, and publishes after your approval, then learns from analytics. Works with Gemini, OpenAI, OpenRouter, DeepSeek and more.

5.2 KB
Raw Blame

AI providers

YouTube Automation Agent runs on your own API keys. One text provider is enough to start. Narration, images, and AI video are optional layers on top. Pick providers in npm run walkthrough, or set their keys in .env (.env.example documents every setting).

Text

Pick one in the walkthrough, or set its key in .env. The SDK base URL is configured for you.

Provider Models Key Env var
Google Gemini Gemini 3.8 Flash, Gemini 4 Argon (paid only), 3.5 Flash-Lite AI Studio GEMINI_API_KEY
OpenAI GPT-6.1 Sol, GPT-6 Astra, GPT-6 Luna platform.openai.com OPENAI_API_KEY
OpenRouter 400+ models through one key; curated defaults are checked against its live catalog openrouter.ai OPENROUTER_API_KEY
Kimi (Moonshot AI) Kimi K3, K2.7 Code, K2.6 platform.kimi.ai MOONSHOT_API_KEY
MiMo (Xiaomi) MiMo V2.6 Pro, V2.6 Flash mimo.mi.com MIMO_API_KEY
GLM (Zhipu AI) GLM-5.3, 5.3 Flash, 5.2 z.ai GLM_API_KEY
DeepSeek DeepSeek V4.1 Flash, V4 Pro platform.deepseek.com DEEPSEEK_API_KEY
MiniMax MiniMax M3.1 Flash, M3 platform.minimax.io MINIMAX_TEXT_API_KEY

Anthropic Claude is available through OpenRouter (anthropic/claude-fable-5.1). OpenRouter, Kimi, MiMo, GLM, DeepSeek, and MiniMax cover scripts only. Add a Gemini or OpenAI key for images and narration, or ElevenLabs for narration.

Narration and images

  • Narration uses the first configured provider in this order: ElevenLabs (Eleven v3, needs ELEVENLABS_API_KEY and ELEVENLABS_VOICE_ID), OpenAI (gpt-4o-mini-tts), then Gemini (gemini-3.8-flash-tts). A video without working narration can't be approved.
  • Images use OpenAI (GPT Image 2) and Gemini (gemini-3.1-flash-image, which needs billing enabled), each falling back to the other. With neither, slides use gradient backgrounds and thumbnails come from the built-in designer.

Video

Local slideshow rendering is the default, so you never pay for video unless you choose a provider in Channel setup and set a paid-seconds cap. If a provider fails, the video falls back to the local slideshow.

Provider Default model Best fit Clip limits Env var
ByteDance bytedance/seedance-2.5 through Replicate Cinematic long scenes and large reference sets 4–30 seconds REPLICATE_API_TOKEN
MiniMax MiniMax-H3 Multimodal references, native stereo audio, optional 2K 4–15 seconds MINIMAX_API_KEY
Google gemini-omni-1.1-flash Fast generation and conversational editing 3–10 seconds GEMINI_API_KEY
Kuaishou kling-v3-omni Storyboards and character/voice consistency 3–15 seconds KLING_ACCESS_KEY, KLING_SECRET_KEY
Alibaba Wan 2.7 task-specific models Efficient generation, reference video, and continuation 2–15 seconds DASHSCOPE_API_KEY

Long videos use hybrid assembly: generated clips for the hook and key sections, with the rest of the timeline filled locally. See AI video generation.

Environment variables

npm run walkthrough writes your configuration for you. To edit it by hand, copy .env.example to .env. The essentials:

# One text provider (see the table above)
GEMINI_API_KEY=...

# Optional: narration, images, and AI video
# ELEVENLABS_API_KEY=...
# ELEVENLABS_VOICE_ID=...
# OPENAI_API_KEY=sk-...
# VIDEO_PROVIDER=slideshow   # auto, seedance, minimax_h3, google_omni, kling, wan
# VIDEO_MAX_GENERATED_SECONDS=60

# App
PORT=3456
# HOST=127.0.0.1             # default: this machine only
# API_KEY=some-long-random-string
CHANNEL_NAME=Your Channel Name
DEFAULT_PRIVACY_STATUS=private

The dashboard listens on 127.0.0.1 by default. If you set HOST=0.0.0.0 to reach it from other devices, also set API_KEY, which every request that changes something must then send in the x-api-key header.

Adding a provider

See Extending in the contributing guide for how to add a text or video provider.

Acknowledgments