Skip to main content
Endpoint: POST https://fal.run/fal-ai/veo3.1/reference-to-video Endpoint ID: fal-ai/veo3.1/reference-to-video

Try it in the Playground

Run this model interactively with your own prompts.

Quick Start

import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/veo3.1/reference-to-video",
    arguments={
        "prompt": "A chimpanzee wearing overalls frolics in the grassy field, gently playing with the butterflies. In the background, a circus tent and carousel beckon.",
        "image_urls": [
            "https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-1.png",
            "https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-2.png",
            "https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-3.png"
        ]
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Capabilities

  • Text prompt input
  • Aspect ratio control
  • Duration control

API Reference

Input Schema

prompt
string
required
The text prompt describing the video you want to generate
aspect_ratio
AspectRatioEnum
default:"16:9"
The aspect ratio of the generated video. Default value: "16:9"Possible values: 16:9, 9:16
duration
string
default:"8s"
The duration of the generated video. Default value: "8s"
resolution
ResolutionEnum
default:"720p"
The resolution of the generated video. Default value: "720p"Possible values: 720p, 1080p, 4k
generate_audio
boolean
default:"true"
Whether to generate audio for the video. Default value: true
auto_fix
boolean
default:"false"
Whether to automatically attempt to fix prompts that fail content policy or other validation checks by rewriting them.
safety_tolerance
SafetyToleranceEnum
default:"4"
The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Default value: "4"Possible values: 1, 2, 3, 4, 5, 6
image_urls
list<string>
required
URLs of the reference images to use for consistent subject appearance

Output Schema

video
File
required
The generated video.

Input Example

{
  "prompt": "A chimpanzee wearing overalls frolics in the grassy field, gently playing with the butterflies. In the background, a circus tent and carousel beckon.",
  "aspect_ratio": "16:9",
  "duration": "8s",
  "resolution": "720p",
  "generate_audio": true,
  "auto_fix": false,
  "safety_tolerance": "4",
  "image_urls": [
    "https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-1.png",
    "https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-2.png",
    "https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-3.png"
  ]
}

Output Example

{
  "video": {
    "url": "https://storage.googleapis.com/falserverless/example_outputs/veo31-r2v-output.mp4"
  }
}

Limitations

  • aspect_ratio restricted to: 16:9, 9:16
  • resolution restricted to: 720p, 1080p, 4k
  • safety_tolerance restricted to: 1, 2, 3, 4, 5, 6