> ## 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 Image-to-Video

<Info>
  The Veo 3.1 Preview API is automatically compatible with this endpoint
</Info>

Use the Veo 3.1 Fast video generation model to generate high-quality video content from an input image and text description. This endpoint uses asynchronous processing, and you need to query the final generated result using the task\_id.

## 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="prompt" type="string" required={true}>
  A text string describing the video you want to generate.
</ParamField>

<ParamField body="image" type="string" required={false}>
  The input image, supporting either a URL or base64 encoding.
</ParamField>

<ParamField body="last_image" type="string" required={false}>
  The ending image, used to fill the last frame of the video. Supports either a URL or base64 encoding.
</ParamField>

<ParamField body="aspect_ratio" type="string" required={false}>
  Specifies the aspect ratio of the generated video.

  Enum values: `16:9`, `9:16`. The default value is `16:9`.
</ParamField>

<ParamField body="duration_seconds" type="integer" required={false}>
  The length, in seconds, of the video file you want to generate.

  Enum values: `4`, `6`, `8`. The default value is `8`.
</ParamField>

<ParamField body="enhance_prompt" type="boolean" required={false}>
  Specifies whether to use Gemini to enhance your prompt. Only `true` is supported.

  Default value: `true`
</ParamField>

<ParamField body="generate_audio" type="boolean" required={true}>
  Specifies whether to generate audio for the video.
</ParamField>

<ParamField body="negative_prompt" type="string" required={false}>
  A text string describing the content you want to prevent the model from generating.
</ParamField>

<ParamField body="person_generation" type="string" required={false}>
  Safety setting that controls whether person or face generation is allowed.

  Enum values:

  * `allow_adult` (default): Only allows generation of adults
  * `dont_allow`: Does not allow people or faces to be included in the image
  * `allow_all`: Allows generation of people of all ages (requires the project to be in the allowlist)
</ParamField>

<ParamField body="resolution" type="string" required={false}>
  The resolution of the generated video.

  Enum values: `720p` (default) or `1080p`
</ParamField>

<ParamField body="sample_count" type="integer" required={false}>
  The number of video samples to generate.

  Value range: 1-4
</ParamField>

<ParamField body="seed" type="uint32" required={false}>
  A number used to initialize the random generation process. Using the same seed, prompt, and other parameters will produce the same output video, making the generation process deterministic.

  Value range: 0-4,294,967,295
</ParamField>

## Response Parameters

<ResponseField name="task_id" type="string" required={true}>
  The task\_id of the asynchronous task. You should use this task\_id to request the [Get Task Result API](/en/docs/models/reference-get-async-task-result) to obtain the generated result
</ResponseField>
