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

# 2.2 Image to Video

> Transform a static image into a dynamic video with our highest quality model. Upload an image and generate a detailed video that brings it to life.



## OpenAPI

````yaml post /generate/2.2/i2v
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /generate/2.2/i2v:
    post:
      summary: Generate 2 2 I2V
      operationId: generate_2_2_i2v_generate_2_2_i2v_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_generate_2_2_i2v_generate_2_2_i2v_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X POST 'https://devapi.pika.art/generate/2.2/i2v' \
            -H 'X-API-KEY: your_api_key' \
            -H 'Accept: application/json' \
            -F 'image=@image.jpg;type=image/jpg' \
            -F 'promptText=The person is dancing gracefully' \
            -F 'negativePrompt=blurry, low quality' \
            -F 'seed=12345'
        - lang: python
          label: Python
          source: >

            import requests


            url = "https://devapi.pika.art/generate/2.2/i2v"

            payload = {
                "promptText": "The person is dancing gracefully",
                "negativePrompt": "blurry, low quality",
                "seed": 12345,
                "duration": 10,
                "resolution": "1080p"
            }

            headers = {
                "X-API-KEY": "your_api_key",
                "Accept": "application/json"
            }

            files = {
                "image": ("image.jpg", open("image.jpg", "rb"), "image/jpg")
            }

            response = requests.post(url, data=payload, headers=headers,
            files=files)

            print(response.json())
components:
  schemas:
    Body_generate_2_2_i2v_generate_2_2_i2v_post:
      properties:
        image:
          type: string
          format: binary
          title: Image
        promptText:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompttext
        negativePrompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Negativeprompt
        seed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seed
        resolution:
          type: string
          title: Resolution
          default: 1080p
        duration:
          type: integer
          title: Duration
          default: 5
      type: object
      required:
        - image
      title: Body_generate_2_2_i2v_generate_2_2_i2v_post
    GenerateResponse:
      properties:
        video_id:
          type: string
          title: Video Id
      type: object
      required:
        - video_id
      title: GenerateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````