Magic Hour for Openclaw

Magic Hour gives Openclaw Skills a unified API for generating AI videos and images across leading models with asynchronous job tracking and optional local downloads.

rhythmp28
v1.0.0
Aug 23, 2026
0
186
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install magic-hour

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 magic-hour 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 Magic Hour?

Magic Hour is an AI media-generation skill that connects agents to video and image models including Sora 2, Veo 3.1, Kling 3.0, WAN 2.2, LTX 2.3, GPT-image, Nano Banana Pro, Flux, and Z-Image. It supports text-to-video, image-to-video, and text-to-image workflows through one API key, making model selection and content production easier to automate.

The skill supports both a hosted MCP server with zero local installation and a Python SDK script workflow. Openclaw Skills users can submit asynchronous jobs, monitor project status, retrieve expiring output URLs, download generated assets, estimate credit usage, and handle failures through structured JSON responses.

Magic Hour Use Cases

  • Create cinematic AI video clips from natural-language prompts for campaigns, presentations, prototypes, and social media.
  • Animate a local image or public image URL with controlled camera movement, subject motion, and visual effects.
  • Generate product concepts, illustrations, social tiles, photorealistic scenes, and edited images.
  • Produce vertical 9:16 shorts, landscape 16:9 videos, or square 1:1 social content.
  • Compare cost, duration, resolution, and quality across multiple video models through one interface.
  • Queue long-running generation tasks and check their status later without blocking the agent.
  • Use Openclaw Skills with an MCP-compatible client when a zero-install hosted integration is preferred.

How Magic Hour Works

  1. Configure the Magic Hour API key through the MAGIC_HOUR_API_KEY environment variable, or attach the hosted MCP server with bearer authentication.
  2. Select a generation workflow: text-to-video, image-to-video, or text-to-image.
  3. Choose a compatible model, duration, resolution, aspect ratio, and optional audio setting.
  4. Submit the request. The API creates an asynchronous project and returns a project identifier.
  5. The scripts poll approximately every five seconds when waiting is enabled, or return immediately with status: "queued" when --no-wait is used.
  6. Read the structured JSON result, including project ID, status, model, output URL or URLs, and credits charged.
  7. Optionally use --download-dir to save generated files locally before temporary output URLs expire.
  8. If a job fails, inspect the structured error, correct common issues such as unsupported duration or resolution, and retry once; failed jobs are automatically refunded.

Magic Hour Setup

Option 1: Hosted MCP server

Use the remote MCP endpoint at https://mcp.magichour.ai/ when your agent supports MCP servers. Configure the Authorization: Bearer $MAGIC_HOUR_API_KEY header. Claude web and desktop use OAuth with the Magic Hour MCP client ID.

Option 2: Python script workflow

  1. Create a free Magic Hour developer account and API key at https://magichour.ai/developer. New accounts receive 400 signup credits and 100 credits per day without a card.
  2. Export the API key and install the official Python SDK:
export MAGIC_HOUR_API_KEY=mhk_...
pip install magic_hour

Python 3.9 or newer is required. Run the included scripts from the skill directory:

python3 {baseDir}/scripts/text_to_video.py "a corgi surfing at golden hour, slow-motion, cinematic" \
  --model wan-2.2 --duration 5 --resolution 480p --aspect-ratio 16:9 --download-dir ./out

python3 {baseDir}/scripts/image_to_video.py ./photo.png "slow push-in, hair moves in the wind" \
  --model kling-3.0 --duration 5 --resolution 720p

python3 {baseDir}/scripts/generate_image.py "isometric cozy coffee shop, soft morning light" \
  --model nano-banana-pro --count 2 --aspect-ratio 1:1

python3 {baseDir}/scripts/status.py <project_id> --kind video --wait

Use --no-wait for immediate queue submission. Review the model catalogue and raw HTTP examples in the skill's references/models.md and references/api.md files when using unsupported environments or direct API requests.

Magic Hour Data Schema & Taxonomy

Response object

Every script prints one JSON object to standard output. Typical fields include:

Field Purpose
project_id Identifier used to poll or retrieve a generation project.
status Job state such as queued, completed, or error.
model Magic Hour model used for the request.
url / urls Temporary URL or URLs for generated media.
downloaded_paths Local file paths when --download-dir is supplied.
credits_charged Credits consumed by the completed request.
error Structured failure details, including an error message when applicable.

Asset and metadata organization

  • Video projects are tracked by project_id and queried with status.py --kind video.
  • Image generation can return multiple outputs through the urls collection.
  • Local files are written beneath the directory supplied to --download-dir.
  • Source images may be local files, which are uploaded automatically, or public HTTPS URLs.
  • Model metadata includes supported duration, credits per second, resolution constraints, and aspect-ratio behavior.
  • Cost is calculated as credits per second multiplied by video duration; image generation generally costs about 5 to 50 credits per image.
  • Failures return a non-zero process status and a JSON payload shaped like {"status":"error","error":{...}}.

Magic Hour Advanced Features

  • Hosted MCP integration exposes image, video, and audio generation tools without a local SDK installation.
  • MCP tooling supports asset uploads through videoAssets_generatePresignedUrl and dedicated wait/status operations.
  • Multi-model generation covers free and premium options, from WAN 2.2, LTX 2.3, and MiniMax H3 to Sora 2 and Veo 3.1.
  • Asynchronous execution supports queued jobs, polling, delayed status checks, and non-blocking --no-wait workflows.
  • Automatic local downloading protects assets from expiring remote URLs.
  • Image-to-video workflows automatically upload local source images and preserve the source image as the visual foundation.
  • Video generation supports model-specific duration validation, resolution controls, aspect ratios, and optional Veo audio.
  • Structured JSON output makes the skill easy to connect to pipelines, automation scripts, and other Openclaw Skills.
  • Cost-aware operation helps agents prefer free models and notify users before spending more than approximately 500 credits.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*