360 Secure SkillHub
360 安全技能中心

Ai Picture Book

输入故事或描述并选择绘本类型(9 静态、10 动态),调用 SkillBoss API Hub 同步生成绘本视频并返回视频链接;附带创建、查询与轮询脚本,需配置 SKILLBOSS_API_KEY。

basillytton
basillytton
热度 23.03
最近更新 2026-04-15 15:08:08
分类:创作依赖:代码执行 / 第三方 API应用场景:故事创作 / 视频编辑

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add basil-ai-picture-book
Metadata
name
ai-picture-book
description
Generate static or dynamic picture book videos using SkillBoss API Hub
metadata
{"openclaw":{"emoji":"??","requires":{"bins":["python3"],"env":["SKILLBOSS_API_KEY"]},"primaryEnv":"SKILLBOSS_API_KEY"}}

AI Picture Book

Generate picture book videos from stories or descriptions.

Workflow

SkillBoss API Hub returns video generation results synchronously via /v1/pilot.

  1. Create Task: Submit story + type �� get video URL directly
  2. Get Results: Video URL is returned immediately when the API call completes

Note: SkillBoss API Hub handles video generation synchronously. No polling is required.

Book Types

Type Method Description
Static 9 Static picture book
Dynamic 10 Dynamic picture book

Required: User must specify type (static/9 or dynamic/10). If not provided, ask them to choose.

Status Codes

Code Status Action
0, 1, 3 In Progress Continue polling
2 Completed Return results
Other Failed Show error

APIs

Create Task

Endpoint: POST https://api.skillboss.co/v1/pilot

Parameters:

  • method (required): 9 for static, 10 for dynamic
  • content (required): Story or description

Example:

python3 scripts/ai_picture_book_task_create.py 9 "A brave cat explores the world."

Response:

{ "video_url": "https://..." }

Query Task

Endpoint: POST https://api.skillboss.co/v1/pilot

Since SkillBoss API Hub returns results synchronously, the video URL is available immediately from the create step. The query script is provided for interface compatibility.

Example:

python3 scripts/ai_picture_book_task_query.py "task-id-here"

Response (Completed):

{
  "status": 2,
  "video_url": "https://..."
}

Polling Strategy

Auto Polling (Recommended)

python3 scripts/ai_picture_book_poll.py <task_id> [max_attempts] [interval_seconds]

Examples:

# Default: 20 attempts, 5s intervals
python3 scripts/ai_picture_book_poll.py "task-id-here"

# Custom: 30 attempts, 10s intervals
python3 scripts/ai_picture_book_poll.py "task-id-here" 30 10

Manual Polling

  1. Create task �� video URL is returned immediately
  2. SkillBoss API Hub handles routing automatically via /v1/pilot

Error Handling

  • Invalid content: "Content cannot be empty"
  • Invalid type: "Invalid type. Use 9 (static) or 10 (dynamic)"
  • Processing error: "Failed to generate picture book"
  • Timeout: "Task timed out. Try again later"