Skip to main content
google avatar

Veo 3.1 First/Last Frame to Video API

google/veo-3.1/first-last-frame-to-video

Generate seamless 8-second video transitions by interpolating between a first and last frame with high-fidelity visuals and native audio.

0.4 per second of output video

Model Input

Input

The text description for the video.

Text describing what not to include in the video.

The initial image to animate (start frame).

The final image for the video to transition to.

The video's aspect ratio.

The video's resolution.

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Fill in the input form and click submit to see the output
Logs (1 lines)

Model Example Requests

Examples

Example output 1Example output 2

Veo 3.1 First/Last Frame to Video API

Veo 3.1 First/Last Frame to Video is a image-to-video AI model by google. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at $0.4 per second of video.

POST https://queue.modelrunner.run/google/veo-3.1/first-last-frame-to-video

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/google/veo-3.1/first-last-frame-to-video \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "your prompt here",
    "image_url": "https://example.com/input.jpg",
    "last_frame_url": "https://example.com/input.jpg",
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/google/veo-3.1/first-last-frame-to-video/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/google/veo-3.1/first-last-frame-to-video/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("google/veo-3.1/first-last-frame-to-video", {
  input: {
    "prompt": "your prompt here",
    "image_url": "https://example.com/input.jpg",
    "last_frame_url": "https://example.com/input.jpg"
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/google/veo-3.1/first-last-frame-to-video",
    headers=headers,
    json={
      "prompt": "your prompt here",
      "image_url": "https://example.com/input.jpg",
      "last_frame_url": "https://example.com/input.jpg"
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

NameTypeRequiredDescription
promptstringyesThe text description for the video.
negative_promptstringnoText describing what not to include in the video.
image_urlstring (uri)yesThe initial image to animate (start frame).
last_frame_urlstring (uri)yesThe final image for the video to transition to.
aspect_ratioenumnoThe video's aspect ratio. Default: "16:9".
resolutionenumnoThe video's resolution. Default: "720p".

Machine-readable: OpenAPI schema · llms.txt

Use Veo 3.1 First/Last Frame to Video from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Veo 3.1 First/Last Frame to Video becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint google/veo-3.1/first-last-frame-to-video.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run google/veo-3.1/first-last-frame-to-video on ModelRunner to generate video”. MCP setup guide.

Model Details

Model Details

Veo 3.1 redefines video creation by allowing users to generate high-fidelity, 8-second videos that transition seamlessly between a specific starting image and an ending image. This "frame-specific generation" capability gives creators precise control over the video's trajectory, ensuring the output begins and resolves exactly as intended. Whether animating a character's movement, transforming a scene's lighting, or depicting a changing landscape, the model intelligently interpolates the frames between the two inputs based on a descriptive text prompt.

Beyond simple cross-fading, this model understands semantic context and physics, generating realistic motion and intermediate states that bridge the gap between the provided visuals. The result is a smooth, cinema-quality video available in 720p or 1080p resolutions, accompanied by natively generated audio that synchronizes with the visual events.

### Use Cases * **Storytelling:** Visualizing a character disappearing, a prop changing location, or a scene evolving over time. * **Creative Transitions:** Morphing one object into another or shifting between distinct environments (e.g., day to night). * **Marketing:** Creating dynamic transitions between product states, such as a box opening or a device turning on.

### How to get the best results * **Prompting:** Clearly describe the action, movement, or change occurring between the two frames in the `prompt` field (e.g., "The fog thickens and swirls around her, and she slowly fades away"). * **Image Alignment:** For the most cohesive results, ensure the first and last images share a consistent artistic style and aspect ratio. * **Configuration:** The model creates 8-second videos by default for this mode. Select between `16:9` or `9:16` aspect ratios to match your input images and target platform.

To run via ModelRunner javascript client, use the following code:

```javascript import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe('google/veo-3.1-first-last-frame-to-video', { input: { "prompt": "The fog thickens and swirls around her, and she slowly fades away, vanishing completely.", "negative_prompt": "low quality, blurry, distorted, cartoon", "image_url": "https://storage.googleapis.com/generativeai-downloads/images/ghost_girl.png", "last_frame_url": "https://storage.googleapis.com/generativeai-downloads/images/empty_tree.png", "aspect_ratio": "16:9", "resolution": "720p" } }); ```