Skip to Content
API CallVideo GenerationVidu/Start-End Frame to Video

Vidu/Start-to-End Video Generation

vidu Start-to-End Video Generation API Documentation

Asynchronous Task Submission

API

https://api.umodelverse.ai/v1/tasks/submit

Input

ParameterTypeRequiredDescription
modelstringYesModel name, options: viduq2-pro, viduq2-turbo
- viduq2-pro: New model, excellent effect, rich in detail
- viduq2-turbo: New model, excellent effect, fast generation
input.first_frame_urlstringYesFirst frame image, supports image URL or Base64 encoding
input.last_frame_urlstringYesLast frame image, supports image URL or Base64 encoding
input.promptstringNoText prompt for guiding video generation, up to 2000 characters.
parameters.vidu_typestringYesVidu API type, here it should be start-end2video
parameters.durationintNoVideo duration parameter, default depends on the model:
- viduq2-pro defaults to 5, options: 1, 2, 3, 4, 5, 6, 7, 8
- viduq2-turbo defaults to 5, options: 1, 2, 3, 4, 5, 6, 7, 8
parameters.seedintNoRandom seed, default 0 means using random number
parameters.resolutionstringNoResolution parameter, default depends on model and video duration:
- viduq2-pro 1-8s: default 720p, options: 540p, 720p, 1080p
- viduq2-turbo 1-8s: default 720p, options: 540p, 720p, 1080p
parameters.movement_amplitudestringNoMovement amplitude, options: auto, small, medium, large, default auto
parameters.bgmboolNoWhether to add background music, default false

Note:

  • Both first_frame_url and last_frame_url parameters must be provided
  • The resolutions of the first and last frame images should be similar, the ratio should be between 0.8 and 1.25
  • Supported image formats are png, jpeg, jpg, webp
  • Image aspect ratio needs to be less than 1:4 or 4:1
  • Image size should not exceed 50 MB
  • Base64 encoding format example: data:image/png;base64,{base64_encode}

Request Example

⚠️ If you are using a Windows system, it is recommended to use Postman or other API calling tools.

curl --location --globoff 'https://api.umodelverse.ai/v1/tasks/submit' \ --header 'Authorization: <YOUR_API_KEY>' \ --header 'Content-Type: application/json' \ --data '{ "model": "viduq2-pro", "input": { "first_frame_url": "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg", "last_frame_url": "https://umodelverse-inference.cn-wlcb.ufileos.com/ucloud-maxcot.jpg", "prompt": "Continue the video with smooth camera movement." }, "parameters": { "vidu_type": "start-end2video", "duration": 5, "resolution": "1080p", "movement_amplitude": "auto", "bgm": true } }'

Output

ParameterTypeDescription
output.task_idstringUnique identifier for the asynchronous task
request_idstringUnique identifier for the request

Response Example

{ "output": { "task_id": "task_id" }, "request_id": "request_id" }

Query Task Status

API

https://api.umodelverse.ai/v1/tasks/status?task_id=<task_id>

Request Example

curl --location 'https://api.umodelverse.ai/v1/tasks/status?task_id=<task_id>' \ --header 'Authorization: <YOUR_API_KEY>'

Output

ParameterTypeDescription
output.task_idstringUnique identifier for the asynchronous task
output.task_statusstringTask status: Pending, Running, Success, Failure
output.urlsarrayList of URLs for video results
output.submit_timeintegerTimestamp of task submission
output.finish_timeintegerTimestamp of task completion
output.error_messagestringError message returned on failure
usage.durationintegerVideo duration (seconds)
request_idstringUnique identifier for the request

Response Example

{ "output": { "task_id": "task_id", "task_status": "Success", "urls": ["https://xxxxx/xxxx.mp4"], "submit_time": 1756959000, "finish_time": 1756959050 }, "usage": { "duration": 5 }, "request_id": "" }