> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Veo 3.1 Fast First/Last Frame Video Generation

Generate a video by specifying first-frame and last-frame images together with a text prompt. The model interpolates between the two frames to generate coherent motion content. Uses the Google Veo 3.1 Fast model (`veo-3.1-fast-generate-001`) for faster generation.

<Tip>
  This is an **asynchronous** API and only returns the asynchronous task's task\_id. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API key}}.
</ParamField>

## Request Body

<ParamField body="seed" type="integer">
  Random seed for deterministic generation. The same seed and parameters will produce the same result.

  Value range: \[0, 4294967295]
</ParamField>

<ParamField body="image" type="string" required={true}>
  First-frame image, supporting image URLs or Base64 encoding. Supports JPEG and PNG formats, up to 20MB.
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  Text prompt describing the video content and the motion process between the first and last frames.
</ParamField>

<ParamField body="last_image" type="string" required={true}>
  Last-frame image, supporting image URLs or Base64 encoding. Supports JPEG and PNG formats, up to 20MB.
</ParamField>

<ParamField body="resolution" type="string" default="720p">
  Output video resolution.

  Allowed values: `720p`, `1080p`
</ParamField>

<ParamField body="aspect_ratio" type="string" default="16:9">
  Video aspect ratio. 16:9 is landscape, and 9:16 is portrait.

  Allowed values: `16:9`, `9:16`
</ParamField>

<ParamField body="sample_count" type="integer" default={1}>
  Number of videos to generate, ranging from 1 to 4.

  Value range: \[1, 4]
</ParamField>

<ParamField body="enhance_prompt" type="boolean" default={true}>
  Whether to enhance the input prompt to improve generation quality.
</ParamField>

<ParamField body="generate_audio" type="boolean" default={false}>
  Whether to generate an audio track.
</ParamField>

<ParamField body="negative_prompt" type="string">
  Negative prompt describing content you do not want to appear in the video.
</ParamField>

<ParamField body="duration_seconds" type="integer" default={8}>
  Video duration in seconds. Options: 4, 6, or 8 seconds.

  Allowed values: `4`, `6`, `8`
</ParamField>

<ParamField body="person_generation" type="string" default="allow_adult">
  Person generation control. allow\_adult: allow generating adults; disallow: prohibit generating people.

  Allowed values: `allow_adult`, `disallow`
</ParamField>

## Response Information

<ResponseField name="task_id" type="string" required={false}>
  Use task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
