Create Image Generation Task
POST
/ent/v2/reference2imageQuery Video Creations
GET
/ent/v2/tasks/{id}/creationsAPI Reference
Content-Typestring*Data exchange format
Application/jsonAuthorizationstring*Replace {your api key} with your token
Token{your api key}modelstring*Model name
Optional values: viduq2, viduq1viduq2: Supports text-to-image, image editing, and reference-to-imageviduq1: Supports reference-to-image
imagesstringImage reference
viduq2: Supports input of 0–7 images
viduq1: Supports input of 1–7 images
The model uses the subject in the images passed in this parameter as a reference, and generates a video with a subject consistent with the images.
Note 1: Supports passing images as Base64 encoding or image URL (ensure it is accessible)
Note 2: Images support png, jpeg, jpg, webp formats
Note 3: Image pixel dimensions must not be smaller than 128*128, and the aspect ratio must be less than 1:4 or 4:1
Note 4: The size must not exceed 50M
Note 5: Please note that the post body of the http request must not exceed 20MB, and the encoding must include an appropriate content type string, for base64,{base64_encode}normal
data:image/pngpromptstring*Text prompt
Text description for video generation, must not exceed 2000 characters
Note 1: The viduq2 model supports text-to-image; when using the viduq2 model without uploading any images, the model will use the text content of this parameter to generate an image
seedintegerRandom seed parameter
If not passed or set to 0 by default, a random number will be used instead
If manually set, the specified seed will be used
aspect_ratiostringAspect ratio parameter; different models support different ratios:viduq1: Default value 16:9, optional values: 16:9, 9:16, 1:1, 3:4, 4:3viduq2: Default value 16:9, optional values as follows: 16:9, 9:16, 1:1, 3:4, 4:3, 21:9, ,
resolutionstringResolution parameter; different models support different resolutions:viduq1: Default 1080p, options: 1080pviduq2: Default 1080p, options: 1080p, 2K, 4K
payloadstringPass-through parameter
No processing is done, only data transmission
Note: Maximum 1048576 characters
callback_urlstringCallback protocol
You need to actively set callback_url when creating the task. The request method is POST. When the video generation task status changes, Vidu will send a callback request containing the latest task status to this address. The callback request content structure is consistent with the response body of the Query Task API
The "status" returned in the callback includes the following states:
processing Task is processingsuccess Task completed (callback sent up to three times if delivery fails)failed Task failed (callback sent up to three times if delivery fails)Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*Task ID, returned upon successful creation by the create task endpoint
curl --request POST \
--url 'https://api.vidu.com/ent/v2/reference2image' \
--header 'Content-Type: Application/json' \
--header 'Authorization: Token{your api key}' \
--data '{
"model": "viduq2",
"images": "data:image/png",
"prompt": "your_prompt",
"seed": 0,
"aspect_ratio": "16:9",
"resolution": "2K",
"payload": "",
"callback_url": "string"
}'{
"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": 12,
"created_at": "2025-08-07T09:53:22.083033428Z"
}curl --request GET \
--url 'https://api.vidu.com/ent/v2/tasks/{your_id}/creations' \
--header 'Authorization: Token {your api key}'{
"id":"your_task_id",
"state": "success",
"err_code": "",
"credits": 4,
"payload": "",
"creations": [
{
"id": "your_creations_id",
"url": "your_generated_results_url",
"cover_url": "your_generated_results_cover_url",
"watermarked_url": "your_generated_results_watermarked_url"
}
]
}2:33:2auto: Indicates the same aspect ratio as the first input imageapplication/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing status
Optional values:created Created successfullyqueueing Task queueingprocessing Task processingsuccess Task succeededfailed Task failed
modelstringapplication/jsonResponse fields
idstringTask ID
statestringProcessing status
Optional values:
created Created successfully
queueing Task queueing
processing Task processing
success Task succeeded
failed Task failed
err_codestringError code, see the error code table for details
creditsintegerNumber of credits consumed by this task, unit: credits
payloadstringPass-through parameter passed in this task call
bgmbooleanWhether bgm is used in this task call
off_peakbooleanWhether off-peak mode is used in this task call
creationsarrayCreation results
idstringCreation ID, used to identify different creations
urlstringCreation URL, valid for 24 hours
cover_urlstringCreation cover image, valid for 24 hours
watermarked_urlstringWatermarked creation URL, valid for 24 hours
Model name used in this call
promptstringPrompt parameter used in this call
imagesstringImage parameter used in this call
seedintegerRandom seed parameter used in this call
aspect_ratiostringAspect ratio parameter used in this call
resolutionstringResolution parameter used in this call
callback_urlstringCallback parameter passed in this call
payloadstringPass-through parameter passed in this call
creditsintegerNumber of credits consumed by this call
created_atstringTask creation time