Image Generating

POST https://api.vidu.com/ent/v2/reference2image

Field
Value
Description
Content-Type
Application/json
Data Exchange Format
Authorization
Token{your api key}
Replace {} with your API key
Field
Type
Required
Description
model
String
Required
Model name
Accepted values: viduq2, viduq1
viduq2: Text to image, image editing, reference to image ,better effect
viduq1: reference to image
images
Array[String]
Optional
Image references
viduq2: Supports input of 0 to 7 images.
viduq1: Supports input of 1 to 7 images.
The model will generate a image with consistent subjects based on the images.
- Supports images in Base64 or URL (must be accessible);
- Supported formats: png, jpeg, jpg, webp;
- Image resolution must be no smaller than 128×128, and the aspect ratio must be less than 1:4 or 4:1;
- Image size must not exceed 50MB;
- The post body of the HTTP request should not exceed 20MB, and encoding must include proper content type string. For instance,
data:image/png;base64{base64_encode}
prompt
String
Required
Text prompt
A textual description for video generation, with a maximum length of 2000 characters
- viduq2 support only use prompt to generatge image
seed
Int
Optional
Random seed
- Defaults to a random seed number
- Manually set values will override the default random seed
aspect_ratio
String
Optional
Aspect ratio
viduq1:Default is 16:9, optional values:16:9,9:16,1:1, 3:4, 4:3
viduq2:Default is 16:9, optional values:16:9,9:16,1:1, 3:4,4:3,21:9,2:3,3:2
- auto:Generated image aspect ratio is consistent with the first input images.
resolution
String
Optional
Resolution
viduq1:Default is 1080p, optional values:1080p
viduq2:Default is 1080p, optional values:1080p,2K,4K
payload
String
Optional
Transparent transmission parameters
No processing, only data transmission,with a maximum length of 1048576 characters
callback_url
String
Optional
Callback
When creating a task, you need to actively set the callback_url with a POST request. When the video generation task changes its status, Vidu will send a callback request to this URL, containing the latest status of the task. The structure of the callback request content will be the same as the return body of the Get Generation API.
The “status” in the callback response includes the following states:
- processing: Task is being processed.
- success: Task is completed (if sending fails, it will retry the callback three times).
- failed: Task failed (if sending fails, it will retry the callback three times).
Vidu uses a callback signature algorithm for verification, check out the details here: Callback Signature
Field
Type
Required
task_id
String
Task ID
state
String
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
model
String
The model used for this call
prompt
String
The text prompt used for this call
images
Array[String]
The image used for this call
seed
Int
The random seed parameter used for this call
aspect_ratio
String
The aspect ratio used for this call
resolution
String
The resolution used for this call
credits
Int
The credits used for this call
callback_url
String
The callback url used for this call
payload
String
The payload parameter used for this call
created_at
String
Task creation time
{
  "task_id": "your_task_id_here",
  "state": "created",
  "model": "viduq2",
  "images": ["your_image_url1","your_image_url2","your_image_url3"],
  "prompt": "your_prompt",
  "seed": 0,
  "aspect_ratio": "16:9",
  "resolution": "2K",
  "payload": "",
  "credits": 2,
  "created_at": "2025-09-08T09:53:22.083033428Z"
}