Vidu Q2 - Reference to Image
viduq2-reference2image
Vidu Q2 reference-to-image interface supports generating images with consistent style and subject, also supports text-to-image generation.
Эндпоинты
Заголовок раздела «Эндпоинты»POST /v1/queue/viduq2-reference2image # Создать задачуGET /v1/queue/viduq2-reference2image/requests/{request_id}/status # Проверить статусGET /v1/queue/viduq2-reference2image/requests/{request_id}/response # Получить результатPUT /v1/queue/viduq2-reference2image/requests/{request_id}/cancel # Отменить задачуПараметры запроса
Заголовок раздела «Параметры запроса»curl --request 'POST' 'https://odirouter.ai/model/v1/queue/viduq2-reference2image' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --location \ --data-raw '{ "prompt": "A character in a new scene", "images": [ "https://www.gstatic.com/webp/gallery/3.jpg" ], "resolution": "1080p", "aspect_ratio": "1:1", "style": "general"}'images array
Заголовок раздела «images array»Image references. Supports input of 0 to 7 images.
The model will generate images with consistent subjects based on the input images.
Format Requirements:
Supports Base64 encoding or URL format (must be accessible)
Supported formats: png, jpeg, jpg, webp
Image resolution must not be less than 128×128, and aspect ratio must not be less than 1:4 or 4:1
Image size must not exceed 50MB
HTTP request body should not exceed 20MB, and encoding must include appropriate content type string. Example: data:image/png;base64{base64_encode}
prompt string required
Заголовок раздела «prompt string required»Text description for image generation, maximum 2000 characters
Note: The viduq2 model supports text-to-image generation. When using the viduq2 model without uploading any images, the model will generate images based on the text content in this parameter
resolution string
Заголовок раздела «resolution string»Image resolution
Options: 1080p, 2K, 4K
Default: 1080p
aspect_ratio string
Заголовок раздела «aspect_ratio string»Aspect ratio
Note: Auto mode will keep the generated image ratio consistent with the first input image
Options: auto, 16:9, 9:16, 1:1, 3:4, 4:3, 21:9, 2:3, 3:2
Default: 16:9
seed integer
Заголовок раздела «seed integer»Random seed. Default value is a random seed number. Manually set values will override the default random seed
payload string
Заголовок раздела «payload string»Pass-through parameter, no processing required, only data transmission, maximum 1048576 characters
callback_url string
Заголовок раздела «callback_url string»Callback URL
Параметры ответа
Заголовок раздела «Параметры ответа»{ "request_id": "task_01hxyz...", "response_url": "https://odirouter.ai/model/v1/queue/viduq2-reference2image/requests/task_01hxyz.../response", "status_url": "https://odirouter.ai/model/v1/queue/viduq2-reference2image/requests/task_01hxyz.../status", "cancel_url": "https://odirouter.ai/model/v1/queue/viduq2-reference2image/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 | Текущая позиция в очереди. |