Communitygithub.com

9018/mychat

Gere vídeos de IA a partir de prompts de texto usando múltiplos provedores e gateways. Use quando: (1) Gerar vídeos a partir de descrições textuais, (2) Criar clipes de vídeo gerados por IA para produção de conteúdo, (3) Geração de imagem para vídeo com uma imagem de referência, (4) Escolher entre provedores de geração de vídeo (VEO, Kling, Sora, Runway, Seedance, MiniMax, Gemini Omni). Suporta gateways: HeyGen API, fal.ai API, API direta oficial da Kling e a API Gemini (Gemini Omni Flash).

O que é mychat?

Esta skill capacita agentes de IA a gerar vídeos de alta qualidade a partir de prompts de texto ou imagens de referência, utilizando uma arquitetura multi-gateway. Ela suporta diversos provedores, incluindo Seedance 2.0 (recomendado para trabalho cinematográfico com áudio síncrono nativo), VEO, Kling, Sora, Runway, MiniMax e Gemini Omni Flash, cada um acessível por meio de gateways como fal.ai, HeyGen, API oficial da Kling e API Gemini. Uma característica chave é o uso obrigatório do seletor `video_selector` em vez de chamar ferramentas de provedor diretamente, que gerencia verificações de disponibilidade, comparação de custos e fallback automático. A skill também destaca o Gemini Omni Flash como o único provedor para edição iterativa stateful de múltiplas voltas, permitindo refinamentos como adicionar/remover objetos ou alterar iluminação. A documentação detalhada inclui autenticação via variáveis de ambiente, fluxo de trabalho padrão com endpoints da API, parâmetros de requisição e exemplos de código em curl, TypeScript e Python, além de práticas recomendadas para prompts descritivos, uso de imagens de referência e polling para conclusão.

Funciona com~Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/9018/mychat/tree/HEAD/OpenMontage/.agents/skills/ai-video-gen

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Geração de Vídeo (Multi-Gateway)

Gere vídeos de IA a partir de prompts de texto. Suporta múltiplos provedores por meio de quatro caminhos de API:

GatewayVariável de AmbienteProvedoresFerramenta
fal.aiFAL_KEYSeedance 2.0 (padrão + rápido), Kling v3/v2.1, MiniMax, VEOseedance_video, kling_video, minimax_video, veo_video
HeyGenHEYGEN_API_KEYVEO 3.1, Kling Pro, Sora v2, Runway Gen-4, Seedance Pro / Lite (1.x)heygen_video
Kling OficialKLING_API_KEYKling oficial Classic, Turbo e Omni video básicokling_official_video
API GeminiGEMINI_API_KEY / GOOGLE_API_KEYGemini Omni Flash (geração + edição conversacional)gemini_omni_video

Edição iterativa — Gemini Omni. Quando a solicitação pede o refinamento de um clipe existente (adicionar/remover objetos, reestilizar, alterar iluminação ou texto na tela) em vez de regenerar, o Gemini Omni Flash é o único provedor na frota com edição stateful de múltiplas voltas. Consulte o Layer 3 gemini-omni para o guia de prompt autoritativo (tags de imagem de referência, sintaxe de timecode, regras de prompt de edição) antes de escrever qualquer prompt para ele.

Padrão premium preferido — Seedance 2.0. Quando qualquer gateway premium está configurado (FAL_KEY → seedance_video, ou o caminho de Video Agent / Avatar Shots da HeyGen), o Seedance 2.0 é o padrão preferido para trabalho cinematográfico, de trailer e de clipes de alta fidelidade. É o único modelo na frota com áudio sincronizado nativo em única passagem, geração de múltiplos takes, controle de câmera em nível de diretor e sincronização labial a partir de diálogo citado, e ocupa o 1º lugar no Elo da Artificial Analysis no início de 2026. Mude dele apenas quando o usuário tiver um motivo específico (orçamento, preferência de provedor, adequação estilística como VEO para paisagem fotorrealista ou Kling para um visual específico de anime). Consulte o Layer 3 seedance-2-0 para o guia autoritativo de prompt e parâmetros.

IMPORTANTE: Sempre use video_selector em vez de chamar as ferramentas do provedor diretamente. O seletor lida com verificações de disponibilidade, comparação de custos e fallback automático, e seu mecanismo de pontuação já tende ao Seedance 2.0 para intenção cinematográfica.

Autenticação

Use o gateway configurado que melhor corresponda aos provedores disponíveis do usuário e às metas de custo/qualidade.

  • HeyGen: Defina HEYGEN_API_KEY para acessar o gateway multi-modelo.
  • fal.ai: Defina FAL_KEY para acessar Kling, MiniMax e Veo através do fal.ai.
  • Kling Oficial: Defina KLING_API_KEY para acessar a API oficial direta da Kling via provider="kling_official".
  • API Gemini: Defina GEMINI_API_KEY ou GOOGLE_API_KEY para acessar a geração de vídeo Gemini Omni e edição conversacional.

Não descreva nenhum gateway como padrão ou melhor escolha sem verificar o registro e a adequação da tarefa atual primeiro.

