import fal_clientdef 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)
import { fal } from "@fal-ai/client";const result = await fal.subscribe("fal-ai/veo3.1/reference-to-video", { input: { 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" ] }, logs: true, onQueueUpdate: (update) => { if (update.status === "IN_PROGRESS") { update.logs.map((log) => log.message).forEach(console.log); } },});console.log(result.data);console.log(result.requestId);
curl --request POST \ --url https://fal.run/fal-ai/veo3.1/reference-to-video \ --header "Authorization: Key $FAL_KEY" \ --header "Content-Type: application/json" \ --data '{ "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" ]}'
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
{ "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" ]}