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: vidu_create_subjects
name string required
Subject name (recommended to be unique)
images array[string]
Subject images, at least 1 image must be uploaded
Note 1: Supports image Base64 encoding or image URL (ensure accessible)
Note 2: Maximum 3 images supported
Note 3: Supported image formats: png, jpeg, jpg, webp
Note 4: Image aspect ratio must be less than 1:4 or 4:1
Note 5: Image size must not exceed 50 MB
Note 6: Please note that the byte length after base64 decode must be less than 20M, and the encoding must include an appropriate content type string, for example:
data:image/png;base64,{base64_encode}
videos array[string]
Video reference, supports uploading 1 subject video
Note 1: Only the viduq2-pro reference generation model supports video subjects
Note 2: Maximum 1 video of 5 seconds supported
Note 3: Supported video formats: mp4, avi, mov
Note 4: Video resolution must not be less than 128*128, aspect ratio must be less than 1:4 or 4:1, and size must not exceed 100M
Note 5: Please note that the byte length after base64 decode must be less than 20M, and the encoding must include an appropriate content type string, for example:
data:video/mp4;base64,{base64_encode}
voice_id string
Subject voice ID, used only when creating audio-video direct output tasks
Note 1: If no voice ID is provided when creating audio-video direct output tasks, the system will automatically recommend a voice
Note 2: q2-pro does not support using a voice ID
Polling
Since result generation takes time, you need to poll the task status after creating the task.
The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.
See the examples on the right for polling requests and responses.
Response Format
output array
Generation result. Only present when status is completed.
content
arrayList of generated content
text
stringSubject info JSON string, containing the following fields:
id: Generated subject ID (server_id)
name: Custom subject name for this generation
images: Image parameters of the generated subject
videos: Video parameters of the generated subject
voice_id: Voice ID bound to the generated subject
style: Style information of the generated subject
description: Description of the generated subject
credits: Credits consumed by this calltype
stringResource type, this endpoint returns
text