Back to models
GLM-Image
Zhipu AI's 16B hybrid image model combining a 9B autoregressive generator with a 7B DiT glyph-aware decoder for knowledge-intensive scenes, dense text rendering, and image editing.
What you can do
- Educational diagram and poster synthesis
- Dense bilingual typography rendering
- Subject-consistent image editing and restyling
Input & output
- Input
- Knowledge-rich text prompts and optional reference images for editing or subject consistency
- Output
- Generated or edited images with accurate dense Chinese/English typography
Try a prompt like this
A clean modern botanical infographic poster titled "中国二十四节气 · 春分" showing swallow, willow branch, and vernal equinox sun-earth diagram with crisp Chinese labels.
Things to know
MIT licensed (Apache 2.0 tokenizer components); dual 9B AR + 7B DiT pipeline requires ~34–40GB VRAM in BF16 and has higher latency than pure step-distilled diffusion models.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/images/generations- Model repo ID
ZhipuAI/GLM-Image
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
result = client.images.generate(
model="ZhipuAI/GLM-Image",
prompt="A clean modern botanical infographic poster titled \"中国二十四节气 · 春分\" showing swallow, willow branch, and vernal equinox sun-earth diagram with crisp Chinese labels.",
size="1024x1024",
)
print(result.data[0].url)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide