Zai Generate Image
zai_generate_imageUse 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.
When to Use
Use this tool when you need to 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.. This is part of the Z.ai API provider on xpay✦.
MCP Connection
Connect to xpay✦ to access this tool (and 9+ others):
{
"mcpServers": {
"xpay": {
"url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
}
}
}
For Claude Code:
claude mcp add --transport http xpay "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
How to Execute
Use the xpay✦ meta-tools to run this tool:
xpay_details— Get full input schema:xpay_details("zai/zai_generate_image")xpay_run— Execute:xpay_run("zai/zai_generate_image", { ...inputs })
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model code |
size | string | No | 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. |
prompt | string | Yes | The text description of the image to be generated. |
user_id | string | No | 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. |
quality | string | No | The quality of the generated image. Default is standard. |
Pricing
- Cost: $0.02/call
- Balance check: Use
xpay_balanceto check remaining credits - Get your API key at xpay.tools — $5 free credits included
Related Skills
- Z.ai API (all tools) — 10 tools
- Zai Web Reader — $0.02/call
- Zai File Upload — $0.02/call
- Zai Chat Completion — $0.02/call
- Zai Retrieve Result — $0.01/call
- Zai Conversation History — $0.02/call
Links
- Tool page: https://xpay.tools/zai/zai-generate-image/
- Provider: https://xpay.tools/zai/
- All tools: https://xpay.tools/explore
How to Execute
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model code |
size | string | No | 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`. |
prompt | string | Yes | The text description of the image to be generated. |
user_id | string | No | 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. |
quality | string | No | The quality of the generated image. Default is `standard`. |
Install Skill
Pricing
Cost
$0.02/call
Model
Flat rate
Provider
Z.ai API