O Kling do fal.ai (kling_video, provider="kling") e o Kling Oficial (kling_official_video, provider="kling_official") são caminhos diferentes. Não reutilize URLs de fila do fal.ai, FAL_KEY ou comportamento de upload de imagem quando o provedor oficial for selecionado.

curl -X POST "https://api.heygen.com/v1/workflows/executions" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_type": "GenerateVideoNode", "input": {"prompt": "Uma tomada de drone sobrevoando uma cidade costeira ao pôr do sol"}}'

Fluxo de Trabalho Padrão

  1. Chame POST /v1/workflows/executions com workflow_type: "GenerateVideoNode" e seu prompt
  2. Receba um execution_id na resposta
  3. Consulte GET /v1/workflows/executions/{id} a cada 10 segundos até o status ser completed
  4. Use o video_url retornado da saída

Executar Geração de Vídeo

Endpoint

POST https://api.heygen.com/v1/workflows/executions

Campos da Requisição

CampoTipoObrig.Descrição
workflow_typestringSDeve ser "GenerateVideoNode"
input.promptstringSDescrição textual do vídeo a ser gerado
input.providerstringProvedor de geração de vídeo (padrão: "veo_3_1"). Veja Provedores abaixo.
input.aspect_ratiostringProporção de tela (padrão: "16:9"). Valores comuns: "16:9", "9:16", "1:1"
input.reference_image_urlstringURL da imagem de referência para geração de imagem para vídeo
input.tail_image_urlstringURL da imagem final para orientação do último quadro
input.configobjectSubstituições de configuração específicas do provedor

Provedores

ProvedorValorDescrição
VEO 3.1"veo_3_1"Google VEO 3.1 (padrão, maior qualidade)
VEO 3.1 Rápido"veo_3_1_fast"Variante mais rápida do VEO 3.1
VEO 3"veo3"Google VEO 3
VEO 3 Rápido"veo3_fast"Variante mais rápida do VEO 3
VEO 2"veo2"Google VEO 2
Kling Pro"kling_pro"Modelo Kling Pro
Kling V2"kling_v2"Modelo Kling V2
Sora V2"sora_v2"OpenAI Sora V2
Sora V2 Pro"sora_v2_pro"OpenAI Sora V2 Pro
Runway Gen-4"runway_gen4"Runway Gen-4
Seedance Lite"seedance_lite"Seedance Lite
Seedance Pro"seedance_pro"Seedance Pro
LTX Destilado"ltx_distilled"LTX Destilado (mais rápido)

curl

curl -X POST "https://api.heygen.com/v1/workflows/executions" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow_type": "GenerateVideoNode",
    "input": {
      "prompt": "Uma tomada de drone sobrevoando uma cidade costeira na hora dourada, iluminação cinematográfica",
      "provider": "veo_3_1",
      "aspect_ratio": "16:9"
    }
  }'

TypeScript

interface GenerateVideoInput {
  prompt: string;
  provider?: string;
  aspect_ratio?: string;
  reference_image_url?: string;
  tail_image_url?: string;
  config?: Record<string, any>;
}

interface ExecuteResponse {
  data: {
    execution_id: string;
    status: "submitted";
  };
}

async function generateVideo(input: GenerateVideoInput): Promise<string> {
  const response = await fetch("https://api.heygen.com/v1/workflows/executions", {
    method: "POST",
    headers: {
      "X-Api-Key": process.env.HEYGEN_API_KEY!,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      workflow_type: "GenerateVideoNode",
      input,
    }),
  });

  const json: ExecuteResponse = await response.json();
  return json.data.execution_id;
}

Python

import requests
import os

def generate_video(
    prompt: str,
    provider: str = "veo_3_1",
    aspect_ratio: str = "16:9",
    reference_image_url: str | None = None,
    tail_image_url: str | None = None,
) -> str:
    payload = {
        "workflow_type": "GenerateVideoNode",
        "input": {
            "prompt": prompt,
            "provider": provider,
            "aspect_ratio": aspect_ratio,
        },
    }

    if reference_image_url:
        payload["input"]["reference_image_url"] = reference_image_url
    if tail_image_url:
        payload["input"]["tail_image_url"] = tail_image_url

    response = requests.post(
        "https://api.heygen.com/v1/workflows/executions",
        headers={
            "X-Api-Key": os.environ["HEYGEN_API_KEY"],
            "Content-Type": "application/json",
        },
        json=payload,
    )

    data = response.json()
    return data["data"]["execution_id"]

Formato da Resposta

{
  "data": {
    "execution_id": "node-gw-v1d2e3o4",
    "status": "submitted"
  }
}

Verificar Status

Endpoint

GET https://api.heygen.com/v1/workflows/executions/{execution_id}

curl

curl -X GET "https://api.heygen.com/v1/workflows/executions/node-gw-v1d2e3o4" \
  -H "X-Api-Key: $HEYGEN_API_KEY"

Formato da Resposta (Concluído)

{
  "data": {
    "execution_id": "node-gw-v1d2e3o4",
    "status": "completed",
    "output": {
      "video": {
        "video_url": "https://resource.heygen.ai/generated/video.mp4",
        "video_id": "abc123"
      },
      "asset_id": "asset-xyz789"
    }
  }
}

