Xpersona
V

Vidu official video generation. Image to video / Text to video / Reference to video / Text to image / Reference to image / Video edit / Image edit

CLAWHUB · Unverified

Generate video and images by calling the official Vidu API via vidu CLI. Use when the user wants text-to-image, text-to-video, image-to-video, head-tail-imag...

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17d9w7zzc60vwegqc57jxp9ax83p3ay:vidu-skill
  1. Install using `clawhub skill install s17d9w7zzc60vwegqc57jxp9ax83p3ay:vidu-skill` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/calvinzhao/vidu-skill before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-calvinzhao-vidu-skill/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

147,814 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: vidu-skills
description: Generate video and images by calling the official Vidu API via vidu CLI. Use when the user wants text-to-image, text-to-video, image-to-video, head-tail-image-to-video, reference-to-image, reference-to-video, lip-sync, text-to-speech, video-compose, Create References, or to submit or check Vidu tasks. Requires VIDU_TOKEN and optional VIDU_BASE_URL.
version: 1.4.9
homepage: https://www.vidu.cn/
primaryEnv: VIDU_TOKEN
metadata: {"openclaw":{"requires":{"bins":["node","npm","vidu-cli"],"env":["VIDU_TOKEN"]},"primaryEnv":"VIDU_TOKEN","install":[{"id":"vidu-cli","kind":"node","package":"vidu-cli","bins":["vidu-cli"],"label":"Install vidu-cli via npm (requires Node.js >=14; postinstall downloads a platform binary from GitHub)"}]}}
---

# Vidu Video and Image Generation Skill

Generate AI videos and images with Vidu via `vidu-cli` — text-to-image, text-to-video, image-to-video, start-end frame, reference-based generation, and material elements, up to 1080p/2K/4K.

## Execution model: use vidu CLI

**All execution is done via the `vidu-cli` CLI tool.** Parameters are CLI flags (not raw JSON bodies).

**Environment variables**

- `VIDU_TOKEN` (required) — Vidu API token
- `VIDU_BASE_URL` (optional) — Default `https://service.vidu.cn` (mainland China); use `https://service.vidu.com` for overseas
- `VIDU_DEBUG` (optional) — Set to `1` to print full response body to stderr for debugging

**Stdout contract**

- Every command prints **one line of JSON** to stdout.
- Success: `{"ok": true, "trace_id": "...", ...}` — exit code `0`
- Failure: `{"ok": false, "error": {"type": "...", "http_status": ..., "code": "...", "message": "..."}}` — exit code `1`
- **`trace_id`** appears on API-backed responses for support/debugging.
- **CRITICAL: Never guess why an error happened. Copy fields from `error` exactly.** Full shapes and edge cases: **references/parameters.md**.

**Error `type` values**

- `http_error` — API 4xx/5xx (`http_status`, `code`, `message`)
- `network_error` — Connection failure or timeout
- `parse_error` — Response is not valid JSON
- `client_error` — Local issues (missing token, bad path, validation)

**Main commands**

