Communitygithub.com

Aseel1600/Edit01

根据文本提示,通过多个提供商网关生成 AI 视频。适用于:(1) 从文本描述生成视频,(2) 为内容制作创建 AI 生成的视频片段,(3) 使用参考图像进行图像到视频的生成,(4) 在视频生成提供商(VEO、Kling、Sora、Runway、Seedance、MiniMax、Gemini Omni)之间进行选择。支持的网关:HeyGen API、fal.ai API、Kling 官方直接 API 和 Gemini API(Gemini Omni Flash)。

Edit01 是什么?

Aseel1600/Edit01 是一个多网关 AI 视频生成技能,允许用户通过统一的接口从文本或图像提示创建视频。它集成了多个领先的提供商,包括通过 fal.ai 访问的 Seedance 2.0、Kling、MiniMax 和 VEO;通过 HeyGen 访问的 VEO 3.1、Kling Pro、Sora v2 和 Runway Gen-4;以及 Kling 官方和 Gemini API。该技能强调使用 `video_selector` 工具自动进行可用性检查和成本比较,并默认优先选择 Seedance 2.0 用于电影级、预告片和高保真片段工作,因为它具有单通道原生同步音频、多镜头生成和导演级摄像机控制。对于迭代编辑,Gemini Omni Flash 是唯一支持有状态多轮对话编辑的提供商,允许用户添加/删除对象、重新样式或更改现有剪辑的照明。该技能提供完整的 API 端点、TypeScript 和 Python 代码示例,以及轮询机制以处理视频生成的长延迟(最多 5 分钟)。

兼容平台~Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/Aseel1600/Edit01/tree/HEAD/.agents/skills/ai-video-gen

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

视频生成(多网关)

从文本提示生成 AI 视频。通过四个 API 路径支持多个提供商:

网关环境变量提供商工具
fal.aiFAL_KEYSeedance 2.0(标准 + 快速)、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 官方KLING_API_KEYKling 官方 Classic、Turbo 和基本 Omni 视频kling_official_video
Gemini APIGEMINI_API_KEY / GOOGLE_API_KEYGemini Omni Flash(生成 + 对话式编辑)gemini_omni_video

迭代编辑 — Gemini Omni。 当需求是细化现有片段(添加/删除对象、重新样式、更改照明或屏幕文本)而不是重新生成时,Gemini Omni Flash 是当前集合中唯一支持有状态多轮编辑的提供商。在为其编写任何提示之前,请参阅第 3 层 gemini-omni 以获取权威提示指南(参考图像标签、时间码语法、编辑提示规则)。

首选的优质默认值 — Seedance 2.0。 当配置了任何优质网关(FAL_KEY → seedance_video,或 HeyGen 的视频代理/头像镜头路径)时,Seedance 2.0 是电影、预告片和高保真片段工作的首选默认值。它是当前集合中唯一支持单通道原生同步音频、多镜头生成、导演级摄像机控制以及根据引号对话进行唇形同步的模型,并且截至 2026 年初在 Artificial Analysis Elo 上排名第一。仅在用户有特定原因(预算、提供商偏好、风格匹配,例如 VEO 用于逼真风景或 Kling 用于特定动漫风格)时才切换它。请参阅第 3 层 seedance-2-0 以获取权威提示和参数指南。

重要提示: 始终使用 video_selector 而不是直接调用提供商工具。该选择器处理可用性检查、成本比较和自动回退,并且其评分引擎已针对电影意图偏向 Seedance 2.0。

身份验证

使用任何最符合用户可用提供商和成本/质量目标的已配置网关。

  • HeyGen: 设置 HEYGEN_API_KEY 以访问多模型网关。
  • fal.ai: 设置 FAL_KEY 以通过 fal.ai 访问 Kling、MiniMax 和 Veo。
  • Kling 官方: 设置 KLING_API_KEY 以通过 provider="kling_official" 访问 Kling 的官方直接 API。
  • Gemini API: 设置 GEMINI_API_KEY 或 GOOGLE_API_KEY 以访问 Gemini Omni 视频生成和对话式编辑。

在检查注册表和当前任务适用性之前,不要将任何网关描述为默认或首选。

fal.ai Kling(kling_video,provider="kling")和 Kling 官方(kling_official_video,provider="kling_official")是不同的路径。当选择了官方提供商时,不要重用 fal.ai 队列 URL、FAL_KEY 或图像上传行为。

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": "A drone shot flying over a coastal city at sunset"}}'

默认工作流程

  1. 使用 workflow_type: "GenerateVideoNode" 和您的提示调用 POST /v1/workflows/executions
  2. 在响应中接收 execution_id
  3. 每 10 秒轮询 GET /v1/workflows/executions/{id},直到状态变为 completed
  4. 使用输出中返回的 video_url

