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

# Video introduction

# Gemini Video Generation

Generate and edit videos using Google's **Veo 2 / Veo 3 / Veo 3.1** models. Supports text-to-video, image-to-video, duration extension, reshoot, and object insert/remove.

## Supported Models

| Model                        | Description                                                   |
| ---------------------------- | ------------------------------------------------------------- |
| `veo31_fast`                 | Veo 3.1 Fast — latest, recommended for most use cases         |
| `veo31_quality`              | Veo 3.1 Quality — highest quality                             |
| `veo31_fast_ingredients`     | Veo 3.1 Fast with 1-3 reference images (ingredients-to-video) |
| `veo3_fast` / `veo3_quality` | Veo 3 generation                                              |
| `veo2_fast` / `veo2_quality` | Veo 2 generation (legacy)                                     |

## Features

<CardGroup cols={2}>
  <Card title="Text-to-Video" icon="wand-magic-sparkles">
    Create videos from text prompts with `action: "text2video"`
  </Card>

  <Card title="Image-to-Video" icon="images">
    Use 1-2 reference images (start frame / start+end) with `action: "img2video"`
  </Card>

  <Card title="Ingredients-to-Video" icon="layer-group">
    Use 1-3 reference images to compose a scene with `action: "ingredients2video"`
  </Card>

  <Card title="Upsample & Extend" icon="up-right-and-down-left-from-center">
    Upscale to 1080p/4K, generate GIFs, or extend video duration
  </Card>

  <Card title="Reshoot" icon="camera-rotate">
    Re-generate with different camera motion (15 motion types)
  </Card>

  <Card title="Object Edit" icon="scissors">
    Insert or remove objects from videos using mask-based editing
  </Card>
</CardGroup>

## How to Use

<Steps>
  <Step title="Generate a video">
    Call `POST /gemini/video/generate` with your prompt and model. You'll receive a `taskId`.
  </Step>

  <Step title="Poll for results">
    Use `GET /gemini/task/result?taskId=xxx` to poll until status is `completed`. The result contains the video URL.
  </Step>

  <Step title="Enhance (optional)">
    Use the returned `videoId` to upscale, extend, reshoot, or edit objects in the video.
  </Step>
</Steps>

## Available Endpoints

### Generation

| Endpoint                      | Method | Description                                                       |
| ----------------------------- | ------ | ----------------------------------------------------------------- |
| `/gemini/video/generate`      | POST   | Create video from text or images                                  |
| `/gemini/video/prompt/expand` | POST   | Expand a simple prompt into a cinematic description (synchronous) |

### Post-Processing

| Endpoint                 | Method | Description                              |
| ------------------------ | ------ | ---------------------------------------- |
| `/gemini/video/upsample` | POST   | Upscale to 1080p/4K or generate GIF      |
| `/gemini/video/extend`   | POST   | Extend video duration (Veo 3.1 only)     |
| `/gemini/video/reshoot`  | POST   | Re-generate with different camera motion |

### Object Editing

| Endpoint                      | Method | Description                   |
| ----------------------------- | ------ | ----------------------------- |
| `/gemini/video/object/insert` | POST   | Insert an object into a video |
| `/gemini/video/object/remove` | POST   | Remove an object from a video |

### Task Management

Video and Image share the same polling endpoint — see [Get Task Result](/api-reference/gemini/task).

| Endpoint              | Method | Description                                     |
| --------------------- | ------ | ----------------------------------------------- |
| `/gemini/task/result` | GET    | Get task result by taskId (video **and** image) |

***

### Explore the API Documentation

* [Generate Video](video) — Text-to-video, image-to-video, ingredients-to-video
* [Upsample Video](upsample) — Upscale to 1080p/4K or generate GIF
* [Expand Prompt](prompt-expand) — Enhance prompts for better results
* [Reshoot Video](reshoot) — Change camera motion
* [Extend Video](extend) — Extend video duration
* [Insert Object](object-insert) — Add objects to video
* [Remove Object](object-remove) — Remove objects from video
* [Get Task Result](/api-reference/gemini/task) — Shared poll for video & image tasks
