Zhipu Image and Video Generation Skill: Integrating Text-to-Image and Image-to-Video into Agent Workflows

Introduction

In environments like Cursor and Claude Code, models themselves typically cannot directly produce downloadable images or short videos. A common approach is to consult the Zhipu Open Platform documentation, assemble HTTP requests, handle asynchronous tasks, and save files locally—steps are scattered and do not facilitate the Agent’s repeated calls according to a unified specification.

Below is the “Zhipu Image and Video Generation” (package name glm-image-gen-pro) on SkillHub. It encapsulates Zhipu’s image and video capabilities into a standard SKILL.md skill package. The Agent reads the instructions and then drives the built-in CLI scripts to complete the generation.

What This Is

“Zhipu Image and Video Generation” is a SkillHub community skill, coordinated as @user_3cce866c/glm-image-gen-pro, with the official entry:

https://api.skillhub.cn/user_3cce866c/glm-image-gen-pro

It belongs to the design-media category in SkillHub. Community metrics from the clue data are: rating 99838, 618 downloads (as of the time of writing, provided by task clues).

The SkillHub platform’s evaluation summary of the package’s documentation and scripts indicates: this skill is based on Zhipu AI’s official API (documentation and calls point to the domestic domain open.bigmodel.cn). It covers text-to-image and video generation (including the base64 direct upload path for local image-to-video conversion) through scripts/glm_image_cli.py and scripts/glm_video_cli.py respectively, with supporting Chinese README.md / SKILL.md, pricing explanations, and FAQs.

Core Features

The following capabilities come from the SkillHub public evaluation interface’s summary of the SKILL.md and script logic within the package (skillhub skill evaluation glm-image-gen-pro --namespace user_3cce866c), not speculation:

  1. Text-to-Image: Supports multiple model selections; evaluations explicitly mention glm-image, cogview-4, cogview-3-flash; supports size validation (e.g., glm-image requires width and height between 1024–2048px and being a multiple of 32), quality (hd / standard), watermark toggle, and optional user_id for content-side identification.
  2. Video Generation: Supports text-to-video and image-to-video; image-to-video can submit local images in base64 without first uploading to the public internet. The video side is an asynchronous task, with the script containing polling and download logic; evaluations mention that the video model includes CogVideoX-2, with a default maximum wait time of approximately 600 seconds, a polling interval of approximately 30 seconds, and a typical wait time for the final video of approximately 60–90 seconds.
  3. Keys and Configuration: Loads the Zhipu API Key via environment variables or configuration files (evaluations uniformly describe this as ZHIPU_API_KEY and load_zhipu_key logic); structured error codes exist for scenarios such as missing keys, rate limiting, content moderation, and timeouts (e.g., MISSING_API_KEY, RATE_LIMIT, CONTENT_FILTER, TIMEOUT).
  4. Documentation and Compliance: SKILL.md contains prompt techniques, parameter tables, error handling, and explanations related to watermark removal (evaluations mention that watermark-free capabilities need to be handled according to the Open Platform’s “Personal Center → Security Management → Watermark Removal Management” process). The security scanning conclusion is dual-lab cross-validation with no P0/P1 level risks (also from the above evaluation interface).

Installation and Activation

Install via Agent Conversation

For general SkillHub installation instructions, see skillhub.cn/install/skillhub.md. You can give the following prompt to the current Agent (when installing, point --dir to the skills directory of the current client):

Please install `@user_3cce866c/glm-image-gen-pro` according to https://skillhub.cn/install/skillhub.md.
Use Cursor's ~/.cursor/skills/ for the installation directory (or the skills path corresponding to my current Agent).

Using the SkillHub CLI

If skillhub is already installed on the local machine, first confirm CLI availability, then execute the installation:

command -v skillhub && skillhub --version

Example of installing to Cursor’s default skills directory:

skillhub install glm-image-gen-pro --namespace user_3cce866c --dir ~/.cursor/skills/

