Text or Voice to Video: Integrating Jimeng Text-to-Video in an Agent with a Single Prompt

Introduction

When creating short videos or presentation materials, the common workflow is: writing English prompts yourself, logging into Jimeng or similar platforms, and waiting for tasks to complete before copying the links. If you are already using Agents in Cursor, Claude Code, or OpenClaw to handle daily tasks, you might prefer to describe the scene in Chinese and have the skill automatically optimize the prompt and call the API to generate the video.

Below is an introduction to the SkillHub community skill @user_4a79ecd6/texttovideo (page name: “Text or Voice to Video”). It condenses “prompt optimization + Jimeng text-to-video” into a workflow that can be triggered within a conversation. Compared to simply manually filling in prompts on a webpage, the difference lies in the fixed trigger words and SKILL.md conventions on the Agent side, making it easy to state requirements directly in scenarios where OpenClaw is integrated into Feishu, WeChat, etc.

What is this

One-sentence positioning: Input a Chinese scene description, which is first processed by a large language model into an English, storyboard-style prompt suitable for Jimeng 3.0, then calls the Volcano Engine visual text-to-video API, and returns the video URL after asynchronous polling.

Maintenance and Source: SkillHub coordinates @user_4a79ecd6/texttovideo, category design-media, source community, current version 1.0.1, published by user_4a79ecd6 (page displays author as “阿霄”). The store tag includes requires_api_key=true; you need to configure the cloud-side API key yourself before use.

Naming Note: The store title includes “Voice” (语音), but the current 1.0.1 package’s SKILL.md and skill.json both focus on “Text to Video / text2video”. The implementation file is main.py with the text entry point run(user_input), and does not contain independent speech-to-text or voice-driven video logic. If you require voice input, you need to perform ASR on the Agent side first, then pass the text to this skill, or watch for future versions to see if voice capabilities are added.

Core Features

Based on the published skill package (SKILL.md, skill.json, and accompanying Python scripts), the verifiable capabilities are as follows.

  1. Prompt Optimization: Through Volcano Ark Chat Completions (model Doubao-2.0-Pro in code, endpoint https://ark.cn-beijing.volces.com/api/v3/chat/completions), convert colloquial Chinese descriptions into English prompts usable by Jimeng, constraining keywords related to image quality and camera movement.
  2. Text-to-Video: Calls the Volcano Engine Visual API (visual.cn-north-1.volcengineapi.com, actions SubmitVideoGenerationTask / GetVideoGenerationTask), supports configurable duration (default 5 seconds, code comments support 5/10 seconds) and aspect ratio (default 16:9, comments support 9:16, 1:1).
  3. Conversational Trigger: skill.json declares trigger phrases including “生成视频” (generate video), “帮我生成视频” (help me generate video), “制作视频” (make a video), “做一个视频” (make a video); in the OpenClaw ecosystem, tasks can be initiated via natural language with scene descriptions in Feishu/WeChat.
  4. Return Results: On success, returns video_url, the optimized optimized_prompt, and the original user_input; on failure, distinguishes between timeout and other exceptions (in main.py, about 1-2 minutes is the expected wait, with polling lasting up to about 200 seconds).

SKILL.md states the output is a high-definition video link; the implementation defaults Resolution to 720p (comments note it can be changed to 1080p for production), subject to the actual code and Jimeng account permissions.

Installation and Activation

Install SkillHub CLI (if not installed)

Check the CLI according to the SkillHub Installation Instructions:

command -v skillhub && skillhub --version

If not installed, you can execute the full installation (including default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

Install this Skill

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, it may default to ./skills/ and not be loaded by the client.

skillhub install texttovideo --namespace user_4a79ecd6 --dir <your skills directory>

You can also let the Agent install it via official prompts:

Please install `@user_4a79ecd6/texttovideo` based on https://skillhub.cn/install/skillhub.md.

Common skills directories (excerpted from SkillHub installation docs):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

Restart or refresh the skill list according to the requirements of each client after installation.

Dependencies and Environment Variables

Python dependencies are listed in the package’s requirements.txt:

requests>=2.28.0

skill.json declares the need for:

  • DEEPSEEK_API_KEY
  • JIMENG_API_KEY

The environment variables actually read by the current 1.0.1 source code are:

  • VOLC_ARK_API_KEY (Prompt optimization)
  • VOLC_ACCESS_KEY_ID, VOLC_SECRET_ACCESS_KEY (Jimeng / Volcano Visual API signature)

Before deployment, please configure the keys according to prompt_optimizer.py and video_generator.py, and ensure skill.json is consistent with the implementation to avoid runtime failures caused by only filling in the declared variables.

Typical Usage

In OpenClaw Conversation (Official Example)

Example phrasing given in SKILL.md:

帮我生成视频:一只猫在海边散步,夕阳西下,慵懒温暖的氛围
生成视频:夜晚城市街道,霓虹灯闪烁,人群涌动,赛博朋克风格

The Agent should route to the skill entry point run(user_input) in main.py. user_input is the scene description following the colon (or the whole sentence description you provide, subject to Agent parsing).

Skill Parameters (skill.json)

Parameter Type Required Description
user_input string Yes Video content description, e.g., “A cat walking on the beach, sunset”

Applicable Scenarios and Notes

Who it is for

  • Developers or operators already producing content in Agent / OpenClaw workflows who want to generate short video materials using Chinese descriptions + automatic English prompts.
  • Teams that already have permissions for Volcano Ark and Volcano Engine Visual (Jimeng) APIs and can accept asynchronous waiting (about 1-2 minutes, max polling about 200 seconds).

Limitations and Notes

  • API Key and Costs: Tag requires_api_key=true; calling Ark and Visual APIs will incur cloud-side usage and requires you to activate and pay for it yourself.
  • Name and Implementation: The store name includes “Voice”, but the current package focuses on text-to-video; do not assume built-in voice input.
  • Metadata and Code: Hub version is 1.0.1, but the version number inside skill.json is 1.0.0; when environment variable declarations are inconsistent with the Python implementation, prioritize the code and align them yourself.
  • Store Data (SkillHub page, as of scraping): Rating 100000, Downloads 1189, Installs 6; data changes over time, refer to the page for the latest.

Conclusion

@user_4a79ecd6/texttovideo encapsulates “Chinese Intent → Jimeng Prompt → Text-to-Video URL” into an Agent Skill, suitable for quickly producing videos with fixed trigger words in clients that have integrated SkillHub. Official entries:

  • Skill Page: https://www.skillhub.cn/skills/user_4a79ecd6/texttovideo
  • API Metadata: https://api.skillhub.cn/user_4a79ecd6/texttovideo
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye