Kling 4.0 Text to Video API: AI Video Generator

Generate Kling 4.0 videos from a text prompt. 3-30s, 720p/1080p, native audio. Pay per generation, no subscription. Kling 4.0 Text-to-Video generates 3-30 second clips at 720p/1080p with native audio from a text prompt.

Interactive model controls

Kling 4.0 Text-to-Video generates 3-30 second clips at 720p/1080p with native audio from a text prompt.

📝

Overview

About this model

Kling 4.0 Text-to-Video turns a text prompt into a 3-30 second clip at 720p or 1080p with native audio, in 16:9, 9:16, 1:1 or 21:9. Describe the scene, camera and sound in the prompt and choose the duration up to 30 seconds. To keep characters, objects or voices consistent, use Kling 4.0 Reference to Video; to direct a clip from still frames, use Kling 4.0 Keyframe to Video.

1Cinematic shots: Generate long single-take clips up to 30 seconds from a prompt.
2Social video: Produce 9:16 vertical clips with native audio.
3Ads: Draft product and brand scenes before adding references.
4Storytelling: Prototype scenes and camera moves in one request.
💰

Pricing & Value

Cost analysis

muapiapp$0.157 per second at 720p ($0.785 per 5s clip)

$0.157/s at 720p, $0.235/s at 1080p.

** Competitor pricing is estimated based on similar model architectures and usage tiers.

⚙️

Technical Details

Configuration schema

Promptstring

Video description (max 8000 chars).

Default ValueA lone astronaut walks across a red desert at sunrise, dust drifting past the camera, cinematic wide shot with wind and distant thunder
Durationint

Video length in seconds (3-30).

Default Value5
ResolutionEnum (2 options)

Output resolution.

Default Value720p
Aspect RatioEnum (4 options)

Output aspect ratio.

Default Value16:9
📖

Implementation Guide

Developer documentation

How to Use Kling 4.0 Text to Video

  1. Write the prompt: Describe the subject, action, camera movement and sound (up to 8000 characters).

  2. Configure output: duration (3-30s), resolution (720p or 1080p) and aspect_ratio (16:9, 9:16, 1:1, 21:9).

  3. Submit and collect the result: The endpoint is async — poll /api/v1/predictions/{request_id}/result or pass a webhook_url.

curl -X POST https://api.muapi.ai/api/v1/kling-4.0-text-to-video \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"prompt": "A lone astronaut walks across a red desert at sunrise, dust drifting past the camera, cinematic wide shot", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9"}'
❓

Common Questions

Frequently asked

What are the duration and resolution limits?

3 to 30 seconds per clip at 720p or 1080p.

Does it generate audio?

Yes, native audio is generated with the video.

Can I use reference images or videos?

Not on this endpoint. Use Kling 4.0 Reference to Video for images, videos, elements and voices, or Keyframe to Video for first/last frames.

How is pricing calculated?

Per second of output video: $0.157/s at 720p and $0.235/s at 1080p.

How do I get the result?

The endpoint is asynchronous. Poll /api/v1/predictions/{request_id}/result or pass a webhook_url to be notified when the video is ready.