Image Generation
jjyaoao/HelloAgents
Implement AI image generation capabilities using the z-ai-web-dev-sdk.
Official skill for generating high-quality images from text prompts using ZhiPu GLM-Image API.
$ npx skills add zai-org/GLM-skills --skill glm-image-gen -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install zai-org/GLM-skills glm-image-gen --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/zai-org/GLM-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/glm-image-gen .claude/skills/glm-image-gen && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "glm-image-gen" agent skill from https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-gen into .claude/skills/glm-image-gen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "glm-image-gen", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-genType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add zai-org/GLM-skills --skill glm-image-gen -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install zai-org/GLM-skills glm-image-gen --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/GLM-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/glm-image-gen .agents/skills/glm-image-gen && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "glm-image-gen" agent skill from https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-gen into .agents/skills/glm-image-gen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "glm-image-gen", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zai-org/GLM-skills --skill glm-image-gen -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install zai-org/GLM-skills glm-image-gen --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/GLM-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/glm-image-gen .cursor/skills/glm-image-gen && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "glm-image-gen" agent skill from https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-gen into .cursor/skills/glm-image-gen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "glm-image-gen", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/zai-org/GLM-skills.git --path skills/glm-image-gen--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add zai-org/GLM-skills --skill glm-image-gen -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install zai-org/GLM-skills glm-image-gen --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/GLM-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/glm-image-gen .gemini/skills/glm-image-gen && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "glm-image-gen" agent skill from https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-gen into .gemini/skills/glm-image-gen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "glm-image-gen", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install zai-org/GLM-skills glm-image-genInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add zai-org/GLM-skills --skill glm-image-gen -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/zai-org/GLM-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/glm-image-gen .github/skills/glm-image-gen && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "glm-image-gen" agent skill from https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-gen into .github/skills/glm-image-gen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "glm-image-gen", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zai-org/GLM-skills --skill glm-image-gen -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install zai-org/GLM-skills glm-image-gen --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zai-org/GLM-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/glm-image-gen .opencode/skills/glm-image-gen && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "glm-image-gen" agent skill from https://github.com/zai-org/GLM-skills/tree/main/skills/glm-image-gen into .opencode/skills/glm-image-gen/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "glm-image-gen", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
glm-image-genOfficial skill for generating high-quality images from text prompts using ZhiPu GLM-Image API.
Glm Image Gen is an agent skill from zai-org/GLM-skills. Official skill for generating high-quality images from text prompts using ZhiPu GLM-Image API. Excellent at scientific illustrations, high-quality portraits, social media graphics, and commercial posters. Supports multiple aspect ratios, HD quality, and watermark control. Use this skill when the user wants to generate images, create AI art, text-to-image, or convert text descriptions into visual content.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/glm_image_cli.py`).
It sits in Media & Creative, covering Image generation. It works with Zhipu GLM. The repository describes itself as: Official skills for the GLM family of models. The licence is Apache-2.0.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2ecd31c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
bigmodel.cnopen.bigmodel.cnAlso links to:
docs.bigmodel.cnFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
ZHIPU_API_KEYMISSING_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Glm Image Gen loads about 2.9k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 872 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from zai-org/GLM-skills at commit 2ecd31c, republished under its Apache-2.0 licence (© zai-org). 872 words, ~2,858 tokens.
.claude/skills/glm-image-gen/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Generate high-quality images from text prompts using the ZhiPu GLM-Image API.
| Resource | Link |
|---|---|
| Get API Key | 智谱开放平台 API Keys |
| API Docs | Image Generation / 图像生成 |
| Model Docs | GLM-Image 模型文档 |
脚本通过 ZHIPU_API_KEY 环境变量获取密钥,可与其他智谱技能复用同一个 key。
This script reads the key from the ZHIPU_API_KEY environment variable. Reusing the same key across Zhipu skills is optional.
Get Key / 获取 Key: Visit 智谱开放平台 API Keys to create or copy your key.
Setup options / 配置方式(任选一种):
Global config (recommended) / 全局配置(推荐): Set once in openclaw.json under env.vars, all Zhipu skills will share it:
{
"env": {
"vars": {
"ZHIPU_API_KEY": "你的密钥"
}
}
}Skill-level config / Skill 级别配置: Set for this skill only in openclaw.json:
{
"skills": {
"entries": {
"glm-image-generation": {
"env": {
"ZHIPU_API_KEY": "你的密钥"
}
}
}
}
}Shell environment variable / Shell 环境变量: Add to ~/.zshrc:
export ZHIPU_API_KEY="你的密钥"
💡 如果你已为其他智谱 skill(如
glmocr、glmv-caption)配置过 key,它们共享同一个ZHIPU_API_KEY,无需重复配置。
ZHIPU_API_KEY (required / 必需)https://open.bigmodel.cn/api/paas/v4/images/generations⛔ MANDATORY RESTRICTIONS / 强制限制 ⛔
python scripts/glm_image_cli.pyAfter running the script, present the generation result clearly.
⚠️ Image Display / 图片展示注意:
The API returns a temporary image URL (valid for 30 days). You should:
python scripts/glm_image_cli.py --prompt "一只可爱的小猫咪,坐在阳光明媚的窗台上,背景是蓝天白云"python scripts/glm_image_cli.py --prompt "赛博朋克风格的城市夜景" --size 1568x1056python scripts/glm_image_cli.py --prompt "中国山水画风格,远山近水,云雾缭绕" --quality hdpython scripts/glm_image_cli.py --prompt "商业设计素材" --no-watermarkpython scripts/glm_image_cli.py --prompt "中国水墨画风格" --save image.png
python scripts/glm_image_cli.py --prompt "赛博朋克城市" --size 1728x960 --save ~/Pictures/cyberpunk.pngpython scripts/glm_image_cli.py --prompt "..." --user-id "user_12345"python scripts/glm_image_cli.py --prompt "..." --model glm-image
python scripts/glm_image_cli.py --prompt "..." --model cogview-4python {baseDir}/scripts/glm_image_cli.py --prompt TEXT [--model MODEL] [--size SIZE] [--quality QUALITY] [--no-watermark] [--user-id ID] [--save FILE]| Parameter | Required | Description |
|---|---|---|
--prompt, -p | Yes | Text description of the desired image / 图片的文本描述 |
--model, -m | No | Model: glm-image (default), cogview-4, cogview-3-flash / 模型 |
--size, -s | No | Image size (default: 1280x1280) / 图片尺寸 |
--quality, -q | No | Quality: hd (default) or standard / 质量 |
--no-watermark | No | Disable watermark (requires signed disclaimer) / 关闭水印 |
--user-id | No | End-user ID for content moderation (6-128 chars) / 终端用户 ID |
--save | No | Save generated image to local file / 保存生成的图片到本地文件 |
GLM-Image recommended sizes:
| Size | Aspect Ratio | Use Case |
|---|---|---|
| 1280x1280 | 1:1 | Square (default) |
| 1568×1056 | 3:2 | Landscape / 横向 |
| 1056×1568 | 2:3 | Portrait / 纵向 |
| 1472×1088 | ~4:3 | Wide landscape |
| 1088×1472 | ~3:4 | Tall portrait |
| 1728×960 | 16:9 | Ultra-wide landscape |
| 960×1728 | 9:16 | Ultra-tall portrait |
Custom sizes / 自定义尺寸:
Official API Response:
{
"created": 123,
"data": [
{
"url": "<string>"
}
],
"content_filter": [
{
"role": "assistant",
"level": 1
}
]
}CLI Output Format:
{
"ok": true,
"model": "glm-image",
"image_url": "https://open.bigmodel.cn/.../generated_image.png",
"prompt": "一只可爱的小猫咪,坐在阳光明媚的窗台上,背景是蓝天白云",
"size": "1280x1280",
"quality": "hd",
"created": 1710835200,
"content_filter": [
{
"role": "assistant",
"level": 3
}
],
"saved_file": "/Users/xxx/image.png",
"error": null
}Key fields:
ok — whether generation succeededmodel — model used for generationimage_url — extracted from data[0].url, temporary URL (valid 30 days)prompt — the text prompt usedsize — generated image dimensionsquality — hd or standardcreated — Unix timestamp when request was createdcontent_filter — content safety analysis array (may be empty)role: where the issue was detected (user/assistant/history)level: severity 0-3 (0 = most severe, 3 = minor)saved_file — absolute path to saved local file (if --save was used)error — error details on failureThe API includes content filtering. If issues are detected, content_filter will contain entries with:
role: where the issue was detected (user/assistant/history)level: severity 0-3 (0 = most severe, 3 = minor)If level 0-1 detected: Generation will fail, show error to user. If level 2-3 detected: Generation may succeed, but warn user about potential issues.
API key not configured:
{
"ok": false,
"error": {
"code": "MISSING_API_KEY",
"message": "ZHIPU_API_KEY not configured. Get your API key at: https://bigmodel.cn/usercenter/proj-mgmt/apikeys"
}
}→ Show exact error to user, guide them to configure
Authentication failed (401/403):
{
"ok": false,
"error": {
"code": "authentication_error",
"message": "令牌已过期或验证不正确",
"status": 401
}
}→ API key invalid/expired → reconfigure
Rate limit (429):
{
"ok": false,
"error": {
"code": "rate_limit_exceeded",
"message": "API rate limit exceeded. Please try again later.",
"status": 429
}
}→ Quota exhausted → inform user to wait or check quota
Content filter violation:
{
"ok": false,
"error": {
"code": "content_filter_violation",
"message": "Content safety check failed",
"status": 400
}
}→ Explain that the prompt may contain inappropriate content
Invalid size:
{
"ok": false,
"error": {
"code": "INVALID_SIZE",
"message": "Invalid size: 512x512 for model glm-image. Must be multiple of 32, 1024-2048px, max 2^22 pixels"
}
}→ Guide user to use valid size from the supported list
Download failed:
{
"ok": false,
"error": {
"code": "DOWNLOAD_FAILED",
"message": "Failed to download image to image.png"
}
}→ Check file path permissions and disk space
Network error:
{
"ok": false,
"error": {
"code": "NETWORK_ERROR",
"message": "Network error: [Errno 8] nodename nor servname provided, or not known"
}
}→ Check internet connection
Good prompts:
Avoid:
© zai-org, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (scripts) in skills/glm-image-gen of zai-org/GLM-skills.
Open the folder on GitHubat commit 2ecd31c
Glm Image Gen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Glm Image Gen this skillzai-org/GLM-skills | 476 | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Image Generationjjyaoao/HelloAgents | 3.2k | 1 repos | ~3.8k | Automated safety check: Pass | MIT | |
| Image EditAli-Marandi/Web-Scraper-Framework | 107 | — | ~6.2k | Automated safety check: Pass | MIT | |
| Image Genopen-octo/octo-agent | 125 | — | ~3.1k | Automated safety check: Notes | MIT | |
| Baoyu Image GenJimLiu/baoyu-skills | 26k | 1 repos | ~5.3k | Automated safety check: Notes | MIT | |
| Baoyu Imagineguanyang/open-agent-hub | 977 | — | ~4.6k | Automated safety check: Notes | MIT |
jjyaoao/HelloAgents
Implement AI image generation capabilities using the z-ai-web-dev-sdk.
Ali-Marandi/Web-Scraper-Framework
Implement AI image editing and modification capabilities using the z-ai-web-dev-sdk.
open-octo/octo-agent
Acquire images as files — generate them with an AI image model (14 providers: OpenAI/gpt-image, Gemini, Qwen, Zhipu, Volcengine, Stability, FLUX, Ideogram, MiniMax, and more), search openly-licensed…
JimLiu/baoyu-skills
AI image generation with OpenAI GPT Image 2.5, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs.
guanyang/open-agent-hub
AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream and Replicate APIs.
zhayujie/CowAgent
Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.
zai-org/GLM-skills
Extract text from images using GLM-OCR API. An agent skill from zai-org/GLM-skills.
zai-org/GLM-skills
Official skill for recognizing and extracting mathematical formulas from images and PDFs into LaTeX format using ZhiPu GLM-OCR API.
zai-org/GLM-skills
Official skill for recognizing handwritten text from images using ZhiPu GLM-OCR API.
zai-org/GLM-skills
Official skill for recognizing and extracting tables from images and PDFs into Markdown format using ZhiPu GLM-OCR API.
zai-org/GLM-skills
Generate captions (descriptions) for images, videos, and documents using ZhiPu GLM-V multimodal model series.
zai-org/GLM-skills
Write a textual content based on given document(s) and requirements, using ZhiPu GLM-V multimodal model.
Works with
Categories
Official skill for generating high-quality images from text prompts using ZhiPu GLM-Image API. Glm Image Gen is an agent skill from zai-org/GLM-skills. Official skill for generating high-quality images from text prompts using ZhiPu GLM-Image API.
Glm Image Gen fits situations like: the user wants to generate images; convert text descriptions into visual content.
Run `npx skills add zai-org/GLM-skills --skill glm-image-gen -a claude-code`. Or copy the skill folder (skills/glm-image-gen in zai-org/GLM-skills) into .claude/skills/glm-image-gen in your project. Claude Code loads it when a task matches its description.
Run `npx skills add zai-org/GLM-skills --skill glm-image-gen -a codex`. Or copy the skill folder (skills/glm-image-gen in zai-org/GLM-skills) into .agents/skills/glm-image-gen in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zai-org/GLM-skills --skill glm-image-gen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/glm-image-gen, .gemini/skills/glm-image-gen, .github/skills/glm-image-gen and .opencode/skills/glm-image-gen in your project.
Going by SKILL.md and its folder, Glm Image Gen needs Python for the scripts in its folder, the command-line tools its instructions call (python) and credentials named ZHIPU_API_KEY and MISSING_API_KEY. Our summary lists: Python 3; A credential in ZHIPU_API_KEY; A credential in MISSING_API_KEY.
SKILL.md names 3 domains. In commands or code: bigmodel.cn and open.bigmodel.cn; the agent is likely to contact these when it follows the instructions. As links in the text: docs.bigmodel.cn. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Glm Image Gen is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Glm Image Gen: Image Generation (jjyaoao/HelloAgents, 3.2k stars), Image Edit (Ali-Marandi/Web-Scraper-Framework, 107 stars), Image Gen (open-octo/octo-agent, 125 stars) and Baoyu Image Gen (JimLiu/baoyu-skills, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
zai-org (a GitHub organization) maintains it in zai-org/GLM-skills, which has 476 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on April 15, 2026.
Source: zai-org/GLM-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.