# Kling image-to-video

`POST /kling/v1/videos/image2video`

Generates a video from an image with a Kling model.

The `image` parameter accepts an image URL or Base64-encoded image data.

## Authorizations

Bearer authentication — send `Authorization: Bearer <token>`.

## Request Body (application/json)

```json
{
  "type": "object",
  "description": "Video generation request",
  "properties": {
    "model": {
      "type": "string",
      "description": "Model/style ID",
      "example": "kling-v1"
    },
    "prompt": {
      "type": "string",
      "description": "Text prompt",
      "example": "The 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": "Extra parameters (negative_prompt, style, quality_level and so on)",
      "additionalProperties": true,
      "properties": {}
    }
  }
}
```

## Responses

### 200 — Video generation task created

```json
{
  "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"
    }
  }
}
```

### 400 — Invalid request parameters

```json
{
  "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
        }
      }
    }
  }
}
```
