Kling API

Kling 3.0 API and playground

The Kling 3.0 Standard, Kling 3.0 Pro and Kling 2.6 Pro video models: clips from text or from an image, with or without sound. Generate them in the MegaBrain playground in your browser or through the API, without a Kling account, paid per second of video from a prepaid US-dollar balance.

Kling models and prices

Prices in US dollars from the MegaBrain catalogue; they update automatically. Each model’s page has examples, every parameter and a playground.

ModelPer second, no soundPer second, with sound5-second clip, no sound5-second clip, with sound
Kling 3.0 Standard — text to video
kling-video/v3/standard/text-to-video
$0.0812$0.1218$0.4058$0.6092
Kling 3.0 Standard — image to video
kling-video/v3/standard/image-to-video
$0.0812$0.1218$0.4058$0.6092
Kling 3.0 Pro — text to video
kling-video/v3/pro/text-to-video
$0.1083$0.1623$0.5417$0.8117
Kling 3.0 Pro — image to video
kling-video/v3/pro/image-to-video
$0.1083$0.1623$0.5417$0.8117
Kling 2.6 Pro — text to video
kling-video/v2.6/pro/text-to-video
$0.0677$0.1353$0.3383$0.6767
Kling 2.6 Pro — image to video
kling-video/v2.6/pro/image-to-video
$0.0677$0.1353$0.3383$0.6767

No Kling account or subscription

You do not buy credits on Kling’s site: clips are generated in MegaBrain or through the API, and each one is paid from your balance at the price in the table.

Sound is on by default

Kling 3.0 and 2.6 add their own sound through the generate_audio parameter. It is on unless you pass false, and it costs more: the price with sound is in the table. For clips you will put your own music or voice-over on, turn it off.

From text and from an image

Text-to-video films a scene from a description; image-to-video brings a first frame to life: a product photo, an illustration or a Nano Banana image. Kling 3.0 makes clips of 3 to 15 seconds, Kling 2.6 Pro 5 or 10.

Nano Banana: images for the first frame

A failed generation is not charged

The price of a clip is held when the job is submitted and returned to the balance if the generation fails. The status and result of every job are visible in the dashboard and through the API.

First request

Generation runs through a queue: a POST request submits the job, then the script polls status_url and fetches the result from response_url. Create the key on the API key page after you sign up.

import os, time, requests

BASE = "https://getmegabrain.com/api/gateway/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MEGABRAIN_API_KEY']}"}

job = requests.post(f"{BASE}/queue/kling-video/v3/standard/text-to-video", headers=HEADERS, json={
  "prompt": "a drone slowly flies over a snowy forest at sunrise",
  "duration": "5",
  "generate_audio": False
}).json()

while requests.get(job["status_url"], headers=HEADERS).json()["status"] not in ("COMPLETED", "FAILED"):
    time.sleep(2)

print(requests.get(job["response_url"], headers=HEADERS).json())

Questions and answers

How much does one Kling clip cost?

The price per second of video times the clip’s length. The table works out a 5-second clip with and without sound. Kling 3.0 takes lengths from 3 to 15 seconds, Kling 2.6 Pro 5 or 10.

Is there a Kling API?

Yes. A POST request puts the job in the generation API’s queue, then you check its status and fetch the video link; there is a Python example below. Every parameter of the model is on its page and in the generation API docs.

Do I need a Kling account or subscription?

No. Sign up on MegaBrain and top up the balance by card: Kling clips are paid from it per second of video, and nothing is charged for a generation that fails.

Can I use Kling without code?

Yes. Every model page has a playground: set the prompt, length, sound and first frame in a form, generate the clip in the browser and copy the ready API code from the same page.

Get your API key

Sign-up is open. Create an account, top up the balance by card and create a key: it works for every text, image, video and audio model in the catalogue. Credits never expire.

Questions? Write to team@getmegabrain.com