viduq3-drama
viduq3-drama generates videos based on reference pictures and text descriptions, suitable for scenes where characters, objects or picture styles need to be kept consistent. Each time requires 1 ~ 7 reference pictures, supports 3 ~ 16 second integer duration, and two resolutions 720p and 1080p.
First press Access Basics to set the environment variables: SHANHAI_BASE_URL is https://shanghaido.com, without /v1 at the end; SHANHAI_API_KEY is the token of this site. The commands below are for Bash (Linux, macOS, or Git Bash).
Basic information
| Item | Content |
|---|---|
| Model name | viduq3-drama |
| Submit task | POST /v1/videos |
| Query task | GET /v1/videos/{task_id} |
| Get video content | GET /v1/videos/{task_id}/content |
| certification | Each request carries Authorization: Bearer YOUR_API_KEY |
| Input method | Reference picture plus text; only text generation is not supported |
request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Fixed fill in viduq3-drama |
prompt |
string | is | Describe the subject, action, scene and shot, up to 2000 words |
images |
array of string | is | 1 ~ 7 Reference picture address; directly fill in the address string |
seconds |
integer | No | Output duration, 3 ~ 16 Integer of seconds, default 5 |
resolution |
string | No | 720p or 1080p, default 720p |
aspect_ratio |
string | No | Output ratio, optional 16:9, 9:16, 1:1; It is recommended to fill in |
audio |
boolean | No | Whether to generate sound, default true; fill in for silent video false |
seed |
integer | No | Random seed, which can be used to control the randomness of the generation; omit it when not needed |
This site is also compatible with duration to indicate duration; at the same time, seconds shall be used as the standard. This article uses seconds uniformly. Please use the top-level fields in the table above and do not write the scale as ratio or the sound switch as generate_audio.
How to fill in the reference picture
- All pictures in
imagesare used as reference materials and do not represent the first or last frame. Even if only two are provided, they are still two reference images. - Use a JPEG, PNG or WebP image, the width/height should be between
0.25~4, and the shortest side should be at least 128 pixels. It is recommended to use clear and clearly focused materials. - The image address must return the image file directly without logging in and remain accessible until the task is completed. The local path and web browsing address cannot be used as image addresses.
- It is recommended to use the public network image address in JSON to submit multiple reference images. Single images can also be uploaded using the file upload method below. The maximum file size in this method is
15 × 1024 × 1024bytes. - This model does not receive reference video or reference audio.
audioonly controls the output sound, not the audio material address.
Business tag and random seed
seed Use a random value when omitted or filled in with 0; the fixed seed is used to control changes and cannot guarantee reproducibility across versions. The optional top-level payload is a custom business tag and does not participate in the screen description. The business system must still save the correspondence between the task ID and the local record, and cannot rely on the query response to return the payload.
Request Example
Reference picture to generate video
Replace the example.com image address with your real material address. The following command only submits the task once:
curl "$SHANHAI_BASE_URL/v1/videos" \
-H "Authorization: Bearer $SHANHAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq3-drama",
"prompt": "参考图片中的人物站在海边,微风吹动衣角,人物自然转头看向镜头,保持人物外观一致。",
"images": [
"https://example.com/character.png",
"https://example.com/scene.png"
],
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true
}'
When you only need one reference picture, just reserve an address in images. When vertical screen video is required, change aspect_ratio to 9:16; when mute is required, change audio to false.
Upload a local reference map
Use multipart/form-data, that is, upload the text field together with the file. Replace reference.png with the real local file path and let curl automatically generate the requested Content-Type:
curl "$SHANHAI_BASE_URL/v1/videos" \
-H "Authorization: Bearer $SHANHAI_API_KEY" \
-F "model=viduq3-drama" \
-F "prompt=参考图中的主体缓缓移动,保持外观一致,镜头平稳。" \
-F "seconds=5" \
-F "resolution=720p" \
-F 'metadata={"aspect_ratio":"16:9","audio":false}' \
-F "input_reference=@reference.png"
The file field only supports one input_reference file. The Boolean value in the upload method is placed in the JSON object of metadata, and false is kept as a Boolean value; do not upload multiple files with the same name to replace the multi-image array. Please use the previous JSON method for multiple reference pictures.
Query tasks and downloads
The response after successful submission contains the task number of this site, for example:
{
"id": "task_EXAMPLE",
"object": "video",
"status": "queued",
"progress": 0
}
Save the real id and query it every 15 to 20 seconds; replace the TASK_ID below with the real task number:
curl "$SHANHAI_BASE_URL/v1/videos/TASK_ID" \
-H "Authorization: Bearer $SHANHAI_API_KEY"
Task status status |
Meaning and processing |
|---|---|
queued |
Queuing, query the same task |
in_progress |
is being generated, and the same task |
completed |
Completed, ready to download |
failed |
Generation failed, retain the task number and failure information, and stop querying |
unknown |
The status cannot be determined at the moment and will be checked later; if it continues to appear, contact the site customer service |
progress is for display only and does not represent an exact proportion of completion. Please use status to determine whether the task is completed and set the waiting limit. When the submission times out and id is not received, please check the task list on this site first to avoid repeated submission and billing.
After the task is completed, download the video through the content interface of this site:
curl --fail --location "$SHANHAI_BASE_URL/v1/videos/TASK_ID/content" \
-H "Authorization: Bearer $SHANHAI_API_KEY" \
-o viduq3-drama.mp4
Please save the generated video as soon as possible. If the download fails, keep the original task number and continue to obtain the content of the original task or contact the site's customer service. Do not restore the same video by regenerating it.
Fees and FAQs
- The fee is calculated according to the original rules of this site, based on the number of seconds to generate, resolution and account applicable price, and is ultimately subject to consumption records; adding reference pictures does not increase the picture fee separately.
- When the parameter is wrong, check whether
1~7reference pictures are provided, whether the duration is an integer from3~16, and whether the resolution is720por1080p. - reference pictures will not be interpreted as first and last frames. When first frame or first and last frame control is required,
viduq3-procan be used. - When authentication or permission error occurs, check whether the site token is used and whether the token can be seen through
GET /v1/modelsviduq3-drama.
encountered a problem
If you encounter problems with calling or configuration, please contact the site customer service and provide the model name, task number, error time and error message to facilitate troubleshooting.