Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID to use for the request
Value: viduq2_reference2image
images array
Image references. Supports input of 0 to 7 images.
The model will generate images with consistent subjects based on the input images.
Format Requirements:
Supports Base64 encoding or URL format (must be accessible)
Supported formats: png, jpeg, jpg, webp
Image resolution must not be less than 128×128, and aspect ratio must not be less than 1:4 or 4:1
Image size must not exceed 50MB
HTTP request body should not exceed 20MB, and encoding must include appropriate content type string. Example: data:image/png;base64{base64_encode}
prompt string required
Text description for image generation, maximum 2000 characters
Note: The viduq2 model supports text-to-image generation. When using the viduq2 model without uploading any images, the model will generate images based on the text content in this parameter
resolution string
Image resolution
Options: 1080p, 2K, 4K
Default: 1080p
aspect_ratio string
Aspect ratio
Note: Auto mode will keep the generated image ratio consistent with the first input image
Options: auto, 16:9, 9:16, 1:1, 3:4, 4:3, 21:9, 2:3, 3:2
Default: 16:9
seed integer
Random seed. Default value is a random seed number. Manually set values will override the default random seed
payload string
Pass-through parameter, no processing required, only data transmission, maximum 1048576 characters
callback_url string
Callback URL
Polling
Since image generation takes time, you need to poll the task status after creation
The initial response returns the task ID and initial status. The actual generation results must be obtained through polling the task status endpoint
Response Format
error object
Error information. Only present when status is failed.
code
stringError code
message
stringDetailed error message
output object
Generation results.
status
stringTask status
Options:
in_queue,processing,success,failed
content
arrayList of generated image content
type
stringResource type
Value:
imageurl
stringImage URL
jobId
stringRemote task ID
usage object
Usage statistics. Only present when status is completed.
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information.
Error Codes
| Error Code | Description |
|---|---|
| 008023001 | Images or subjects parameter missing (at least need to provide one) |
| 008023002 | Images parameter count error (must contain 1-7 images) |
| 008023003 | Prompt parameter missing |
| 008023095 | Internal generation error |
| 008023096 | Result parsing error |
| 008023097 | HTTP error response |
| 008023098 | Status check error |
| 008023099 | Task creation error |