Vidu Reference-to-Image
Generate images using the Vidu model based on reference images.
Authorizations
Pass Authorization: Bearer <token> in the request header.
Body
Image generation model name.
- viduq2: Supports text-to-image, image editing, and reference-to-image with better results
viduq2 Text prompt for describing image generation content, with a maximum length of 2000 characters. Note: viduq2 supports generating images using only prompt (without reference images).
2000Reference image list.
- viduq2: Supports input of 0 to 7 images The model will generate an image with consistent subjects based on the input images.
- Supports Base64 or URL format (URL must be accessible)
- Supported formats: png, jpeg, jpg, webp
- Image resolution must be no smaller than 128×128
- Aspect ratio must be between 1:4 and 4:1
- Single 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
- Base64 format example:
data:image/png;base64,{base64_encode}
7Random seed.
- Defaults to a random seed number
- Manually set values will override the default random seed
Image aspect ratio.
- viduq2: Default 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 image
16:9, 9:16, 1:1, 3:4, 4:3, 21:9, 2:3, 3:2, auto Image resolution.
- viduq2: Default 1080p, optional values: 1080p, 2K, 4K
1080p, 2K, 4K Transparent transmission parameters. No processing, only data transmission, with a maximum length of 1048576 characters.
1048576Callback 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
Response
Submission successful, returns an image task object.
Task ID.
Task processing state:
- created: Task created successfully
- queueing: Task in queue
- processing: Task processing
- success: Generation successful
- failed: Task failed
created, queueing, processing, success, failed Model parameter used for this call.
Text prompt used for this call.
Images used for this call.
Random seed parameter used for this call.
Aspect ratio parameter used for this call.
Resolution parameter used for this call.
Credits consumed for this call.
Callback URL parameter used for this call.
Payload parameter used for this call.
Task creation time.