执行视频生成

端点

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

请求字段

字段类型必填描述
workflow_typestring是必须为 "GenerateVideoNode"
input.promptstring是要生成的视频的文本描述
input.providerstring视频生成提供商(默认:"veo_3_1")。请参阅下面的提供商。
input.aspect_ratiostring宽高比(默认:"16:9")。常用值:"16:9"、"9:16"、"1:1"
input.reference_image_urlstring用于图像到视频生成的参考图像 URL
input.tail_image_urlstring用于最后一帧引导的尾部图像 URL
input.configobject提供商特定的配置覆盖

提供商

提供商值描述
VEO 3.1"veo_3_1"Google VEO 3.1(默认,最高质量)
VEO 3.1 快速"veo_3_1_fast"更快的 VEO 3.1 变体
VEO 3"veo3"Google VEO 3
VEO 3 快速"veo3_fast"更快的 VEO 3 变体
VEO 2"veo2"Google VEO 2
Kling Pro"kling_pro"Kling Pro 模型
Kling V2"kling_v2"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 Distilled"ltx_distilled"LTX Distilled(最快)

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": "A drone shot flying over a coastal city at golden hour, cinematic lighting",
      "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"]

响应格式

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

检查状态

端点

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"

响应格式(已完成)

{
  "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"
    }
  }
}

轮询完成

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(`提交了视频生成:${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 || "视频生成失败");
      case "not_found":
        throw new Error("未找到工作流");
      default:
        await new Promise((r) => setTimeout(r, pollIntervalMs));
    }
  }

  throw new Error("视频生成超时");
}

使用示例

简单的文本到视频

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": "A person walking through a sunlit park, shallow depth of field"
    }
  }'

图像到视频

{
  "workflow_type": "GenerateVideoNode",
  "input": {
    "prompt": "Animate this product photo with a slow zoom and soft particle effects",
    "reference_image_url": "https://example.com/product-photo.png",
    "provider": "kling_pro"
  }
}

社交媒体竖屏格式

{
  "workflow_type": "GenerateVideoNode",
  "input": {
    "prompt": "A trendy coffee shop interior, camera slowly panning across the counter",
    "aspect_ratio": "9:16",
    "provider": "veo_3_1"
  }
}

使用 LTX 快速生成

{
  "workflow_type": "GenerateVideoNode",
  "input": {
    "prompt": "Abstract colorful shapes morphing and flowing",
    "provider": "ltx_distilled"
  }
}

最佳实践

  1. 提示要描述详细 — 包括摄像机运动、光照、风格和氛围细节
  2. 对于电影和运动主导的工作,默认使用 Seedance 2.0(通过 seedance_video) 当设置了 FAL_KEY 时 — 单通道同步音频、多镜头、唇形同步、导演级摄像机。当用户特别需要 Google 或 OpenAI 的运动角色时,使用 VEO 3.1 / Sora V2 Pro;仅当速度是硬性约束时,使用 ltx_distilled 或 veo3_fast
  3. 使用参考图像 进行图像到视频生成 — 非常适合为产品照片或静态图像制作动画
  4. 视频生成是最慢的工作流 — 允许最多 5 分钟,每 10 秒轮询一次
  5. 宽高比很重要 — 对于社交媒体故事/短视频使用 9:16,对于横屏使用 16:9,对于方形使用 1:1
  6. 输出包含 asset_id — 使用此 ID 在其它 HeyGen 工作流中引用生成的视频
  7. 输出 URL 是临时的 — 及时下载或保存生成的视频

Individual skills in this repo

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

Aseel1600/Edit01

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.

Aseel1600/Edit01

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

Aseel1600/Edit01

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

Aseel1600/Edit01

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".

Aseel1600/Edit01

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.

Aseel1600/Edit01

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.

Aseel1600/Edit01

Generate expressive, multilingual narration with fish.audio (S1 / S2-generation models) and reuse cloned voices via reference_id. Use when the user prefers fish.audio/Fish Audio TTS, wants a specific playground voice model, or needs high-emotion voice-clone narration.

Aseel1600/Edit01

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

Aseel1600/Edit01

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.

Aseel1600/Edit01

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`).

Aseel1600/Edit01

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.

Aseel1600/Edit01

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`.

Aseel1600/Edit01

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.

Aseel1600/Edit01

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).

Aseel1600/Edit01

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.

Aseel1600/Edit01

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.

Aseel1600/Edit01

Best practices for Remotion - Video creation in React

Aseel1600/Edit01

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.

Aseel1600/Edit01

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.

Aseel1600/Edit01

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

相关技能