Vidu Q2 Pro - Reference to Video
viduq2-pro-reference2video
Vidu Q2 Pro - Reference to Video supports both image and video references to generate high-quality videos with subject consistency
Эндпоинты
Заголовок раздела «Эндпоинты»POST /v1/queue/viduq2-pro-reference2video # Создать задачуGET /v1/queue/viduq2-pro-reference2video/requests/{request_id}/status # Проверить статусGET /v1/queue/viduq2-pro-reference2video/requests/{request_id}/response # Получить результатPUT /v1/queue/viduq2-pro-reference2video/requests/{request_id}/cancel # Отменить задачуПараметры запроса
Заголовок раздела «Параметры запроса»curl --request 'POST' 'https://odirouter.ai/model/v1/queue/viduq2-pro-reference2video' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --location \ --data-raw '{ "prompt": "A golden retriever running happily on a green grass field", "images": [ "https://www.gstatic.com/webp/gallery/2.jpg" ], "duration": 5, "aspect_ratio": "16:9", "resolution": "720p"}'images array<string> required
Заголовок раздела «images array<string> required»Image references. Supports uploading 1 to 7 images. The model uses subjects from these images to generate videos with subject consistency.
Note 1: For this model, if no video is uploaded, 1 to 7 images are supported. If video is uploaded, 1 to 4 images are supported.
Note 2: Supports image Base64 input or image URL input (must be accessible).
Note 3: Supported image formats: png, jpeg, jpg, webp.
Note 4: Image resolution must be at least 128x128, aspect ratio must be less than 1:4 or 4:1, and file size must not exceed 50MB.
Note 5: HTTP request post body must not exceed 20MB, and encoding must include a proper content-type prefix, for example: data:image/png;base64,{base64_encode}.
videos array<string> required
Заголовок раздела «videos array<string> required»Video references. Supports uploading 1 to 2 videos. The model uses these videos as references to generate videos with subject consistency.
Note 1: With video reference enabled, at most 1 video of 8 seconds or 2 videos of 5 seconds are supported.
Note 2: Supported video formats: mp4, avi, mov.
Note 3: Video resolution must be at least 128x128, aspect ratio must be less than 1:4 or 4:1, and file size must not exceed 100MB.
Note 4: Base64 decoded byte length must be less than 20MB, and encoding must include a proper content-type prefix, for example: data:video/mp4;base64,{base64_encode}.
prompt string required
Заголовок раздела «prompt string required»Text prompt describing the video to generate.
Limit: Maximum 5000 characters.
bgm boolean
Заголовок раздела «bgm boolean»Whether to add background music to the generated video.
If set to true, the system automatically selects and adds suitable music from the preset BGM library. If omitted or set to false, no BGM is added.
BGM has no duration limit and is automatically adapted to video duration.
Note: In this model, when duration is 9 or 10, bgm does not take effect.
Options: true, false
Default: false
duration integer
Заголовок раздела «duration integer»Video duration parameter.
Options: 0 to 10 (0 means auto duration selection)
Default: 5
seed integer
Заголовок раздела «seed integer»Random seed. If omitted or set to 0, a random value is used. If set manually, the provided seed is used.
aspect_ratio string
Заголовок раздела «aspect_ratio string»Aspect ratio.
Options: 16:9, 9:16, 4:3, 3:4, 1:1
Default: 16:9
Заголовок раздела «Default: 16:9»resolution string
Заголовок раздела «resolution string»Resolution parameter.
Options: 540p, 720p, 1080p
Default: 720p
payload string
Заголовок раздела «payload string»Pass-through parameter. No processing is performed, only data transfer.
Limit: Maximum 1048576 characters.
off_peak boolean
Заголовок раздела «off_peak boolean»Note: Temporarily unavailable
Off-peak mode.
true: Generate video in off-peak mode.
false: Generate video immediately.
Note 1: Off-peak mode consumes fewer credits.
Note 2: Tasks submitted in off-peak mode are generated within 48 hours. Unfinished tasks are automatically canceled and credits are refunded.
Note 3: You can also manually cancel off-peak tasks.
Note 4: Audio-video direct output does not support off-peak mode.
Options: true, false
Default: false
watermark boolean
Заголовок раздела «watermark boolean»Whether to add watermark.
true: Add watermark.
false: Do not add watermark.
Note 1: Current watermark content is fixed and AI-generated, and is disabled by default.
Note 2: You can obtain watermarked video content through the watermarked_url field.
Options: true, false
Default: false
wm_position integer
Заголовок раздела «wm_position integer»Watermark position.
1: Top-left
2: Top-right
3: Bottom-right
4: Bottom-left
Default: 3
wm_url string
Заголовок раздела «wm_url string»Watermark image URL. If omitted, the default watermark is used (AI-generated).
meta_data string
Заголовок раздела «meta_data string»Metadata identifier.
callback_url string
Заголовок раздела «callback_url string»Callback URL.
Параметры ответа
Заголовок раздела «Параметры ответа»{ "request_id": "task_01hxyz...", "response_url": "https://odirouter.ai/model/v1/queue/viduq2-pro-reference2video/requests/task_01hxyz.../response", "status_url": "https://odirouter.ai/model/v1/queue/viduq2-pro-reference2video/requests/task_01hxyz.../status", "cancel_url": "https://odirouter.ai/model/v1/queue/viduq2-pro-reference2video/requests/task_01hxyz.../cancel", "queue_position": 0}| Поле | Тип | Описание |
|---|---|---|
request_id | string | Идентификатор задачи для последующей проверки статуса, получения результата и отмены. |
response_url | string | URL для получения итогового результата. |
status_url | string | URL для проверки статуса задачи. |
cancel_url | string | URL для отмены задачи. |
queue_position | int | Текущая позиция в очереди. |