---
title: "Kling 4K T2V - Generate video from text"
method: POST
path: "/v1/ai/video/kling-4k-t2v"
tags: ["video", "kling-4k-t2v", "background_tasks"]
---

# Kling 4K T2V - Generate video from text

`POST /v1/ai/video/kling-4k-t2v`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/video/kling-4k-t2v`
- Auth: API key in header `x-magnific-api-key`

Generate AI video in 4K resolution from a text prompt using Kling 4K Text-to-Video.

**Features:**
- **Text-to-video**: Generate 4K videos from text prompts
- **Camera control**: Optionally specify camera movement type and configuration

**Duration:** 3-15 seconds
**Resolution:** 4K output quality.

## Request body

- Kling4kT2vRequest
  - `webhook_url` string, uri: Optional callback URL that receives asynchronous notifications when the task changes status. The payload includes the task status and result URL when completed.
  - `prompt` string, required: Text prompt describing the desired video content. Maximum 2500 characters. **Tips for better results:** - Be specific about motion, camera angles, and actions - Describe the scene, characters, and atmosphere
  - `negative_prompt` string: Undesired elements to avoid in the generated video. Maximum 2500 characters.
  - `cfg_scale` number, float: Guidance scale controlling prompt adherence versus creative freedom. Range: 0 to 1. - **0**: Maximum creative freedom, loosest interpretation of the prompt - **0.5** (default): Balanced between prompt adherence and creativity - **1**: Strongest adherence to the prompt, least creative variation
  - `aspect_ratio` '16:9' | '9:16' | '1:1': Aspect ratio for the generated video: - `16:9`: Landscape (widescreen) - ideal for YouTube, presentations - `9:16`: Portrait (vertical) - ideal for TikTok, Instagram Stories, Reels - `1:1`: Square - ideal for Instagram posts, social media
  - `duration` '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15': Duration of the generated video in seconds. **Range:** 3-15 seconds

## Response `200`

OK - Task created successfully

- unknown

## 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)