Claude Code commonly uses ~/.claude/skills/; Codex commonly uses ~/.codex/skills/ or .agents/skills/ under the project. Path differences should follow Section 4 of the installation documentation.

Configure API Key

The evaluation report describes: keys can be injected via environment variables or configuration files, with the variable name ZHIPU_API_KEY. After creating a Key on the Zhipu Open Platform, export this variable at least in the environment where the generation script is run, or write it to the configuration file path described in the skill package documentation (specific fields are based on the SKILL.md after installation).

export ZHIPU_API_KEY="your Zhipu Open Platform API Key"

Installation Status Notes (Tested at the Time of Writing)

As of the verification on 2026-10-21: skillhub install can resolve @user_3cce866c/glm-image-gen-pro, but the download address https://api.skillhub.cn/api/v1/download?slug=glm-image-gen-pro&namespace=user_3cce866c returns HTTP 404; the corresponding skill page on skillhub.cn shows “Skill not found”. If you encounter the same situation, you need to confirm on SkillHub whether the version has been restored, or contact the publisher before installing.

Typical Usage

After successful installation and configuration of ZHIPU_API_KEY, the Agent should follow the process in the package’s SKILL.md to call the scripts, rather than “drawing” on its own or bypassing the API.

Text-to-Image

Both evaluations and the package structure point to scripts/glm_image_cli.py. The CLI design includes parameters such as --prompt / -p, --size / -s, --quality / -q, --no-watermark, --user-id, --save; the image request side has approximately 120 seconds of timeout control. Specific command line examples and default optional size enumerations are based on the SKILL.md after installation.

Image-to-Video / Text-to-Video

The video path is handled by scripts/glm_video_cli.py: after creating an asynchronous task, poll the status, and download to the local machine when completed. Evaluations indicate that video generation depends on the zhipuai SDK. If the documentation does not clearly state the dependencies, after installation, first supplement the Python dependencies according to SKILL.md or README.md before executing.

Trigger Methods in Conversation

Simply describe the visual requirements to the Agent, for example: “Use Zhipu to generate a 16:9 product concept image” or “Turn this local PNG into a 5-second promotional short video”. The skill package should actively read SKILL.md when it matches image or video generation intents, execute the corresponding scripts, and present the returned URLs or local file paths to you.

Use Cases and Notes

Who It Suits

  • Students who already use the Zhipu Open Platform and want to uniformly complete posters, illustrations, and short video materials within Agent sessions.
  • Teams that need a domestically directly accessible open.bigmodel.cn endpoint and want the script layer to encapsulate polling, downloading, and error codes.

Limitations and Pitfalls

  • Installation Availability: At the time of writing, the community package download returns 404, and the web entry is unavailable; please verify whether skillhub install can succeed before proceeding.
  • Time Consumption: HD text-to-image evaluation mentions approximately 20 seconds; video typically requires a 1–2 minute wait, and tolerance for asynchronous polling is needed.
  • Costs and Models: SKILL.md contains model and price comparison tables, billed per use; review the documentation before selection to avoid mistakenly using high-priced models.
  • Content Moderation: When CONTENT_FILTER is triggered, adjust the prompt rather than repeatedly retrying the same violating description.
  • No Batch or Weak Retry: Evaluations indicate that batch image generation and automatic retry are missing; network fluctuations may require manual re-running.
  • Duplicate Paths in Package: Evaluations mention that scripts/ and glm/scripts/ may have duplicate files; use the entry specified by SKILL.md as the standard.

Conclusion

“Zhipu Image and Video Generation” consolidates Zhipu’s text-to-image, image-to-video, and key configuration into a SkillHub skill package. It is suitable for developers who want to incorporate multimedia output into Agent workflows without manually writing APIs each time. The community coordinate is @user_3cce866c/glm-image-gen-pro, and the official address is:

https://api.skillhub.cn/user_3cce866c/glm-image-gen-pro

For installation and client path instructions, you can also refer to the SkillHub installation documentation.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye