Z Ai Cogview 4
Playground
Try it on WavespeedAI!Z-AI CogView-4 generates high-quality images from text prompts with a quick and accurate understanding of user descriptions, letting AI express images more precisely and personally. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
Features
Z.AI CogView-4 Text-to-Image
CogView-4 is Z.AI’s high-quality text-to-image generation model designed to transform natural-language descriptions into precise, personalized visuals. It excels at interpreting user intent — producing images that accurately reflect your creative vision with strong compositional clarity and visual appeal.
Why Choose This?
-
Precise prompt understanding Accurately interprets detailed prompts to generate images that match your description — balancing subject, context, and style with strong fidelity.
-
Flexible quality modes Choose standard for fast results (5-10 seconds) or hd for richer detail and visual depth (~20 seconds).
-
Wide aspect ratio support Multiple presets from square to portrait, landscape, and ultra-wide formats for social, web, or print use.
-
Prompt Enhancer Built-in tool to automatically improve your prompts for better generation results.
-
Fast, reliable generation Optimized for quick turnaround with stable output quality — ideal for rapid ideation and creative iteration.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Text description of the image you want to generate |
| size | No | Output dimensions (default: 1024*1024) |
| quality | No | Rendering quality: standard or hd |
Size Options
| Size | Orientation | Best For |
|---|---|---|
| 1024*1024 | Square | Social posts, avatars, album art |
| 768*1344 | Portrait | Mobile screens, stories, vertical banners |
| 864*1152 | Portrait | Mobile displays, vertical content |
| 1344*768 | Landscape | Web headers, presentations |
| 1152*864 | Landscape | Widescreen designs, banners |
| 1440*720 | Ultra-wide | Cinematic layouts, panoramic visuals |
| 720*1440 | Ultra-tall | Immersive vertical content |
Quality Options
- standard — Faster generation (5-10 seconds), good for previews and rapid iteration
- hd — Higher detail and visual richness (~20 seconds), recommended for final outputs
How to Use
- Write your prompt — describe the subject, setting, mood, and visual style.
- Select size — choose dimensions that match your intended use.
- Choose quality — standard for speed, hd for maximum detail.
- Run — click Run, preview the result, and iterate if needed.
Pricing
| Item | Cost |
|---|---|
| Per image | $0.01 |
Simple flat-rate pricing regardless of size or quality settings.
Best Use Cases
- Social Media Graphics — Create on-brand visuals for posts, stories, and ads.
- Concept Art — Generate ideas for storyboarding and creative exploration.
- Product Mockups — Produce e-commerce imagery and marketing materials.
- Presentations — Visualize concepts for slides and educational content.
- Web Design — Create headers, banners, and promotional visuals.
Pro Tips
- Be specific about composition, lighting, and style to guide the model toward your vision.
- Use hd quality for final outputs and standard for quick iterations.
- Generated images are valid for 7 days — download outputs you want to keep.
Notes
Please ensure your prompts comply with content guidelines. If an error occurs, review your prompt and try again.
Related Models
- Google Nano Banana Pro — Google’s fast text-to-image model with 4K output support.
- FLUX.2 Pro — Flagship-quality generation with cinematic detail and strong prompt fidelity.
- Seedream 4.5 — ByteDance’s text-to-image model focused on visual aesthetics and style accuracy.
- Qwen Image 2512 — Alibaba’s model with exceptional text rendering capabilities.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/z-ai/cogview-4" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"size": "1024*1024",
"quality": "hd",
"enable_sync_mode": false,
"enable_base64_output": false
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | The positive prompt for the generation. | |
| size | string | No | 1024*1024 | 1024*1024, 768*1344, 864*1152, 1344*768, 1152*864, 1440*720, 720*1440 | The quality of the generated image |
| quality | string | No | hd | standard, hd | The quality of the generated image |
| enable_sync_mode | boolean | No | false | - | If set to true, the function will wait for the result to be generated and uploaded before returning the response. It allows you to get the result directly in the response. This property is only available through the API. |
| enable_base64_output | boolean | No | false | - | If enabled, the output will be encoded into a BASE64 string instead of a URL. This property is only available through the API. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |