Video Generation and Editing for Openclaw

Turn prompts and existing media into production-ready AI videos through a streamlined command-line workflow.

wubin1836
v1.0.0
Aug 16, 2026
0
340
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install video-generation-and-editing

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install video-generation-and-editing using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Video Generation and Editing?

Video Generation and Editing is an AI video production skill for creating, editing, extending, and transforming videos from text, images, reference videos, audio, or first-and-last frames. It supports text-to-video, image-to-video, reference-to-video, video editing, and video extension workflows through the AI Hive OpenAPI platform.

As part of Openclaw Skills, it removes the need to manually implement API requests, media uploads, pricing checks, task polling, and result downloads. Creators, post-production teams, advertisers, and e-commerce operators can generate product videos, TVCs, social commerce content, UGC-style ads, short dramas, comic dramas, and other AIGC video assets from a consistent Python CLI.

Video Generation and Editing Use Cases

  • Generate cinematic videos from natural-language prompts with text-to-video.
  • Animate product images, storyboards, or key visuals with image-to-video.
  • Maintain visual references across scenes using reference-to-video inputs.
  • Edit existing footage while preserving subject identity, motion, or continuity.
  • Extend an existing clip for longer narrative sequences or commercial cuts.
  • Produce e-commerce product videos for listings, PDPs, product pages, and advertisements.
  • Create vertical short-form content for social commerce, livestream promotion, seeding, and UGC campaigns.
  • Develop TVC concepts, branded films, product demonstrations, short dramas, and animated comic scenes.
  • Compare available model versions, routing strategies, and real-time pricing before submission.
  • Submit long-running jobs without waiting locally, then retrieve them later with a task ID.

How Video Generation and Editing Works

  1. The CLI reads the prompt, selected mode, media inputs, API key, routing preference, and optional model parameters.
  2. The skill validates that the supplied inputs match the selected capability, such as images for image-to-video or video for editing and extension.
  3. Reference images, videos, or audio are uploaded automatically when required, and the resulting media IDs are attached to the generation request.
  4. The client discovers or selects the appropriate publicModelId. Supported mappings include t2v, i2v, r2v, edit, and extend.
  5. The client queries the current model catalog and pricing snapshot, then applies COST_FIRST, SPEED_FIRST, or SUCCESS_FIRST routing.
  6. The request is submitted through the AI Hive OpenAPI, returning a taskId for asynchronous processing.
  7. The skill polls the original task rather than creating a duplicate request, which helps avoid unnecessary charges when local polling times out.
  8. When processing completes, the generated video is downloaded to the configured output directory unless --no-download was selected.
  9. The resulting media and task information can be reviewed for production, iteration, comparison, or downstream editing.

Video Generation and Editing Setup

Requirements

  • Python 3.6 or newer
  • The requests package
  • An AI Hive API key in the sk-api-* format
  • The skill directory containing scripts/videogen.py

Install the dependency

pip3 install requests

Initialize credentials

The recommended initialization flow opens AI Hive, guides you through login and API key creation, and stores the key in ~/.ai-hive/config.json with restricted permissions.

python3 "$SKILL_PATH/scripts/videogen.py" init --skill-name video-generation-and-editing

Alternatively, configure the key using an environment variable, command-line option, or configuration file:

export AI_HIVE_API_KEY=sk-api-your-key
python3 "$SKILL_PATH/scripts/videogen.py" generate --mode t2v --prompt "A cinematic product reveal" --no-download

Generate a first video

python3 "$SKILL_PATH/scripts/videogen.py" generate \
  --mode t2v \
  --prompt "A cinematic product commercial with a slow camera push-in and premium studio lighting"

Use existing media

python3 "$SKILL_PATH/scripts/videogen.py" generate \
  --mode edit \
  --prompt "Preserve the original subject and motion, change the environment to a premium commercial studio" \
  --video /path/to/source.mp4

Submit and check later

python3 "$SKILL_PATH/scripts/videogen.py" generate --mode t2v --prompt "A complex cinematic scene" --no-download
python3 "$SKILL_PATH/scripts/videogen.py" task --task-id <taskId>

The default output location is ~/Downloads/AiHive. Use --output-dir to change it, and use --api-key, --base-url, or --verbose for runtime configuration and diagnostics.

Video Generation and Editing Data Schema & Taxonomy

Project structure

video-generation-and-editing/
├── SKILL.md
├── CHANGELOG.md
├── scripts/
│   └── videogen.py
└── resources/
    └── config.example.json

Generation modes

Mode Capability publicModelId
t2v Text-to-video public_model_seedance_2_5_t2v
i2v Image-to-video public_model_seedance_2_5_i2v
r2v Reference-to-video public_model_seedance_2_5_r2v
edit Video editing public_model_seedance_2_5_video_edit
extend Video extension public_model_seedance_2_5_video_extend

Input and metadata taxonomy

  • prompt: Required natural-language description of the desired video.
  • mode: Generation capability, including t2v, i2v, r2v, edit, and extend.
  • first-frame and last-frame: Boundary images for controlled animation.
  • image: One or more reference images.
  • video: One or more source or reference videos.
  • audio: One or more reference audio files.
  • model-id: Explicit model selection when multiple matching candidates exist.
  • routing: Cost, speed, or success preference.
  • param: Runtime model settings in key=value form, such as resolution or duration.
  • taskId: Identifier used to track asynchronous generation.
  • mediaId: Identifier returned after reference media upload.
  • pricingSnapshot: Runtime model and price information associated with submission.

Files and outputs

Item Default or format
Credentials ~/.ai-hive/config.json, permissions 0600
Generated output ~/Downloads/AiHive
Video formats MP4, MOV, or formats supported by the active model
Task state Stored and queried through the returned taskId
Media assets Uploaded through the AI Hive object-storage workflow and referenced by media IDs

Video Generation and Editing Advanced Features

  • Supports five specialized workflows: text-to-video, image-to-video, reference-to-video, video editing, and video extension.
  • Accepts first-frame, last-frame, image, video, and audio controls for more constrained generation.
  • Uses explicit publicModelId mappings for stable, predictable capability routing.
  • Queries real-time model availability and pricing instead of relying on hard-coded promotional prices.
  • Provides COST_FIRST, SPEED_FIRST, and SUCCESS_FIRST routing strategies.
  • Passes model-specific options through repeatable --param key=value arguments.
  • Supports asynchronous submission with --no-download, allowing external scheduling or later task retrieval.
  • Automates upload credentials, object-storage uploads, and upload completion confirmation.
  • Includes task polling and result downloading through the task subcommand.
  • Offers verbose logging, custom API base URLs, and multiple API-key configuration methods.
  • Enables sequential batch production for SKU variants, campaign assets, and multi-channel creative testing.
  • Provides prompt guidance for separating subject motion from camera motion and specifying lighting, sound, constraints, and output format.
  • Fits Openclaw Skills workflows that need repeatable AI video generation, content automation, and command-line integration.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*