Vidu Q1 Reference to Video
Vidu AI reference to video transforms text and images into dynamic, high-quality videos effortlessly.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/vidu-q1-reference-to-video"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A middle-aged man sits on a wooden bench in a sunny park, reading an open hardcover book titled 'Vidu Q1 Reference'. The camera gently zooms in on the book’s cover and pages showing technical content, then back to the man turning pages thoughtfully. Soft sunlight filters through the trees, blending the three reference images naturally into one smooth scene.",
12 "image_urls": [
13 "https://segmind-resources.s3.amazonaws.com/input/62d98e27-8538-4953-95e6-e93d4a544fc1-39a80c5a-c4c4-405f-88f4-30fd1a45d6c9.jpeg",
14 "https://segmind-resources.s3.amazonaws.com/input/ac3266d0-271e-4e31-96a9-d31f26d8c22f-a052d794-4300-478d-8d99-5a10daf5200c.png",
15 "https://segmind-resources.s3.amazonaws.com/input/777c247c-8073-4d47-ac64-53b5fa088aae-d9afc6d7-d3ca-4baa-8920-cb41b56ff0b8.jpeg"
16 ],
17 "aspect_ratio": "16:9",
18 "duration": 5,
19 "seed": 42,
20 "bgm": true,
21 "movement_amplitude": "auto"
22}
23
24response = requests.post(url, headers=headers, json=data)
25
26if response.status_code == 200:
27 result = response.json()
28 print(json.dumps(result, indent=2))
29else:
30 print(f"Error: {response.status_code}")
31 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/vidu-q1-reference-to-video"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A middle-aged man sits on a wooden bench in a sunny park, reading an open hardcover book titled 'Vidu Q1 Reference'. The camera gently zooms in on the book’s cover and pages showing technical content, then back to the man turning pages thoughtfully. Soft sunlight filters through the trees, blending the three reference images naturally into one smooth scene.",
12 "image_urls": [
13 "https://segmind-resources.s3.amazonaws.com/input/62d98e27-8538-4953-95e6-e93d4a544fc1-39a80c5a-c4c4-405f-88f4-30fd1a45d6c9.jpeg",
14 "https://segmind-resources.s3.amazonaws.com/input/ac3266d0-271e-4e31-96a9-d31f26d8c22f-a052d794-4300-478d-8d99-5a10daf5200c.png",
15 "https://segmind-resources.s3.amazonaws.com/input/777c247c-8073-4d47-ac64-53b5fa088aae-d9afc6d7-d3ca-4baa-8920-cb41b56ff0b8.jpeg"
16 ],
17 "aspect_ratio": "16:9",
18 "duration": 5,
19 "seed": 42,
20 "bgm": true,
21 "movement_amplitude": "auto"
22}
23
24response = requests.post(url, headers=headers, json=data)
25
26if response.status_code == 200:
27 result = response.json()
28 print(json.dumps(result, indent=2))
29else:
30 print(f"Error: {response.status_code}")
31 print(response.text)API Endpoint
https://api.segmind.com/v1/vidu-q1-reference-to-videoParameters
aspect_ratiorequiredstringSets video aspect ratio. Choose 1:1 for Instagram or 16:9 for widescreen.
"16:9""16:9""1:1""9:16"durationrequiredintegerControls video length. Use 5 for short clips or 10 for more detailed presentation.
55image_urlsrequiredstring[]URLs of source images for reference. Use one URL to create a video from an image.
promptrequiredstringDefines the visual concept for the image. Use creative prompts to guide design style.
"A middle-aged man sits on a wooden bench in a sunny park, reading an open hardcover book titled 'Vidu Q1 Reference'. The camera gently zooms in on the book’s cover and pages showing technical content, then back to the man turning pages thoughtfully. Soft sunlight filters through the trees, blending the three reference images naturally into one smooth scene."bgmoptionalbooleanAdds background music to enhance video. Enable for dynamic content or disable for silent showcase.
truemovement_amplitudeoptionalstringConfigures movement strength in video. 'Auto' for default or specify for custom control.
"auto""auto""small""medium""large"seedoptionalintegerDetermines randomization for generation. Set to 42 for consistency or 0 for variation.
42Range: 0 - 999999Response Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out