Vidu Q1 Reference to Video

Vidu AI reference to video transforms text and images into dynamic, high-quality videos effortlessly.

~120.44s
$0.5 per generation
 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

POSThttps://api.segmind.com/v1/vidu-q1-reference-to-video

Parameters

aspect_ratiorequired
string

Sets video aspect ratio. Choose 1:1 for Instagram or 16:9 for widescreen.

Default: "16:9"
Allowed values :
"16:9""1:1""9:16"
durationrequired
integer

Controls video length. Use 5 for short clips or 10 for more detailed presentation.

Default: 5
Allowed values :
5
image_urlsrequired
string[]

URLs of source images for reference. Use one URL to create a video from an image.

promptrequired
string

Defines the visual concept for the image. Use creative prompts to guide design style.

Default: "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."
bgmoptional
boolean

Adds background music to enhance video. Enable for dynamic content or disable for silent showcase.

Default: true
movement_amplitudeoptional
string

Configures movement strength in video. 'Auto' for default or specify for custom control.

Default: "auto"
Allowed values :
"auto""small""medium""large"
seedoptional
integer

Determines randomization for generation. Set to 42 for consistency or 0 for variation.

Default: 42Range: 0 - 999999

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out