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

# Video to Video

> Generate videos from video using the Video to Video API.

### Video to Video

Generate videos from video.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/mod/images/video-api/assets/images/Image-to-video-06907dcc4363b727c589be0243af41f4.jpg" alt="Video to Video Example" />

## Request

Make a `POST` request to below endpoint and pass the required parameters in the request body.

```curl curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
--request POST 'https://modelslab.com/api/v6/video/video2video' \
```

## Body

```json json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "key":"your_api_key",
    "init_image": "https://assets.modelslab.ai/generations/8761aacb-6dce-4cea-8705-46de16003794.png",
    "init_video": "https://assets.modelslab.ai/generations/b0374de1-ef0e-417b-9982-dd488331cae6.mp4",
    "to_animate": true,
    "seed": null,
    "resolution": 720,
    "num_inference_steps": 6,
    "base64": false,
    "track_id ": null,
    "webhook": null
}
```


## OpenAPI

````yaml POST /video/video2video
openapi: 3.1.0
info:
  title: ModelsLab Video API
  description: >-
    A comprehensive API for AI-driven video generation including text-to-video,
    image-to-video, scene transitions, and video management capabilities
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
security: []
paths:
  /video/video2video:
    post:
      summary: Generate video from video
      description: Creates a video from an initial video using
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoToVideoRequest'
      responses:
        '200':
          description: Image-to-video generation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoResponse'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    VideoToVideoRequest:
      type: object
      required:
        - key
        - init_image
        - init_video
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        init_image:
          type: string
          format: uri
          description: URL of the initial image
        init_video:
          type: string
          format: uri
          description: URL of the initial video
        to_animate:
          type: boolean
          description: >-
            Should only be used for high motion videos. For standard videos,
            keep default false.
        resolution:
          type: integer
          maximum: 720
          description: ' Output video resolution. Higher resolution may increase processing time. It allows 480 and 720 resolutions.'
        num_inference_steps:
          type: integer
          default: 6
          maximum: 10
          description: >-
            Number of inference steps for generation. Higher values may improve
            quality but increase processing time
        webhook:
          type: string
          format: uri
          description: Webhook URL
        track_id:
          type: string
          description: Tracking ID
    VideoResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - processing
            - error
          description: Status of the video generation
        generationTime:
          type: number
          description: Time taken to generate the video in seconds
        id:
          type: integer
          description: Unique identifier for the video generation
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated video URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy video URLs
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future video URLs for queued requests
        meta:
          type: object
          description: Metadata about the video generation including all parameters used
        eta:
          type: integer
          description: Estimated time for completion in seconds (processing status)
        message:
          type: string
          description: Status message or additional information
        tip:
          type: string
          description: Additional information or tips for the user
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when processing
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description

````