Skip to main content
POST
Kling 4K T2V - Generate video from text

Authorizations

x-magnific-api-key
string
header
required

Your Magnific API key. Required for authentication. Learn how to obtain an API key

Body

application/json
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
Maximum string length: 2500
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.

negative_prompt
string
default:blur, distort, and low quality

Undesired elements to avoid in the generated video. Maximum 2500 characters.

Maximum string length: 2500
cfg_scale
number<float>
default:0.5

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
Required range: 0 <= x <= 1
aspect_ratio
enum<string>
default:16:9

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
Available options:
16:9,
9:16,
1:1
duration
enum<integer>
default:5

Duration of the generated video in seconds.

Range: 3-15 seconds

Available options:
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15

Response

OK - Task created successfully

OK - The task exists and the status is returned