viduq3-pro
viduq3-pro supports text generation video, first frame picture generation video and first and last frame picture generation video. The duration is an integer from 1 to 16 seconds, and the resolution can be selected from 540p, 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-pro |
| 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 | Only text, 1 first frame picture, or provide two pictures of the first frame and last frame in sequence |
request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Fixed fill in viduq3-pro |
prompt |
string | Depends on the input method | Describe the scenes, actions and shots, up to 5000 words; please fill in when writing videos, you can omit when providing pictures |
images |
array of string | No | does not transmit to represent Vincent video; 1 address represents the first frame; 2 addresses represent the first frame and the last frame in sequence |
seconds |
integer | No | Output duration, 1 ~ 16 Integer of seconds, default 5 |
resolution |
string | No | 540p , 720p or 1080p, default 720p |
aspect_ratio |
string | No | Specified only for Vincent videos, optional 16:9, 9:16, 4:3, 3:4, 1:1; omit |
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 picture and proportion
| Input method | images |
aspect_ratio |
|---|---|---|
| text generation | omit | It is recommended to specify the output ratio explicitly, such as 16:9 |
| The first frame is generated | ["首帧图片地址"] |
Omit, press the input picture to confirm |
| Generate first and last frames | ["首帧图片地址", "尾帧图片地址"] |
Omit, confirm by input picture |
- Up to two pictures, the last frame must match the first frame, the last frame cannot be provided separately; the order of the array cannot be reversed.
- Use JPEG, PNG or WebP images, the width/height should be between
0.25~4; it is recommended that the width and height be at least 240 pixels, and try to keep the first and last frame sizes as close as possible. - 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.
- The first frame of a single frame can also be uploaded via file, and the file size can be up to
15 × 1024 × 1024bytes. Please use the two image addresses of JSON for the first and last frames. - This model does not support multi-image reference generation, nor does it receive reference video or reference audio;
audioonly controls the output sound.
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
Text generation video
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-pro",
"prompt": "清晨,一艘小帆船缓缓驶过平静的湖面,远处群山笼罩薄雾,镜头平稳向前推进。",
"seconds": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"audio": true
}'
Change aspect_ratio to 9:16 when vertical screen is required; change audio to false when mute is required.
First frame picture generation video
The following JSON is an independent POST /v1/videos request body. Replace the image address with your real material address and submit it according to the previous curl command:
{
"model": "viduq3-pro",
"prompt": "让画面中的小船缓缓向前航行,水面泛起细小涟漪,保持主体外观一致。",
"images": ["https://example.com/first-frame.png"],
"seconds": 5,
"resolution": "720p",
"audio": false
}
Generate video from first and last frame pictures
{
"model": "viduq3-pro",
"prompt": "从第一张图片自然过渡到第二张图片,镜头平稳移动,保持主体连续。",
"images": [
"https://example.com/first-frame.png",
"https://example.com/last-frame.png"
],
"seconds": 5,
"resolution": "1080p",
"audio": true
}
Upload a local first frame
Use multipart/form-data, that is, upload the text field together with the file. Replace first-frame.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-pro" \
-F "prompt=画面中的主体缓缓移动,镜头平稳。" \
-F "seconds=5" \
-F "resolution=720p" \
-F 'metadata={"audio":false}' \
-F "input_reference=@first-frame.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. Please use the previous JSON example for the first and last frame method, and do not upload two files with the same name.
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-pro.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 of generation, resolution and account-applicable price, and is ultimately subject to consumption records; the first frame or the first and last frame pictures do not increase the picture fee separately.
- When the parameter is wrong, check whether the duration is an integer from
1to16and whether the resolution is540p,720por1080p, and whether to provide a maximum of two images. - Do not specify
aspect_ratiowhen generating pictures, and confirm the order of the first and last frames. When multiple reference pictures need to be generated,viduq3-dramacan 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-pro.
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.