Vidu Q1 Reference to Video API

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

PlaygroundAPIPricing
~120.69s
POST /v2/vidu-q1-reference-to-video · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
 4
 5# Async (v2) — recommended for long-running / video models.
 6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
 7# deadline and keeps the request_id so you can re-poll later.
 8client = SegmindClient()                      # reads SEGMIND_API_KEY
 9payload = {
10    "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.",
11    "image_urls": ["https://segmind-resources.s3.amazonaws.com/input/62d98e27-8538-4953-95e6-e93d4a544fc1-39a80c5a-c4c4-405f-88f4-30fd1a45d6c9.jpeg", "https://segmind-resources.s3.amazonaws.com/input/ac3266d0-271e-4e31-96a9-d31f26d8c22f-a052d794-4300-478d-8d99-5a10daf5200c.png", "https://segmind-resources.s3.amazonaws.com/input/777c247c-8073-4d47-ac64-53b5fa088aae-d9afc6d7-d3ca-4baa-8920-cb41b56ff0b8.jpeg"],
12    "aspect_ratio": "16:9",
13    "duration": 5,
14    "seed": 42,
15    "bgm": True,
16    "movement_amplitude": "auto",
17}
18job = client.submit_async("vidu-q1-reference-to-video", **payload)
19print(job.request_id)                         # available immediately
20try:
21    result = job.wait(timeout=900, interval=2.0)
22    print(result["status"])                  # COMPLETED
23    print(result.get("output"))              # model output (e.g. video URL)
24except InferenceTimeout as e:
25    print("still running:", e.request_id)    # re-poll later with this id
26except InferenceFailed as e:
27    print("failed:", e.detail)
28
29# Fast models (<=600s) can use the one-liner instead:
30# result = segmind.run("vidu-q1-reference-to-video", **payload)

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

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/vidu-q1-reference-to-video

    Submit — returns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Poll — until COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Result — final response body

Status states

QUEUED— Accepted, waiting for a worker
PROCESSING— Running on a worker
COMPLETED— Done — result body is ready
FAILED— Errored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

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