Polling para Conclusão

async function generateVideoAndWait(
  input: GenerateVideoInput,
  maxWaitMs = 600000,
  pollIntervalMs = 10000
): Promise<{ video_url: string; video_id: string; asset_id: string }> {
  const executionId = await generateVideo(input);
  console.log(`Geração de vídeo submetida: ${executionId}`);

  const startTime = Date.now();
  while (Date.now() - startTime < maxWaitMs) {
    const response = await fetch(
      `https://api.heygen.com/v1/workflows/executions/${executionId}`,
      { headers: { "X-Api-Key": process.env.HEYGEN_API_KEY! } }
    );
    const { data } = await response.json();

    switch (data.status) {
      case "completed":
        return {
          video_url: data.output.video.video_url,
          video_id: data.output.video.video_id,
          asset_id: data.output.asset_id,
        };
      case "failed":
        throw new Error(data.error?.message || "Falha na geração de vídeo");
      case "not_found":
        throw new Error("Fluxo de trabalho não encontrado");
      default:
        await new Promise((r) => setTimeout(r, pollIntervalMs));
    }
  }

  throw new Error("Tempo limite de geração de vídeo excedido");
}

Exemplos de Uso

Texto para Vídeo Simples

curl -X POST "https://api.heygen.com/v1/workflows/executions" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow_type": "GenerateVideoNode",
    "input": {
      "prompt": "Uma pessoa caminhando por um parque ensolarado, profundidade de campo rasa"
    }
  }'

Imagem para Vídeo

{
  "workflow_type": "GenerateVideoNode",
  "input": {
    "prompt": "Anime esta foto de produto com um zoom lento e efeitos de partículas suaves",
    "reference_image_url": "https://exemplo.com/foto-produto.png",
    "provider": "kling_pro"
  }
}

Formato Vertical para Redes Sociais

{
  "workflow_type": "GenerateVideoNode",
  "input": {
    "prompt": "Interior de uma cafeteria moderna, câmera deslizando lentamente pelo balcão",
    "aspect_ratio": "9:16",
    "provider": "veo_3_1"
  }
}

Geração Rápida com LTX

{
  "workflow_type": "GenerateVideoNode",
  "input": {
    "prompt": "Formas coloridas abstratas se transformando e fluindo",
    "provider": "ltx_distilled"
  }
}

Melhores Práticas

  1. Seja descritivo nos prompts — inclua movimento de câmera, iluminação, estilo e detalhes de clima
  2. Prefira Seedance 2.0 (via seedance_video) para trabalho cinematográfico e com movimento quando FAL_KEY estiver definido — áudio sincronizado em única passagem, múltiplos takes, sincronização labial, câmera em nível de diretor. Use VEO 3.1 / Sora V2 Pro quando o usuário quiser especificamente movimento característico do Google ou OpenAI; use ltx_distilled ou veo3_fast apenas quando a velocidade for a restrição rígida
  3. Use imagens de referência para geração de imagem para vídeo — ótimo para animar fotos de produtos ou imagens estáticas
  4. A geração de vídeo é o fluxo de trabalho mais lento — aguarde até 5 minutos, consulte a cada 10 segundos
  5. A proporção de tela é importante — use 9:16 para stories/reels de redes sociais, 16:9 para paisagem, 1:1 para quadrado
  6. A saída inclui asset_id — use isso para referenciar o vídeo gerado em outros fluxos de trabalho da HeyGen
  7. As URLs de saída são temporárias — baixe ou salve os vídeos gerados prontamente

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

9018/mychat

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

9018/mychat

Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

9018/mychat

Review local character animation with schema checks, Playwright browser previews, frame sampling, and FFmpeg/ffprobe final output checks.

9018/mychat

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot prompt-to-video generation, (6) User says "make me a video" or "create a video about X".

9018/mychat

Generate Mandarin and multilingual narration with Volcengine Doubao Speech 2.0. Use when creating Chinese voiceovers, when the user prefers Doubao/Volcengine/火山引擎/豆包 TTS, or when narration needs character-level timestamp metadata for subtitles.

9018/mychat

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

9018/mychat

Use when implementing Disney's 12 animation principles with Framer Motion in React applications

9018/mychat

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

9018/mychat

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

9018/mychat

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

9018/mychat

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

9018/mychat

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

9018/mychat

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

9018/mychat

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

9018/mychat

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

9018/mychat

Toolkit-specific Remotion patterns — custom transitions, shared components, and project conventions. For core Remotion framework knowledge (hooks, animations, rendering, etc.), see the `remotion-official` skill.

9018/mychat

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

9018/mychat

Animate SVG character rigs with GSAP, CSS transforms, Remotion frame control, and HyperFrames-compatible browser previews.

9018/mychat

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

9018/mychat

Download video and audio from YouTube and 1000+ sites using yt-dlp. No API keys needed. Use when: (1) Downloading a video from YouTube or other sites, (2) Extracting audio from a video URL, (3) Downloading subtitles/captions from a video, (4) Getting video metadata without downloading.

Habilidades Relacionadas