The Vidu Image Generation models support text-to-image , image editing and reference image-to-image tasks.
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 |
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.
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
Singapore region: POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/image-generation/generation
Request ParametersHeadersContent-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 ImportantIf this request header is missing, the error "current user api does not support synchronous calls" is returned. Request Bodymodel Model name. Available values:
input Input parameter object containing the following fields: parameters Image generation parameters. | Text-to-ImageSupported by all Vidu models. Reference Image-to-ImageSupported by all Vidu models. Up to 14 reference images can be provided. |
Response Parametersrequest_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. | Successful responseSave the Error responseTask creation failed. See Error codes. |
Step 2: Query Task Results
Singapore region: GET https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/tasks/{task_id}
Note
- 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 ParametersHeadersAuthorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. task_id The ID of the task. | Query Task Results |
Response Parametersoutput 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. | 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. |
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 |