Z.ai API
Z.ai API
Tool
zai_generate_image
Use CogView-4 series models to generate high-quality images from text prompts. `CogView-4-250304` is suitable for image generation tasks, with quick and accurate understanding of user text descriptions to let `AI` express images more precisely and personally.
Pricing
Per call
$0.02
Model
flat
Pay only for what you use. No subscriptions.
Inputs
model *
stringsize
stringprompt *
stringuser_id
stringquality
stringTry It
API
MCP Config
Input Parameters
Model code
Image size, default is `1024x1024`, recommended enum values: `1024x1024` (default), `768x1344`, `864x1152`, `1344x768`, `1152x864`, `1440x720`, `720x1440`. Custom parameter: Both width and height must be between `512px-2048px`, and must be divisible by `16`, and the maximum pixel count must not exceed `2^21px`.
The text description of the image to be generated.
Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters.
The quality of the generated image. Default is `standard`.

