Ai picture book

From lxyeternal/MalSkillBench · View interactive version

Ai picture book is an AI agent skill from the GitHub repository lxyeternal/MalSkillBench. The AI picture book tool is provided by Baidu and can generate static and dynamic picture book videos based on the content described by users

How to use this skill

Skill file

AI Picture Book Generation

This skill allows OpenClaw agents to generate AI picture book, Based solely on a story or description provided by the user.

Setup

  1. API Key: Ensure the BAIDU_API_KEY environment variable is set with your valid API key.
  2. Environment: The API key should be available in the runtime environment.
  3. BAIDU_API_KEY: BAIDU_API_KEY available, need to go to the baidu cloud platform(https://login.bce.baidu.com) registered account, if you already have account will go to get the API KEY (https://console.bce.baidu.com/qianfan/ais/console/apiKey)

API table

| name | path | description |

|------------|---------------------------------|---------------------------------------|

|AIPictureBookTaskCreate|/v2/tools/ai_picture_book/task_create|Create AI pictrue book task based on a story or description provided by the user|

|AIPictureBookTaskQuery| /v2/tools/ai_note/query |Query AI pictrue book task result based on task id|

Workflow

  1. The AIPictureBookTaskCreate API executes the Python script located at scripts/ai_picture_book_task_create.py
  2. The AIPictureBookTaskQuery API executes the Python script located at scripts/ai_picture_book_task_query.py
  3. The first step ,call the AIPictureBookTaskCreate API to create a task and get the task ID, must give the type of picture book(9 or 10) and a story or description of thing.
  4. The second step ,call the AIPictureBookTaskQuery API to query the task result based on the task ID.
  5. Repeat the second step until the task status is completed.The task success identifier is status=2. status=0,1 or 3 indicates that the task is in progress. All other status codes are failures
  6. Once the task is completed, the result can be found video_bos_url and video_cdn_url in the task query result.

APIS

AIPictureBookTaskCreate API

Parameters
Example Usage
BAIDU_API_KEY=xxx python3 scripts/ai_picture_book_task_create.py 9 "This is a story about a little girl who loves to read books."

AIPictureBookTaskQuery API

Parameters
Example Usage
BAIDU_API_KEY=xxx python3 scripts/ai_picture_book_task_query.py "26943ed4-f5a9-4306-a05b-b087665433a0"
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.