| Command | Purpose |
|---------|---------|
| `vidu-cli upload <image_path>` | Upload image → `upload_id`, `ssupload_uri` |
| `vidu-cli task submit --type ... --prompt ... [options]` | Submit task → `task_id`. `--image`: local path, URL, or `ssupload:?id=...` (auto-upload). `--video`: local path or `ssupload:?id=...` (character2video + 3.2_a only, auto-upload; URLs not supported). `--audio`: local path or `ssupload:?id=...` (character2video + 3.2_a only; URLs not supported). |
| `vidu-cli task get <task_id> [--output/-o <dir>]` | Query task → `state`, `type`, `model`; use `--output` to download media on success |
| `vidu-cli task compose --timeline <json> [--width N --height N] [--schedule-mode <mode>]` | Compose video from timeline → `task_id`. Query with `task get`. Supports `--schedule-mode` (auto-

README.md

# Vidu Skills

[中文文档](./README.zh.md)

Generate AI videos and images via the official Vidu API using `vidu-cli`.

## Capabilities

| Feature | Description |
|---------|-------------|
| Text-to-Image | Generate images from text, up to 1080p/2K/4K |
| Text-to-Video | Generate videos from text, up to 16s |
| Image-to-Video | One image + text → video |
| Head-Tail-to-Video | Start frame + end frame + text → video |
| Reference-to-Image | 1–7 images/materials + text → image |
| Reference-to-Video | 1–7 images/materials + text → video |
| Lip Sync | Drive video mouth movement with TTS or audio file |
| Text-to-Speech | Convert text to speech, 300+ voices, 20+ languages |
| Video Compose | Multi-track timeline (video/audio/subtitle/effect) → exported video |
| Create References | Create personal reference material elements |
| Search Community References | Search community-shared reference materials |
| Query Quota/Credits | Check claw-pass daily quota and user credit balance |
| Cost Estimation | Estimate task credit cost before submitting (video/image/TTS/lip-sync) |

## Install as Agent Skill

```bash
# Via npx skills (recommended, supports Claude Code, Cursor, Copilot, and 40+ agents)
npx skills add shengshu-ai/vidu-skills

# Via ClawHub (OpenClaw ecosystem)
clawhub install github:shengshu-ai/vidu-skills
```

## Install vidu-cli

Requires Node.js ≥ 14:

```bash
npm install -g vidu-cli@latest
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `VIDU_TOKEN` | Yes | Vidu API token |
| `VIDU_BASE_URL` | No | Default `https://service.vidu.cn` (mainland China); use `https://service.vidu.com` for overseas |
| `VIDU_DEBUG` | No | Set to `1` to print full response body to stderr |

## Quick Start

```bash
# Text-to-video
vidu-cli task submit \
  --type text2video \
  --prompt "A cat running through a meadow" \
  --model-version 3.2 \
  --duration 5 \
  --resolution 1080p

# Poll until success/failed
vidu-cli task get <task_id>

# Download result
vidu-cli task get <task_id> --output ./output
```

```bash
# Image-to-video
vidu-cli task submit \
  --type img2video \
  --prompt "slow camera push-in" \
  --image ./photo.jpg \
  --model-version 3.2 \
  --duration 5

# Text-to-speech
vidu-cli task tts \
  --prompt "Hello, welcome to Vidu" \
  --voice-id en_female_1

# List available voices
vidu-cli task tts-voices
```

## Command Reference

| Command | Purpose |
|---------|---------|
| `vidu-cli upload <image>` | Upload image, returns `upload_id` |
| `vidu-cli task submit --type ... --prompt ...` | Submit task, returns `task_id` |
| `vidu-cli task get <task_id> [--output dir]` | Query task status, optionally download result |
| `vidu-cli task compose --timeline <json>` | Video compose, returns `task_id` |
| `vidu-cli task lip-sync --video ... --text ...` | Lip sync (TTS mode) |
| `vidu-cli task lip-sync --video ... --audio ...` | Lip sync (audio file mode) |
| `vidu-cli task tts --prompt ... --voice-id ...` |

_meta.json

{
  "ownerId": "kn77zs5r59a889vwyfe9g7wmmn82vsr7",
  "slug": "vidu-skill",
  "version": "1.4.9",
  "publishedAt": 1777973791872
}

references/compose.md

# Video Compose Reference

Compose a multi-track timeline into a single exported video.

---

## CLI Commands

### Submit compose

```bash
vidu-cli task compose \
  --timeline <file_path_or_json_string> \
  [--width 1920] \
  [--height 1080] \
  [--schedule-mode <mode>]
```

All output flags are optional. If omitted, the server decides.

`--timeline` accepts either a JSON file path or an inline JSON string. The CLI auto-detects: if the argument starts with `{` or `[`, it is treated as inline JSON; otherwise as a file path. When using inline JSON in shell, wrap in single quotes to prevent shell interpretation: `--timeline '{"video_tracks":[...]}'`.

`--schedule-mode`: `claw_pass` (use daily quota) or `normal` (use credits). Optional — if omitted, auto-detected by querying claw-pass status: uses `claw_pass` when user has an active pass, otherwise `normal`.

Returns: `{"ok": true, "task_id": "...", "trace_id": "..."}`

### Query compose job

```bash
vidu-cli task get <task_id>
```

Uses the `task_id` returned by `task compose`. Same as querying any other task.

---

## media_url Rules

The CLI automatically normalizes `media_url` and `file_url` fields in the timeline before sending:

**media_url** (video/image clips):

| Input format | Behavior |
|---|---|
| `ssupload:?id=xxx` | Pass through |
| `http(s)://...` | Pass through (treated as valid remote URL) |
| Local file path | Upload → `ssupload:?id=...` |

**file_url** (subtitle files, e.g. .srt):

| Input format | Behavior |
|---|---|
| `ssupload:?id=xxx` | Pass through |
| `http(s)://...` | Pass through |
| Local file path | Upload → `ssupload:?id=...` |

For local files and http URLs (image/video), the CLI validates before upload:
- File size: image ≤ 50MB, video ≤ 500MB
- Dimensions: width and height must be 128–4096 px, short side ≤ 2160 px

---

## Limits

- Each track type (video, audio, subtitle, effect) is limited to 100 tracks maximum.

---

## Timeline JSON Schema

Top-level structure:

```json
{
  "video_tracks": [],
  "audio_tracks": [],
  "subtitle_tracks": [],
  "effect_tracks": []
}
```

### VideoTrack

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | Track type: set to `\"video\"` for standard video tracks |
| `main_track` | boolean | Whether this is the main track |
| `track_shorten_mode` | string | `AutoSpeed` — auto-accelerate when exceeding main track. Omit to use server default. |
| `track_expand_mode` | string | `AutoSpeed` — auto-decelerate when shorter than main track. Omit to use server default. |
| `video_track_clips` | VideoTrackClip[] | Clips on this track |

### VideoTrackClip

| Field | Type | Description |
|-------|------|-------------|
| `media_url` | string | Media reference (see media_url rules above) |
| `type` | string | `Video` (video file), `Image` (static image displayed for `duration` seconds), `GlobalImage` (background image spanning the entire timeline) |
| `x`, `y` | float | Position. [0-0.9999] = percentage of output dime

references/errors_and_retry.md

# Errors and Retry Strategy (vidu-cli)

CLI JSON shapes: **parameters.md** (canonical). This file focuses on **task lifecycle** and **retry** behavior.

---

## Task state lifecycle

Typical order: `created` → `queueing` → `preparation` → `scheduling` → `processing` → **`success`** or **`failed`** (or `canceled`).

Terminal states: **`success`**, **`failed`**, **`canceled`**. Do not treat other states as final.

---

## When `state` is `failed`

- **`err_code`**: Server-defined code (in `vidu-cli task get` response when available). Common codes include `INVALID_PROMPT_LENGTH`, `INSUFFICIENT_CREDITS`, `CONTENT_MODERATION`, `TASK_TIMEOUT`. Always report the exact code — do not interpret or translate.
- **`err_msg`**: Human-readable message when present.

Tell the user the task failed and pass through **`err_code`** / **`err_msg`**. Do not return media URLs.

---

## Polling results

The CLI does **not** block waiting for task completion: `vidu-cli task submit` returns `task_id` immediately; the caller must poll with **`vidu-cli task get <task_id>`** in a loop until a terminal state is reached.

**Recommended polling strategy**: poll every **3–5 seconds** for active tasks. For tasks expected to take longer (e.g. 16s video generation), start with a 5s interval and increase to 10s after the first minute.

- **`vidu-cli task get`** is read-only and safe to repeat (poll until terminal state or timeout).
- **`vidu-cli task get <task_id> --output <dir>`** downloads media files on success.

---

## Submit-time errors

### `ClawPassExplicitModeRequired`

Returned on submit when `--schedule-mode` is omitted (auto-detected as `claw_pass`) but the user's daily claw-pass quota is exhausted. This is a **4xx submit error** (appears in `error.code`), not a task-state failure. **Do not retry** — inform the user that their daily quota is used up. They can either wait for the next refresh or re-submit with `--schedule-mode normal` to use credits instead.

---

## Network and client errors (CLI `ok: false`)

- **4xx on submit**: Inspect `error.type`, `code`, `message`; fix parameters or token. **Do not retry** — 4xx errors indicate invalid input or authentication issues that won't resolve by retrying.
- **5xx or connection error on submit**: Retry with backoff (e.g. 1s, 2s, 4s), limited attempts (e.g. up to 3). If still failing, report the error to the user.
- **Upload / network errors** during image handling: Same idea — bounded retries, then surface **`error`** fields verbatim.
- **Timeouts on `task get`**: Retry once or twice with a 30-second timeout per request; if still failing, report that the result could not be fetched and suggest trying again later.

---

## Summary for agents

- Treat only **`success`** / **`failed`** / **`canceled`** as terminal (for task `state`).
- On **`failed`**: return **`err_code`** / **`err_msg`**, no media link.
- **No built-in wait**: the CLI returns immediately after submit; poll with **`vidu-cli task get`** every 3–5 seconds unti

Sponsored

Ads related to Vidu official video generation. Image to video / Text to video / Reference to video / Text to image / Reference to image / Video edit / Image edit and adjacent AI workflows.