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

# Image to Video

> Animate your image to a video



## OpenAPI

````yaml POST /v1/jobs/gen2/image2video
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.haiper.ai
security:
  - bearerAuth: []
paths:
  /v1/jobs/gen2/image2video:
    post:
      description: Animate your image to a video
      requestBody:
        description: The information to create video
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Image2video'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewCreation'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Image2video:
      allOf:
        - required:
            - prompt
            - config
          type: object
          properties:
            is_public:
              description: >-
                Whether is generation be public on Haiper Platform, please set
                to false if you will to keep it private. The default value is
                true
              type: boolean
            is_enable_prompt_enhancer:
              description: >-
                Whether let AI help you to enhance the prompt. The default value
                is true
              type: boolean
            prompt:
              description: The prompt of the generation
              type: string
            negative_prompt:
              description: The negative prompt of the generation
              type: string
            gen_mode:
              description: >-
                Default: 'smooth', valid: 'smooth'(For videos with extensive
                motion), 'enhanced'(For videos with high fidelity & motion)
              type: string
            config:
              description: ''
              type: object
              properties:
                source_image:
                  description: >-
                    URL of the image (supports Base64 encoding). Supported image
                    formats include JPG, PNG, and WebP.
                  type: string
            settings:
              type: object
              properties:
                seed:
                  description: 'Default: -1'
                  type: number
                duration:
                  description: 'Default 6, valid: 4, 6'
                  type: number
    NewCreation:
      required:
        - status
      type: object
      properties:
        status:
          description: ''
          type: string
        value:
          description: ''
          type: object
          properties:
            generation_id:
              description: ''
              type: string
    Error:
      required:
        - error
      type: object
      properties:
        message:
          type: string
        code:
          type: integer
          format: int32
        details:
          type: array
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````