The Vidu Image Generation models support text-to-image, image editing and reference image-to-image tasks.
This document applies only to the China (Beijing) region. Use an API key from this region.
Model Overview
Model | Capabilities | Input Modality | Output Image Specifications |
vidu/vidu-image_reference2image | Reference image generation, text-to-image, image editing. Precise rendering of Chinese and English text, pixel-level restoration of UI/charts and design details. Ideal for posters, infographics, etc. | Text, Image | Resolution: 1K, 2K, 4K Number of images: 1 Image format: PNG |
vidu/viduq3-fast_reference2image | Reference image generation, text-to-image, image editing. High speed, high quality, and low cost — approximately 50% cheaper than Pro. | Text, Image | Resolution: 1K, 2K, 4K Number of images: 1 Image format: PNG |
vidu/viduq2-pro_reference2image | Reference image generation, text-to-image, image editing. Excels at complex logic with strong context consistency and industrial-grade stability. Ideal for professional design, comic production, etc. | Text, Image | Resolution: 1K, 2K, 4K Number of images: 1 Image format: PNG |
vidu/viduq2-fast_reference2image | Reference image generation, text-to-image, image editing. Significantly improved semantic understanding with support for more styles. | Text, Image | Resolution: 1K Number of images: 1 Image format: PNG |
Prerequisites
Activate the service: Go to the Model Studio console, search for "Vidu", find the corresponding model card, and click Activate Now to confirm activation and authorization in the pop-up window.
Configure API Key: Select a region and Obtain an API key, then Configure API key as an environment variable.
HTTP Call
Image generation tasks take a certain amount of time and the API uses asynchronous calls. The process involves "Create Task -> Poll for Results" two core steps, as follows:
Step 1: Submit Image Generation Task
Beijing region: POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/image-generation/generation
Replace {WorkspaceId} with your actual workspace ID.
Request Parameters | Text-to-ImageSupported by all Vidu models. Reference Image-to-ImageSupported by all Vidu models. Up to 14 reference images can be provided. |
Headers | |
Content-Type The content type of the request. Must be | |
Authorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. | |
X-DashScope-Async Enables asynchronous processing. HTTP requests support only asynchronous calls. Must be Important
If this request header is missing, the error "current user api does not support synchronous calls" is returned. | |
X-DashScope-Callback-URL Callback notification URL after task completion. | |
Request Body | |
model Model name. Available values:
| |
input Input parameter object containing the following fields: parameters Image generation parameters. | |
Response Parameters | Successful responseSave the
Error responseTask creation failed. See Error codes.
|
request_id Unique request identifier for tracing and troubleshooting. | |
code Error code. Returned only for failed requests. See Error codes. | |
message Detailed error message. Returned only for failed requests. See Error codes. |
Step 2: Query Task Results
Beijing region: GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
Replace {WorkspaceId} with your actual workspace ID.
Polling recommendation: Image generation takes time. It is recommended to use a polling mechanism with a reasonable query interval (e.g., 5 seconds) to obtain results.
Task status flow: PENDING (waiting) → RUNNING (processing) → SUCCEEDED (success) / FAILED (failure).
Image link validity: Download links for generated images are valid for 24 hours. Please download and save images promptly.
Request Parameters | Query Task Results |
Headers | |
Authorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. | |
task_id The ID of the task. |
Response Parameters | Task SucceededTask FailedIf the task fails for any reason, related information will be returned. You can identify the error cause through the code and message fields. See Error codes for troubleshooting. |
output Task output information. | |
usage Resource usage information. Only counts successful results. | |
request_id Unique request identifier for tracing and troubleshooting. | |
code Error code. Returned only for failed requests. See Error codes. | |
message Detailed error message. Returned only for failed requests. See Error codes. |
Error codes
If the model call fails and returns an error message, see Error codes for resolution.
Supported Image Sizes
vidu-image
Resolution | Supported Sizes |
1K | 1024*1024, 720*1440, 1440*720, 1024*768, 768*1024, 1920*1088, 1088*1920, 1536*1024, 1024*1536, 1920*816, 816*1920 |
2K | 2048*2048, 1088*2160, 2160*1088, 2736*2048, 2048*2736, 2560*1440, 1440*2560, 3072*2048, 2048*3072, 2560*1104, 1104*2560 |
4K | 2880*2880, 1440*2880, 2880*1440, 3312*2480, 2480*3312, 3840*2160, 2160*3840, 3520*2352, 2352*3520, 3840*1648, 1648*3840 |
viduq3-fast
Resolution | Supported Sizes |
1K | 1024*1024, 768*1376, 848*1264, 896*1200, 928*1152, 1152*928, 1200*896, 1264*848, 1376*768, 1584*672, 512*2064, 2064*512, 352*2928, 2928*352 |
2K | 2048*2048, 1536*2752, 1696*2528, 1792*2400, 1856*2304, 2304*1856, 2400*1792, 2528*1696, 2752*1536, 3168*1344, 1024*4128, 4128*1024, 704*5856, 5856*704 |
4K | 4096*4096, 3072*5504, 3392*5056, 3584*4800, 3712*4608, 4608*3712, 4800*3584, 5056*3392, 5504*3072, 6336*2688, 2048*8256, 8256*2048, 1408*11712, 11712*1408 |
viduq2-pro
Resolution | Supported Sizes |
1K | 1024*1024, 768*1376, 848*1264, 896*1200, 928*1152, 1152*928, 1200*896, 1264*848, 1376*768, 1584*672 |
2K | 2048*2048, 1536*2752, 1696*2528, 1792*2400, 1856*2304, 2304*1856, 2400*1792, 2528*1696, 2752*1536, 3168*1344 |
4K | 4096*4096, 3072*5504, 3392*5056, 3584*4800, 3712*4608, 4608*3712, 4800*3584, 5056*3392, 5504*3072, 6336*2688 |
viduq2-fast
Resolution | Supported Sizes |
1K | 1024*1024, 768*1376, 848*1264, 896*1200, 928*1152, 1152*928, 1200*896, 1264*848, 1376*768, 1584*672 |