> ## 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.

# Image to Video

> Generate videos from images using the Image to Video API. Supported model_id are `wan2.2` and `ltx-2.3`. Any other models passed will be ignored and defauted to `wan2.2`

### Image to Video

Generate videos from images.

![Image to Video Example](https://assets.modelslab.ai/generations/92f1f218-f354-48d7-96ec-afe262e76c93.png)

## Request

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

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/video/img2video' \
```

## Body

```json json theme={null}
{
    "key":"your_api_key",
    "init_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/e2f9cb8e-cb87-4143-dd81-a9e77e3bb800/768",
    "model_id": "wan2.2",
    "height":512,
    "width":512,
    "num_frames":25,
    "num_inference_steps":20,
    "min_guidance_scale":1,
    "max_guidance_scale":3,
    "motion_bucket_id":20,
    "noise_aug_strength":0.02,
    "webhook":null,
    "track_id":null
}
```


## OpenAPI

````yaml POST /video/img2video
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/img2video:
    post:
      summary: Generate video from image
      description: Creates a video from an initial image using the SVD model
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageToVideoRequest'
      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:
    ImageToVideoRequest:
      type: object
      required:
        - key
        - model_id
        - init_image
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        model_id:
          type: string
          enum:
            - svd
          description: The ID of the model to use
        init_image:
          type: string
          format: uri
          description: URL of the initial image
        prompt:
          type: string
          description: Text prompt describing desired video elements
        negative_prompt:
          type: string
          description: Items you don't want in the video
        height:
          type: integer
          maximum: 512
          description: Height in pixels
        width:
          type: integer
          maximum: 512
          description: Width in pixels
        num_frames:
          type: integer
          default: 16
          maximum: 25
          description: Number of frames
        num_inference_steps:
          type: integer
          default: 20
          maximum: 50
          description: Number of denoising steps
        min_guidance_scale:
          type: number
          minimum: 1
          maximum: 8
          default: 1
          description: Start value of guidance scale
        max_guidance_scale:
          type: number
          minimum: 1
          maximum: 8
          default: 3
          description: End value of guidance scale
        motion_bucket_id:
          type: integer
          default: 127
          description: Motion control parameter
        noise_aug_strength:
          type: number
          minimum: 0
          maximum: 1
          description: Noise augmentation strength
        fps:
          type: integer
          maximum: 16
          description: Frames per second
        output_type:
          type: string
          enum:
            - mp4
            - gif
          description: Output format
        temp:
          type: boolean
          default: false
          description: Store in temporary storage
        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

````