API guide
Kling API
Curl, Python and JavaScript for the Kling 3.0 API, the cost of each call, and how to use Kling motion control.
One call below makes a 4 s 1080p Kling 3.0 clip without sound and costs $0.448 on Sume. All options: Kling pricing.
Code examples
Set your key first: export SUME_API_KEY=.... Each example prints the video's URL when it is ready; copy the file, because provider links can expire.
curl
Tested: we ran this exact code once on Nov 1, 2026, and it returned a video.
# The parentheses keep an error from closing your terminal if you paste this.
(
# Start the job. This is the call that costs money.
RESPONSE=$(curl -sS -X POST https://api.sume.com/v1/video-router/generate \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "kling-3",
"prompt": "A glass of iced coffee on a wooden table, condensation running down the glass, slow push-in, soft morning light",
"resolution": "1080p",
"duration": 4,
"aspect_ratio": "16:9",
"generate_audio": false,
"mode": "async"
}')
JOB_ID=$(echo "$RESPONSE" | jq -r '.data.job.id // empty' 2>/dev/null)
if [ -z "$JOB_ID" ]; then echo "Could not start the job: $RESPONSE" >&2; exit 1; fi
echo "Job: $JOB_ID"
# Wait for it. If this stops, read the same job again: don't start a new one.
while true; do
JOB=$(curl -sS https://api.sume.com/v1/jobs/$JOB_ID -H "Authorization: Bearer $SUME_API_KEY")
STATUS=$(echo "$JOB" | jq -r '.data.job.status // empty' 2>/dev/null)
case "$STATUS" in
completed) echo "$JOB" | jq -r '.data.job.result.artifacts[0].url'; exit 0 ;;
failed|canceled) echo "Job $JOB_ID $STATUS: $(echo "$JOB" | jq -c '.data.job.error')" >&2; exit 1 ;;
queued|processing) sleep 5 ;;
*) echo "Could not read job $JOB_ID: $JOB" >&2; exit 1 ;;
esac
done
)
Python
Tested: we ran this exact code once on Nov 1, 2026, and it returned a video.
import json, os, time, urllib.request, uuid
API = "https://api.sume.com"
HEADERS = {"Authorization": "Bearer " + os.environ["SUME_API_KEY"], "Content-Type": "application/json"}
def call(path, body=None, headers={}):
data = None if body is None else json.dumps(body).encode()
request = urllib.request.Request(API + path, data=data, headers={**HEADERS, **headers})
with urllib.request.urlopen(request) as response:
return json.load(response)["data"]
# Start the job. This is the call that costs money.
job_id = call("/v1/video-router/generate", {
"model": "kling-3",
"prompt": "A glass of iced coffee on a wooden table, condensation running down the glass, slow push-in, soft morning light",
"resolution": "1080p",
"duration": 4,
"aspect_ratio": "16:9",
"generate_audio": False,
"mode": "async"
}, {"Idempotency-Key": str(uuid.uuid4())})["job"]["id"]
print("Job:", job_id)
# Wait for it. If this loop stops, read the same job again: don't start a new one.
while True:
job = call("/v1/jobs/" + job_id)["job"]
if job["status"] == "completed":
print(job["result"]["artifacts"][0]["url"])
break
if job["status"] in ("failed", "canceled"):
raise SystemExit(job["error"])
time.sleep(5)
JavaScript
Untested: not run, because a third run would have gone over this page's test budget. It sends the same request as the two above.
// Save this as video.mjs and run it with Node 20 or newer: node video.mjs
const API = "https://api.sume.com";
const headers = { Authorization: `Bearer ${process.env.SUME_API_KEY}`, "Content-Type": "application/json" };
async function call(path, init) {
const response = await fetch(API + path, { headers, ...init });
const json = await response.json();
if (!response.ok) throw new Error(JSON.stringify(json.error));
return json.data;
}
// Start the job. This is the call that costs money.
const { job: started } = await call("/v1/video-router/generate", {
method: "POST",
headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({
"model": "kling-3",
"prompt": "A glass of iced coffee on a wooden table, condensation running down the glass, slow push-in, soft morning light",
"resolution": "1080p",
"duration": 4,
"aspect_ratio": "16:9",
"generate_audio": false,
"mode": "async"
}),
});
console.log("Job:", started.id);
// Wait for it. If this loop stops, read the same job again: don't start a new one.
while (true) {
const { job } = await call(`/v1/jobs/${started.id}`);
if (job.status === "completed") {
console.log(job.result.artifacts[0].url);
break;
}
if (job.status === "failed" || job.status === "canceled") throw new Error(JSON.stringify(job.error));
await new Promise((resolve) => setTimeout(resolve, 5000));
}
Kling motion control
Kling motion control moves the character in your image the way a person moves in a reference video. A 5 s Kling 3.0 clip costs $0.63 in standard mode on Kling's own API. You can't reach it through Sume, whose Kling models take no video input, so this example goes straight to Kling.
- Set your key first: export KLING_API_KEY=... This example uses Kling's key, not a Sume key. It starts a task and then reads it; it doesn't wait for you.
- Authentication, as Kling's docs state it (read November 1, 2026). API Key, listed "for all models": send Authorization: Bearer plus the key. Access Key / Secret Key, listed as "API only applicable to legacy version design standards": generate an API Token following the JWT standard, then send Authorization: Bearer plus the token. Kling's motion control example uses the API Key form.
- Endpoint: POST /v1/videos/motion-control on Kling's API. The model_name is kling-v3 or kling-v2-6.
- character_orientation: video matches the character's orientation in the reference video and allows up to 30 seconds. image matches it in your image and allows up to 10 seconds. The reference video must be at least 3 seconds.
- mode: std or pro. Read the result from GET /v1/videos/motion-control/{id}; its status goes submitted, processing, then succeed or failed. The video is at data.task_result.videos[0].url, and Kling says it clears generated videos after 30 days.
- Fast or complex motion can give a shorter clip than the video you sent, and Kling says those credits aren't refunded.
- On fal, the endpoints are fal-ai/kling-video/v3/pro/motion-control, v3/standard/motion-control, v2.6/pro/motion-control and v2.6/standard/motion-control.
- Use an image and a video you have the right to use, and get permission from anyone shown in them.
curl (Kling's own API)
Untested: not run, because we have no Kling API key. It follows the example in Kling's docs; the two URLs are placeholders.
# Start the task. Replace the two URLs with your own files.
curl --request POST \
--url https://api-singapore.klingai.com/v1/videos/motion-control \
--header "Authorization: Bearer $KLING_API_KEY" \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
"model_name": "kling-v3",
"image_url": "https://example.com/character.png",
"video_url": "https://example.com/motion.mp4",
"prompt": "The character dances on a rooftop at sunset",
"character_orientation": "video",
"keep_original_sound": "no",
"mode": "std"
}'
# Read the task, with the task_id from the answer above. When task_status is
# succeed, the video is at data.task_result.videos[0].url.
curl --request GET \
--url https://api-singapore.klingai.com/v1/videos/motion-control/$TASK_ID \
--header "Authorization: Bearer $KLING_API_KEY"
Kling 3.0 Motion Control price
Per second of video
| Provider | Option | Price | 5 s clip | Source |
|---|---|---|---|---|
| Kling (official API) | Standard, 720pKling bills in units, listed at 14 cents each | $0.126 / s | $0.63 | Kling API pricing, checked |
| Kling (official API) | Pro, 1080pKling bills in units, listed at 14 cents each | $0.168 / s | $0.84 | Kling API pricing, checked |
| fal | Standard | $0.126 / s | $0.63 | fal: Kling 3.0 Standard Motion Control, checked |
| fal | Pro | $0.168 / s | $0.84 | fal: Kling 3.0 Pro Motion Control, checked |
| Replicate | Standard | $0.07 / s | $0.35 | Replicate: kwaivgi/kling-v3-motion-control, checked |
| Replicate | Pro | $0.12 / s | $0.60 | Replicate: kwaivgi/kling-v3-motion-control, checked |
| kie.ai | Motion controlkie.ai's "from" price, its cheapest option; paid in kie.ai credits | $0.10 / s | $0.50 | kie.ai pricing, checked |
Per clip, or in the provider's own unit
| Provider | Option | Price | Source |
|---|---|---|---|
| WaveSpeedAI | Standard, 5 s clip | $0.63 / video | WaveSpeedAI: Kling 3.0 Std Motion Control, checked |
| WaveSpeedAI | Pro, 5 s clip | $0.84 / video | WaveSpeedAI: Kling 3.0 Pro Motion Control, checked |
Kling 2.6 Motion Control price
Per second of video
| Provider | Option | Price | 5 s clip | Source |
|---|---|---|---|---|
| fal | Standard | $0.07 / s | $0.35 | fal: Kling 2.6 Standard Motion Control, checked |
| fal | Pro | $0.112 / s | $0.56 | fal: Kling 2.6 Pro Motion Control, checked |
| Replicate | Standard | $0.07 / s | $0.35 | Replicate: kwaivgi/kling-v2.6-motion-control, checked |
| Replicate | Pro | $0.12 / s | $0.60 | Replicate: kwaivgi/kling-v2.6-motion-control, checked |
| kie.ai | Motion controlkie.ai's "from" price, its cheapest option; paid in kie.ai credits | $0.055 / s | $0.275 | kie.ai pricing, checked |
Per clip, or in the provider's own unit
| Provider | Option | Price | Source |
|---|---|---|---|
| WaveSpeedAI | Standard, 3 s clip | $0.21 / video | WaveSpeedAI: Kling 2.6 Std Motion Control, checked |
| WaveSpeedAI | Pro, 5 s clip | $0.56 / video | WaveSpeedAI: Kling 2.6 Pro Motion Control, checked |
Settings on Sume
model:kling-3orkling-4.duration: 4 to 15 seconds on Kling 3.0, 3 to 30 on Kling 4.0.resolution: Sume renders Kling 3.0 at 1080p only. Kling 4.0 takes720por1080p.generate_audio: set it tofalsefor a silent clip. On Kling 3.0, sound costs more.
Keep your key on your server. All Kling options and providers are on the Kling pricing page.
Kling 3.0 API price
Per second of video
| Provider | Option | Price | 5 s clip | Source |
|---|---|---|---|---|
| Sume | Pro, 1080p, with audio | $0.168 / s | $0.84 | Sume pricing (live from Sume's API catalog, 0% markup), checked |
| Sume | Pro, 1080p, no audio | $0.112 / s | $0.56 | Sume pricing (live from Sume's API catalog, 0% markup), checked |
| Kling (official API) | 720p, no audioKling bills in units, listed at 14 cents each | $0.084 / s | $0.42 | Kling API pricing, checked |
| Kling (official API) | 1080p, no audioKling bills in units, listed at 14 cents each | $0.112 / s | $0.56 | Kling API pricing, checked |
| Kling (official API) | 720p, with audioKling bills in units, listed at 14 cents each | $0.126 / s | $0.63 | Kling API pricing, checked |
| Kling (official API) | 1080p, with audioKling bills in units, listed at 14 cents each | $0.168 / s | $0.84 | Kling API pricing, checked |
| Kling (official API) | 4KKling bills in units, listed at 14 cents each | $0.42 / s | $2.10 | Kling API pricing, checked |
| fal | Standard, no audio | $0.084 / s | $0.42 | fal: Kling 3.0 Standard, checked |
| fal | Pro, no audio | $0.112 / s | $0.56 | fal: Kling 3.0 Pro, checked |
| fal | Pro, with audio | $0.168 / s | $0.84 | fal: Kling 3.0 Pro, checked |
| Replicate | Standard, no audio | $0.168 / s | $0.84 | Replicate: kwaivgi/kling-v3-video, checked |
| Replicate | Pro, no audio | $0.224 / s | $1.12 | Replicate: kwaivgi/kling-v3-video, checked |
| kie.ai | Standard, no audioPaid in kie.ai credits | $0.07 / s | $0.35 | kie.ai: Kling 3.0, checked |
| kie.ai | Pro, no audioPaid in kie.ai credits | $0.09 / s | $0.45 | kie.ai: Kling 3.0, checked |
| kie.ai | Pro, with audioPaid in kie.ai credits | $0.135 / s | $0.675 | kie.ai: Kling 3.0, checked |
| WaveSpeedAI | Standard, no audio | $0.084 / s | $0.42 | WaveSpeedAI: Kling 3.0 Standard, checked |
In a provider's own credits
| Provider | Option | Price | Source |
|---|---|---|---|
| Higgsfield | Website, 720p, 5 s clipHiggsfield shows this as approximate (~) | 7 credits | Higgsfield pricing page, as a browser visitor sees it (Higgsfield shows different prices to different visitors), checked |
| Higgsfield | Website, 1080p, 5 s clipHiggsfield shows this as approximate (~) | 8 credits | Higgsfield pricing page, as a browser visitor sees it (Higgsfield shows different prices to different visitors), checked |
Kling 4.0 API price
Per second of video
| Provider | Option | Price | 5 s clip | Source |
|---|---|---|---|---|
| Sume | 720p | $0.157 / s | $0.785 | Sume pricing (live from Sume's API catalog, 0% markup), checked |
| fal | 720p | $0.157 / s | $0.785 | fal: Kling 4.0, checked |
| fal | 1080p | $0.235 / s | $1.175 | fal: Kling 4.0, checked |
| Replicate | 720p | $0.157 / s | $0.785 | Replicate: kwaivgi/kling-v4.0, checked |
| Replicate | 1080p | $0.235 / s | $1.175 | Replicate: kwaivgi/kling-v4.0, checked |
| WaveSpeedAI | 720p | $0.157 / s | $0.785 | WaveSpeedAI: Kling 4.0, checked |
| kie.ai | 720pPaid in kie.ai credits | $0.1425 / s | $0.7125 | kie.ai pricing, checked |
| kie.ai | 1080pPaid in kie.ai credits | $0.2125 / s | $1.0625 | kie.ai pricing, checked |
| PiAPI | 720p | $0.1667 / s | $0.8335 | PiAPI: Kling 4, checked |
| PiAPI | 1080p | $0.25 / s | $1.25 | PiAPI: Kling 4, checked |
Questions
- Does the Kling API support motion control?
- Yes, on Kling's own API, with the models kling-v3 and kling-v2-6. fal, Replicate, WaveSpeedAI and kie.ai also sell it. Sume does not.
- How much does Kling motion control cost?
- On Kling's own API, Kling 3.0 motion control costs $0.126 / s in standard mode and $0.168 / s in pro mode. fal lists the same per-second prices as Kling for 3.0, and Replicate lists less: $0.07 / s and $0.12 / s.
- What is Kling 2.6 motion control?
- The earlier version, launched December 17, 2025, and still a model_name in Kling's API. fal charges $0.07 / s in standard mode and $0.112 / s in pro mode. Kling's current price page lists only 3.0, so we show no Kling price for 2.6.
- How do I use Kling AI motion control through the API?
- Send a character image and a reference video of the motion to Kling's motion control endpoint, choose character_orientation and mode, then read the task until it finishes. The code example above shows the request. We have not run it, because we have no Kling API key.
- How much does the Kling 3.0 API cost?
- At 1080p without sound, Sume charges $0.112 / s, the same as Kling's own $0.112 / s. With sound, Sume charges $0.168 / s.
- Is the Kling API free?
- We found no free API tier. Kling's API is prepaid and the resellers charge per second.
Sources
- Kling API pricing (checked 2026-11-01)
- Kling API docs: Authentication (checked 2026-11-01)
- Kling API docs: Motion Control (checked 2026-11-01)
- Kling: Motion Control user guide (checked 2026-11-01)
- Kling: Kling VIDEO 3.0 Motion Control release (checked 2026-11-01)
- fal: Kling Motion Control (checked 2026-11-01)
- Sume: Video Router (request fields) and model catalog (checked 2026-11-01)