Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,14 @@ All commands below are under `listenhub openapi`.

### Video

| Command | Description |
| ------------------------ | ---------------------------- |
| `openapi video create` | Create video generation task |
| `openapi video get <id>` | Get video task details |
| `openapi video list` | List video tasks |
| `openapi video estimate` | Estimate credit cost |
| Command | Description |
| --------------------------------- | --------------------------------------------- |
| `openapi video create` | Create video generation task |
| `openapi video get <id>` | Get video task details |
| `openapi video list` | List video tasks |
| `openapi video estimate` | Estimate credit cost |
| `openapi video pixverse generate` | Create a PixVerse video task (atomic + agent) |
| `openapi video pixverse estimate` | Estimate PixVerse credit cost |

### Content

Expand Down Expand Up @@ -294,6 +296,40 @@ listenhub openapi video create --prompt "Camera zooms out" \
listenhub openapi video estimate --model doubao-seedance-2-pro --resolution 1080p --duration 10
```

### OpenAPI: PixVerse video generation

PixVerse covers atomic capabilities (`text_to_video`, `image_to_video`, `transition`, `multi_transition`, `fusion`, `restyle`, `mimic`, `lip_sync`) and the marketing `agent` (`ad_master` / `promo_mix`). `--capability` is required. `--language en` (default) uses the international service; `--language zh` uses the China service. Image/video/audio assets accept an optional `:duration` suffix (`url:seconds`). For rarely-used nested fields use the `--pixverse-json` escape hatch.

```bash
# Text-to-video
listenhub openapi video pixverse generate --capability text_to_video \
--prompt "A cat playing piano" --quality 720p --aspect-ratio 16:9 --duration 5 --no-wait -j

# Image-to-video (assets accept url:duration)
listenhub openapi video pixverse generate --capability image_to_video \
--image https://example.com/photo.jpg --prompt "Camera slowly zooms in"

# Lip-sync TTS, reusing a prior succeeded PixVerse task
listenhub openapi video pixverse generate --capability lip_sync \
--source-task-id 6a2016607ebd26d050c585ca \
--lip-sync-tts --lip-sync-speaker-id speaker-1 --lip-sync-content "Hello world"

# Marketing agent (promo_mix needs >=4 product images)
listenhub openapi video pixverse generate --capability agent --agent-type promo_mix \
--quality 1080p --duration 30 \
--image https://example.com/p1.jpg --image https://example.com/p2.jpg \
--image https://example.com/p3.jpg --image https://example.com/p4.jpg

# Escape hatch for nested pixverse fields
listenhub openapi video pixverse generate --capability fusion \
--prompt "@hero stands in @bg" \
--pixverse-json '{"imageReferences":[{"type":"subject","imageUrl":"https://example.com/hero.png","refName":"hero"},{"type":"background","imageUrl":"https://example.com/bg.png","refName":"bg"}]}'

# Estimate credits
listenhub openapi video pixverse estimate --capability text_to_video --quality 720p --duration 5
listenhub openapi video pixverse estimate --capability agent --agent-type ad_master --duration 30
```

### OAuth: Music generation

```bash
Expand Down
48 changes: 42 additions & 6 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,14 @@ listenhub openapi subscription -j

### 视频

| 命令 | 说明 |
| ------------------------ | ---------------- |
| `openapi video create` | 创建视频生成任务 |
| `openapi video get <id>` | 查看视频任务详情 |
| `openapi video list` | 列出视频任务 |
| `openapi video estimate` | 预估积分消耗 |
| 命令 | 说明 |
| --------------------------------- | ------------------------------------------ |
| `openapi video create` | 创建视频生成任务 |
| `openapi video get <id>` | 查看视频任务详情 |
| `openapi video list` | 列出视频任务 |
| `openapi video estimate` | 预估积分消耗 |
| `openapi video pixverse generate` | 创建 PixVerse 视频任务(原子能力 + Agent) |
| `openapi video pixverse estimate` | 预估 PixVerse 积分消耗 |

### 内容提取

Expand Down Expand Up @@ -294,6 +296,40 @@ listenhub openapi video create --prompt "镜头缓缓拉远" \
listenhub openapi video estimate --model doubao-seedance-2-pro --resolution 1080p --duration 10
```

### OpenAPI:PixVerse 视频生成

PixVerse 支持原子能力(`text_to_video`、`image_to_video`、`transition`、`multi_transition`、`fusion`、`restyle`、`mimic`、`lip_sync`)和营销 `agent`(`ad_master` / `promo_mix`)。`--capability` 必填。`--language en`(默认)走国际站,`--language zh` 走国内站。图片、视频、音频素材可在 URL 后加 `:时长` 后缀(`url:秒数`)。少见的嵌套字段用 `--pixverse-json` 直接传 JSON。

```bash
# 文字生成视频
listenhub openapi video pixverse generate --capability text_to_video \
--prompt "一只猫在弹钢琴" --quality 720p --aspect-ratio 16:9 --duration 5 --no-wait -j

# 图片生成视频(素材支持 url:时长)
listenhub openapi video pixverse generate --capability image_to_video \
--image https://example.com/photo.jpg --prompt "镜头缓缓推近"

# 口型同步 TTS,复用已成功的 PixVerse 任务
listenhub openapi video pixverse generate --capability lip_sync \
--source-task-id 6a2016607ebd26d050c585ca \
--lip-sync-tts --lip-sync-speaker-id speaker-1 --lip-sync-content "你好世界"

# 营销 Agent(promo_mix 至少 4 张商品图)
listenhub openapi video pixverse generate --capability agent --agent-type promo_mix \
--quality 1080p --duration 30 \
--image https://example.com/p1.jpg --image https://example.com/p2.jpg \
--image https://example.com/p3.jpg --image https://example.com/p4.jpg

# 用 --pixverse-json 传嵌套字段
listenhub openapi video pixverse generate --capability fusion \
--prompt "@hero 站在 @bg 前" \
--pixverse-json '{"imageReferences":[{"type":"subject","imageUrl":"https://example.com/hero.png","refName":"hero"},{"type":"background","imageUrl":"https://example.com/bg.png","refName":"bg"}]}'

# 预估积分
listenhub openapi video pixverse estimate --capability text_to_video --quality 720p --duration 5
listenhub openapi video pixverse estimate --capability agent --agent-type ad_master --duration 30
```

### OAuth:音乐生成

```bash
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"prepublishOnly": "pnpm run build"
},
"dependencies": {
"@marswave/listenhub-sdk": "^0.0.13",
"@marswave/listenhub-sdk": "^0.0.15",
"commander": "^14.0.3",
"open": "^10.0.0",
"ora": "^8.0.0"
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading