Logoglmimage.blog
HomeBlogGuidesPrompts
Z.ai API Quick Start + Parameter Cheatsheet
2026/01/11

Z.ai API Quick Start + Parameter Cheatsheet

Generating images via GLM-Image using the official Z.ai API—includes curl and Python examples, sizing rules, quality modes, and best practices.

Endpoint and Minimal curl Request

The Z.ai image generation endpoint is: POST https://api.z.ai/api/paas/v4/images/generations (Z.AI)

curl --request POST \
  --url https://api.z.ai/api/paas/v4/images/generations \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "glm-image",
    "prompt": "A clean poster with Headline Spring Sale and CTA Buy Now",
    "size": "1280x1280",
    "quality": "hd"
  }'

The response returns a downloadable image URL. (Z.AI)

Parameter Cheatsheet (Most Used)

model

  • "glm-image" (Z.AI)

size

  • e.g., 1280x1280 (Z.AI)
  • Custom Sizing: Width/Height should be between 1024–2048 and multiples of 32 based on API references. (Z.AI)

quality

  • hd (more detail, slower ~20s)
  • standard (faster ~5-10s) (Z.AI)

Production Tips

  • Validate size on your server-side (range + divisibility by 32).
  • Implement retries for transient failures.
  • Store the returned URL or download immediately for CDN/cache.
All Posts

Author

avatar for GLMImage.blog
GLMImage.blog

Categories

  • GLM-Image
  • Technical Architecture
Endpoint and Minimal curl RequestParameter Cheatsheet (Most Used)modelsizequalityProduction Tips

More Posts

Menu Test: Why GLM-Image Beats Diffusion Models at Legible Pricing

Menu Test: Why GLM-Image Beats Diffusion Models at Legible Pricing

A practical menu benchmark you can run at home—testing price readability, alignment, and typography using GLM-Image with a clear scoring rubric.

avatar for GLMImage.blog
GLMImage.blog
2026/01/08
ComfyUI Status Tracker: When Native Support Lands

ComfyUI Status Tracker: When Native Support Lands

Track GLM-Image support in ComfyUI—where to watch, what “native support” means, and stopgap workflows until it lands.

avatar for GLMImage.blog
GLMImage.blog
2026/01/03
GLM-Image for Posters: 10 Prompt Templates That Actually Render Text

GLM-Image for Posters: 10 Prompt Templates That Actually Render Text

A practical prompt library for poster design with legible typography using GLM-Image—layout recipes, font controls, and 10 copy-paste templates.

avatar for GLMImage.blog
GLMImage.blog
2026/01/09
Logoglmimage.blog

The definitive guide and resource for GLM-Image. Master Zhipu AI's image generation with expert prompts, technical guides, and creative workflows.

Resources

  • Guides
  • Prompts
  • Blog
  • Feedback

Legal

  • Cookie Policy
  • Privacy Policy
  • Terms of Service

© 2026 • glmimage.blog All rights reserved.

GitHubGitHub