WaveSpeedAI APIZ AIZ AI Cogview 4

Z Ai Cogview 4

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

ParameterRequiredDescription
promptYesText description of the image you want to generate
sizeNoOutput dimensions (default: 1024*1024)
qualityNoRendering quality: standard or hd

Size Options

SizeOrientationBest For
1024*1024SquareSocial posts, avatars, album art
768*1344PortraitMobile screens, stories, vertical banners
864*1152PortraitMobile displays, vertical content
1344*768LandscapeWeb headers, presentations
1152*864LandscapeWidescreen designs, banners
1440*720Ultra-wideCinematic layouts, panoramic visuals
720*1440Ultra-tallImmersive 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

  1. Write your prompt — describe the subject, setting, mood, and visual style.
  2. Select size — choose dimensions that match your intended use.
  3. Choose quality — standard for speed, hd for maximum detail.
  4. Run — click Run, preview the result, and iterate if needed.

Pricing

ItemCost
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.


  • 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

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-The positive prompt for the generation.
sizestringNo1024*10241024*1024, 768*1344, 864*1152, 1344*768, 1152*864, 1440*720, 720*1440The quality of the generated image
qualitystringNohdstandard, hdThe quality of the generated image
enable_sync_modebooleanNofalse-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_outputbooleanNofalse-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

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayArray of URLs to the generated content (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.has_nsfw_contentsarrayArray of boolean values indicating NSFW detection for each output
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction, the ID of the prediction to get
data.modelstringModel ID used for the prediction
data.outputsstringArray of URLs to the generated content (empty when status is not completed).
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2025 WaveSpeedAI. All rights reserved.