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

# Kling image-to-video

> Generate a video from an image with a Kling model.

Use the image parameter to pass an image URL or Base64-encoded image data.




## OpenAPI

````yaml /ru/api-reference/openapi.json post /kling/v1/videos/image2video
openapi: 3.0.1
info:
  title: Rock API API моделей ИИ
  version: 1.0.0
  description: Справочник OpenAI-совместимого API моделей ИИ для Rock API.
servers:
  - url: https://rockapi.ai
security:
  - BearerAuth: []
tags:
  - name: List models
  - name: OpenAI format (Chat)
  - name: OpenAI format (Responses)
  - name: Image generation
  - name: Image generation/OpenAI-compatible format
  - name: Image generation/Qwen
  - name: Video generation
  - name: Video generation/Sora-compatible format
  - name: Video generation/Kling format
  - name: Video generation/Jimeng format
  - name: Claude format (Messages)
  - name: Gemini format
  - name: OpenAI format (Embeddings)
  - name: Text completions
  - name: OpenAI audio
  - name: Rerank
  - name: Moderations
  - name: Realtime
  - name: Not implemented
  - name: Not implemented/Fine-tunes
  - name: Not implemented/Files
paths:
  /kling/v1/videos/image2video:
    post:
      tags:
        - Video generation/Kling format
      summary: Kling image-to-video
      description: >
        Generate a video from an image with a Kling model.


        Use the image parameter to pass an image URL or Base64-encoded image
        data.
      operationId: createKlingImage2Video
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoRequest'
            example:
              model: kling-v1
              prompt: A person turns and walks away
              image: https://example.com/image.jpg
              duration: 5
              width: 1280
              height: 720
      responses:
        '200':
          description: Video generation task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoResponse'
          headers: {}
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    VideoRequest:
      type: object
      description: Video generation request
      properties:
        model:
          type: string
          description: Model/style ID
          example: kling-v1
        prompt:
          type: string
          description: Text prompt
          example: An astronaut stands up and walks away
        image:
          type: string
          description: Image input (URL or Base64)
          example: https://example.com/image.jpg
        duration:
          type: number
          description: Video duration in seconds
          example: 5
        width:
          type: integer
          description: Video width
          example: 1280
        height:
          type: integer
          description: Video height
          example: 720
        fps:
          type: integer
          description: Video frame rate
          example: 30
        seed:
          type: integer
          description: Random seed
          example: 20231234
        'n':
          type: integer
          description: Number of videos to generate
          example: 1
        response_format:
          type: string
          description: Response format
          example: url
        user:
          type: string
          description: User identifier
          example: user-1234
        metadata:
          type: object
          description: >-
            Extended parameters, such as negative_prompt, style, quality_level,
            and others
          additionalProperties: true
          properties: {}
    VideoResponse:
      type: object
      description: Video generation task submission response
      properties:
        task_id:
          type: string
          description: Task ID
          example: abcd1234efgh
        status:
          type: string
          description: Task status
          example: queued
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameter
              nullable: true
            code:
              type: string
              description: Error code
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Authenticate with a Bearer Token.
        Format: `Authorization: Bearer sk-xxxxxx`

````