Z Image API
Complete API reference for Z Image text-to-image generation.
Model Variants
This API supports one model variant:
Quick Comparison
Supported Aspect Ratios
The width:height pair must be one of:
1:1, 3:2, 2:3, 3:4, 4:3, 9:16, 16:9, 9:21
Z Image (Text-to-Image)
Endpoint
POST /api/v1/image/task
Request Parameters
Required
Optional
Example Request
javascript
Response Format
Submit response:
json
Poll with GET /api/v1/image/{task_id}. Task statuses: submitted, processing, succeed, failed.
Successful polling responses expose generated image URLs under data.task_result.images[].url.
Best Practices
- Use ratio values, not pixel dimensions, for
widthandheight. - Keep prompts descriptive but focused on subject, lighting, and composition.
- Use a fixed
seedwhen you want reproducible generations during testing.