Preface¶
When creating covers, posters, or short videos in environments like Cursor or Claude Code, the common practice is to separately open the Zhipu Open Platform webpage or write scripts to call CogView and CogVideoX. The conversation and generation tools are split into two steps, and prompts need to be reorganized repeatedly.
Below we introduce a community Skill on SkillHub called “Zhipu Free Text-to-Image and Text-to-Video” (coordinate @user_9aa92135/bigmodel-image-video, version 1.0.0). It wraps BigModel’s text-to-image and text-to-video capabilities into Agent-readable SKILL instructions and scripts, enabling the model to proactively follow the same workflow when the user asks to “make images”, “make videos”, or “design covers”.
What Is This¶
One-sentence positioning: An Agent Skill that generates image or video content from text prompts via the Zhipu BigModel (CogView / CogVideoX) API.
- Source: SkillHub Community (
community), categorydesign-media, publisheruser_9aa92135. - Problem solved: Converges visual needs such as “generate images / make videos / AI painting / create covers / design posters” into Skill trigger conditions and post-installation
SKILL.mdguidance. Even if the user doesn’t use the word “generate”, as long as they are creating or designing visual content (novel covers, product images, promotional images, short videos, etc.), the Skill description also requires the Agent to proactively enable it.
The SkillHub page indicates that an API Key needs to be configured (requires_api_key=true). SkillHub statistics (based on crawled data): rating 100000, downloads 6957, installs 113.
Core Features¶
The following capabilities are consistent with the official description and the Skill documentation of the same version, all centered around the BigModel interface:
- Text-to-Image: Calls the CogView series models to generate images based on prompts, with optional parameters for size and quality.
- Text-to-Video: Calls the CogVideoX series models to generate videos based on prompts (the documentation states that it supports video generation workflows including AI audio).
- Batch Generation: Supports submitting multiple prompts at once for batch image generation, with control over concurrency.
- Two entry points: script and library: The installation package provides the
scripts/generate.pycommand line, as well as functions likegenerate_image,batch_generate_images,generate_video, andwait_for_videoinlib/image_video.py(video generation is an asynchronous task, requiringwait_for_videoto poll for results).
The image models listed in the documentation include cogview-3-flash, cogview-4-250304, and cogview-4; the video models include cogvideox-flash, cogvideox-2, and cogvideox-3. Common output size examples: 1024x1024, 1024x1792, 1792x1024.
Installation and Activation¶
Install via SkillHub (Officially Recommended)¶
The SkillHub skill page requires installing this Skill according to the SkillHub Installation Instructions, with the coordinate @user_9aa92135/bigmodel-image-video.
- Confirm that the
skillhubCLI is already installed on your machine (if not installed, run the official installation script according to the installation documentation).
command -v skillhub && skillhub --version
- When installing, you must use
--dirto point to the current Agent’s skills directory; otherwise, it will default to./skills/and may not be recognized.
skillhub install user_9aa92135/bigmodel-image-video --dir <your skills directory>
Common paths for various clients (excerpted from the SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/in the project
After installation, restart or refresh the Agent to load the new Skill. You can also send the installation instructions to the AI and let it complete the installation according to https://skillhub.cn/install/skillhub.md.
Configure API Key¶
The Skill depends on the Zhipu BigModel Open Platform key. The documentation requires setting the environment variable BIGMODEL_API_KEY (apply at the Zhipu AI BigModel Open Platform).
Temporarily effective in the current shell:
export BIGMODEL_API_KEY=your_api_key_here
Long-term effective after writing to the shell configuration (the example is for zsh; bash users can change it to ~/.bashrc):
echo 'export BIGMODEL_API_KEY=your_api_key_here' >> ~/.zshrc
source ~/.zshrc
If not set, the script will usually prompt that BIGMODEL_API_KEY is required.
Typical Usage¶
After installation is complete, enter the directory where this Skill is located (or let the Agent operate according to SKILL.md). The following examples are reproducible commands from the v1.0.0 Skill documentation.
Command Line Script¶
Generate a single image:
python scripts/generate.py "A cute orange cat"
Generate a video:
python scripts/generate.py "Seaside sunset" --video
Batch image generation with space-separated multiple prompts:
python scripts/generate.py "Sunrise sunset starry sky rainbow" --batch
View parameter descriptions:
python scripts/generate.py --help
Vertical covers can specify dimensions, for example:
python scripts/generate.py "Chinese martial arts novel cover, ink painting style, distant mountains like dark eyebrows, clouds and mist swirling" --size 1024x1792
Short videos can specify duration (the example is 5 seconds):
python scripts/generate.py "A flower slowly blooming under the sunlight" --video --duration 5
Python Calling¶
In the Skill root directory, add lib to the path and call the wrapped functions:
import sys
sys.path.insert(0, "lib")
from image_video import generate_image, batch_generate_images, generate_video, wait_for_video
result = generate_image(
prompt="Describe content",
model="cogview-3-flash",
quality="standard",
size="1024x1024",
)
url = result["data"][0]["url"]
video = generate_video(prompt="Describe content", duration=5)
final = wait_for_video(video["id"])
video_url = final["video_result"][0]["url"]
For more complete parameter tables, prompt writing methods, and FAQs, see the installed SKILL.md, README.md, and documentation within lib/image_video.py.
Suitable Scenarios and Considerations¶
Who is it for
- Developers or creators who are already using Agents like Cursor / Claude Code and want to directly generate covers, posters, social media images, or short video drafts in conversations.
- Users who are willing to use the Zhipu BigModel API and can manage
BIGMODEL_API_KEYand call quotas themselves.
Usage Considerations
- Key and Costs:
requires_api_key=true, all generation goes through the official API, and you need to comply with Zhipu platform billing and rate limiting rules; do not commit the Key to the repository. - Community Source: The Skill is published by the community; you can check the version and description on the SkillHub page before installation; for production environments, it is recommended to first validate the effect and stability with small traffic.
- Path and Client: The
--dirofskillhub installmust correspond to the current Agent; different clients have different skills directories, and installing to the wrong directory will cause the Skill to not work. - Video Asynchronous: Video generation requires waiting for the task to complete; the documentation suggests simplifying prompts, switching to flash models, or checking the network when encountering failures.
- Quality and Speed: The documentation suggests first using
cogview-3-flash/cogvideox-flashto test the effect, and then usingcogview-4,cogvideox-3and--quality hdfor finalization.
Conclusion¶
“Zhipu Free Text-to-Image and Text-to-Video” integrates the common image and video generation workflows of CogView and CogVideoX into an Agent Skill: after installing to the corresponding skills directory and configuring BIGMODEL_API_KEY, you can use scripts or the Python library to generate visual materials in conversational tasks.
- SkillHub Page: https://www.skillhub.cn/skills/user_9aa92135/bigmodel-image-video
- Official Coordinate/API Entry: https://api.skillhub.cn/user_9aa92135/bigmodel-image-video
- Installation Instructions: https://skillhub.cn/install/skillhub.md