---
title: "Kling 2.6 Pro - Create video from text or image"
method: POST
path: "/v1/ai/image-to-video/kling-v2-6-pro"
tags: ["image-to-video", "kling-v2-6-pro", "background_tasks"]
---

# Kling 2.6 Pro - Create video from text or image

`POST /v1/ai/image-to-video/kling-v2-6-pro`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/image-to-video/kling-v2-6-pro`
- Auth: API key in header `x-magnific-api-key`

## Request body

- union
  - KlingRequestV26TextToVideo
    - `webhook_url` string, uri: Webhook URL to notify the user when the task is completed
    - `prompt` string, required: Text prompt describing the desired video to generate, cannot exceed 2500 characters
    - `negative_prompt` string: Text prompt describing what to avoid in the generated video, cannot exceed 2500 characters
    - `cfg_scale` number, float: Flexibility in generation; The higher the value, the lower the model's degree of flexibility, and the stronger the relevance to the user's prompt.
    - `aspect_ratio` 'widescreen_16_9' | 'social_story_9_16' | 'square_1_1': Aspect ratio for the generated video
    - `duration` '5' | '10', required: Duration of the generated video in seconds
    - `generate_audio` boolean: Whether to generate audio for the video
  - KlingRequestV26ImageToVideo
    - `webhook_url` string, uri: Webhook URL to notify the user when the task is completed
    - `image` string, byte, required: Reference Image. Supports Base64 encoding or URL (ensure accessibility). For URL, must be publicly accessible. The image file size cannot exceed 10MB, and the resolution should not be less than 300x300px. Aspect ratio should be between 1:2.5 ~ 2.5:1.
    - `prompt` string: Text prompt describing the desired motion in the video, cannot exceed 2500 characters
    - `negative_prompt` string: Text prompt describing what to avoid in the generated video, cannot exceed 2500 characters
    - `cfg_scale` number, float: Flexibility in generation; The higher the value, the lower the model's degree of flexibility, and the stronger the relevance to the user's prompt.
    - `aspect_ratio` 'widescreen_16_9' | 'social_story_9_16' | 'square_1_1': Aspect ratio for the generated video
    - `duration` '5' | '10', required: Duration of the generated video in seconds
    - `generate_audio` boolean: Whether to generate audio for the video

## Response `200`

OK

- GetStyleTransferTaskStatus200Response
  - `data` TaskDetail, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
