Image Generation
Z.ai Image
Zhipu Z.ai image generation — lightweight and fast, bilingual prompts, low latency and low cost
POST
Z.ai Image
Lightweight and fast image generation from Zhipu Z.ai, with strong support for both Chinese and English prompts. Low latency, low price — suited for high-frequency scenarios like batch sketches, operations creatives, and quick previews.
Per-image pricing. Pure text-to-image (no reference images), fixed at 1 image per call.
After submission, poll status with
Pricing
Examples
GET /v1/tasks/{task_id}. See Task System for details.
Available Models
Common Parameters
string
required
Choose one from the Available Models list
string
default:"generate"
Operation type.
z-image-turbo only supports generate (text-to-image)string
required
Image description. Strong support for both Chinese and English. Max 800 characters
integer
default:"1"
Number of images. This model is fixed at 1 image per call;
n > 1 is not supportedinteger
default:"-1"
Random seed.
-1 for random; a fixed value reproduces similar resultsstring
default:"1:1"
Aspect ratio. Options:
1:1— Square4:3/3:4— Standard landscape / portrait16:9/9:16— Widescreen landscape / portrait3:2/2:3— Camera ratio landscape / portrait
string
default:"1K"
Output resolution. Options:
1K / 2Kstring
Webhook callback URL, invoked when the task reaches a terminal state. See Callback Mechanism
string[]
Events to receive callbacks for. Defaults to terminal events only. See Callback Mechanism
Model-Specific Parameters
boolean
default:"false"
Smart prompt rewrite. When enabled, AI auto-optimizes the prompt for better results, but adds extra cost
Notes
- Single image per call —
nis fixed at 1; submit multiple tasks for multiple images - Prompt limit 800 characters — trim long prompts yourself
- Enabling
prompt_extendincreases cost — AI rewrite consumes extra inference cost; enable selectively for batch scenarios - Pure text-to-image — does not accept
image_urlsreference images; use other models for image-to-image
Resource Limits
Related Docs
- Task System — Task state machine / polling cadence / async push
- Request & Response — Common error codes / Headers / rate limits
- Authentication — API Key application and usage
Z.ai Image