Kling 4.0 API on Segmind: Text, Image, Reference and Edit, With Real Costs

Kling 4.0 API on Segmind, tested: 9 clips across text, image, reference and edit endpoints, with exact per-second rates, real bills and gotchas.

Kling 4.0 API on Segmind featured image: a woman on a rainy night train platform

I spent $22.05 on the Kling 4.0 API this week so you can budget yours before you write a line of code. That bought nine clips across all four Kling 4.0 endpoints on Segmind: text to video, image to video, reference to video and video edit. Every clip below shows its exact prompt, its parameters and the dollar figure Segmind billed for it, read straight from the API response.

Kling 4.0 is Kuaishou's newest video model, and it is cheap for what it does: 1080p costs $0.2487 per second of output, with native stereo audio included and clips up to 30 seconds in a single pass. The headline rate is simple, but one of my nine bills missed it by 12%, and one parameter quietly changes what an edit does to your footage. Those are the things I wish someone had told me first, so they are in here too.

This post covers the four slugs and what each one is for, the price table against my real bills, the async API pattern I used for every fire, and the gotchas I hit along the way.

The four Kling 4.0 API endpoints on Segmind

Kling 4.0 is split into four task endpoints. Each one has its own parameter set, so pick the slug by what you are feeding in:

  • kling-4-text-to-video: prompt only. 3 to 30 seconds, 720p or 1080p, aspect ratio 16:9, 9:16, 1:1 or 21:9.
  • kling-4-image-to-video: a required first_frame_image and an optional last_frame_image. There is no aspect_ratio field: the output takes the shape of your keyframe.
  • kling-4-reference-to-video: up to 10 reference_images and up to 5 reference_videos, which you name in the prompt as @Image1, @Video1 and so on.
  • kling-4-video-edit: a source video (3 to 30 seconds, 700 to 4553 px per side) plus a prompt describing the change, with optional reference images.

There is also a unified kling-4 slug with its own model page. When I tested it on October 31 it returned 404 {"error": "Mappings not found"} for a valid request, the same as when I first tried it three days earlier. A 404 bills nothing, so it costs you only a minute, but build against the four task slugs above.

Every endpoint returns stereo AAC audio at 24 fps with no toggle to switch it off. The model writes dialogue, ambience and effects from what your prompt describes.

Kling 4.0 API pricing: the table and my real bills

All four endpoints bill per second of output video. Here are the published rates from the model pages:

Endpoint720p per second1080p per secondOn top of that
kling-4-text-to-video$0.1661$0.2487nothing
kling-4-image-to-video$0.1661$0.2487nothing
kling-4-reference-to-video$0.1661$0.2487listed at $0.2656 / $0.3979 per second when reference videos are attached
kling-4-video-edit$0.1989$0.2984$0.0995 / $0.1492 per source second beyond the output duration

1080p is exactly 1.5x the 720p rate on every endpoint. Video edit costs 20% more per second than generation.

And here is what each of my nine fires was billed, read from the cost field in the API's own status response and cross-checked against my account's request history:

ClipEndpointSettingsTable priceBilledDifference
Headphone adtext-to-video10s, 1080p, 16:9$2.4868$2.4868exact
Selfie UGCtext-to-video8s, 720p, 9:16$1.3291$1.3333+0.3%
Harbour long taketext-to-video30s, 1080p, 21:9$7.4603$7.4603exact
Kettle pourimage-to-video5s, 1080p, first frame$1.2434$1.2487+0.4%
Train platformimage-to-video10s, 720p, first + last frame$1.6614$1.6614exact
Cyclist adreference-to-video10s, 1080p, 2 images$2.4868$2.4868exact
Bottle, copied camera movereference-to-video5s, 720p, 1 image + 1 video$1.3280$1.4921+12.4%
Snow restylevideo-edit5s, 720p, from a 10s source$1.4921$1.4921exact
Iced coffee swapvideo-edit8s, 1080p, from an 8s source$2.3873$2.3915+0.2%
Total$22.05

Five of nine landed exactly on the table and three more came in less than half a percent above it. The exception is the reference-to-video call with a reference video attached: it billed $0.2984 per second, which is the video-edit rate plus the input-video rate, not the $0.2656 the pricing table lists. If you plan to run reference videos at volume, budget 12% over the published number until that changes.

For context, Seedance 2.5's published text-to-video rate on Segmind is $0.2389 per second at 720p and $0.5876 at 1080p (16:9). A 10-second 1080p clip is $2.49 on Kling 4.0 against $5.88 on Seedance 2.5, so Kling costs 58% less at 1080p.

Calling the Kling 4.0 API: use the async v2 pattern

Every endpoint works synchronously at https://api.segmind.com/v1/{slug}: you POST, hold the connection open and get the MP4 bytes back. That is fine for a quick test, but my renders took between 119 and 622 seconds of inference, and a 10-minute HTTP connection is fragile. I ran all nine fires through the async v2 API instead:

import time, requests

KEY = "YOUR_API_KEY"
H = {"x-api-key": KEY}

job = requests.post(
    "https://api.segmind.com/v2/kling-4-text-to-video",
    headers=H,
    json={
        "prompt": "A barista pours latte art, the camera slowly pushes in, espresso machine hiss.",
        "duration": 5,
        "resolution": "720p",
        "aspect_ratio": "16:9",
    },
).json()
rid = job["request_id"]          # returned immediately, status "QUEUED"

while True:
    st = requests.get(f"https://api.segmind.com/v2/requests/{rid}/status", headers=H).json()
    if st["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(10)

print(st["status"], st.get("metrics", {}).get("cost"))   # the billed dollar amount
result = requests.get(f"https://api.segmind.com/v2/requests/{rid}", headers=H).json()
video_url = result["output"]     # a hosted MP4 URL

Two details that matter in production. First, the completed status carries metrics.cost and metrics.remaining_credits, so you can log the real spend per job without a separate billing call. Second, v2 does not validate your payload at submit time. I posted a request with no prompt at all and got a 200 with a request_id; the error ("'prompt' is required") only appeared when I polled, as an HTTP 422 with status FAILED. The same body on v1 fails instantly with a 400. Failed requests billed $0.00 either way, but your error handling has to live in the poll loop, not around the POST.

Text to video: three jobs, three price points

The text endpoint is where most people will start. I gave it three different jobs: a polished product ad, a vertical UGC clip with dialogue and a 30-second long take at the maximum settings.

A 1080p product ad with a voiceover

Prompt used A pair of matte sand-coloured over-ear wireless headphones rests on a slab of dark slate in a sunlit loft. The camera starts in a slow macro glide along the ear cup's woven fabric, then pulls back and orbits to reveal a woman in a cream knit sweater picking them up and settling them over her ears, closing her eyes as the city noise outside the window fades away. Warm late-afternoon light, soft dust in the air. Sound: muffled traffic and a distant siren that drop to near silence the moment the headphones go on, then a calm female voiceover says: "Ten hours of quiet. Wherever you go." The headphones carry no logo, no text and no branding. No on-screen text, no captions.

Parameters duration: 10  |  resolution: 1080p  |  aspect_ratio: 16:9  |  billed: $2.4868  |  render: 285s

Kling 4.0 text to video: 10 seconds at 1080p, 16:9, billed $2.4868. The voiceover line came back word for word.

The camera work is the strong part: a macro glide along the ear cup, a pull back, an orbit to the woman, all in one continuous move with no cut. The audio follows the brief closely too. The traffic noise drops away as the headphones go on, and a transcription of the soundtrack returned the voiceover exactly as written: "Ten hours of quiet. Wherever you go." For an agency producing ad variants, that is a finished rough cut for $2.49.

The weakness is the product. While the headphones sit on the slate they look right, but once she picks them up the band and one ear cup merge into something closer to a single ring. For a real product launch, use the image-to-video or reference endpoints and feed it your actual packshot.

A vertical UGC clip with dialogue

Prompt used A young man with a short beard and a grey hoodie films himself selfie-style in a small bright apartment kitchen, holding the phone at arm's length, handheld with slight natural shake. He holds up a plain white ceramic mug of coffee toward the lens and says, enthusiastically: "Okay, I finally fixed my morning coffee, and it took me exactly two minutes." He laughs and takes a sip. Sound: his voice close to the phone mic, a fridge hum and birds outside the window. No on-screen text, no captions, no logos.

Parameters duration: 8  |  resolution: 720p  |  aspect_ratio: 9:16  |  billed: $1.3333  |  render: 145s

Kling 4.0 text to video: 8 seconds at 720p, 9:16, billed $1.3333.

This is the clip I would show anyone asking whether AI UGC is usable yet. The handheld shake reads as a real phone, the laugh lands on the beat after the line, and the dialogue came back verbatim. At 720p it cost $1.33, and 720p is the right call for vertical social: the 720x1280 output is what the feed plays anyway, at two thirds of the 1080p price.

A 30-second long take at maximum settings

Prompt used A single unbroken tracking shot at dawn follows a fisherman in an orange oilskin jacket as he walks the length of a wooden pier in a small Nordic harbour, past stacked lobster traps and coiled ropes, gulls lifting off the railings as he passes. He stops at the end of the pier, unties a small red wooden rowing boat, steps in and rows away from the camera. The camera keeps pace beside him at shoulder height, then slows and rises on a crane move as he rows out, revealing still grey water, mist on the fjord and snow-capped mountains behind. Cold blue dawn light slowly warming to gold. Sound: creaking boards, his boots on wet wood, gulls, rope slapping against posts, oars dipping into calm water, no music. One continuous shot, no cuts, no on-screen text.

Parameters duration: 30  |  resolution: 1080p  |  aspect_ratio: 21:9  |  billed: $7.4603  |  render: 622s

Kling 4.0 text to video: 30 seconds at 1080p, 21:9 (2200x940), billed $7.4603, the most expensive single call in this post.

Thirty seconds is the ceiling, and Kling held one unbroken take for the whole length: walk the pier, untie the boat, step in, row out, then the camera rises to reveal the fjord and the mountains as the light warms. A scene-change detector found no cuts anywhere in the clip. For a film studio doing previs or a production house that needs establishing shots, $7.46 for 30 seconds of 21:9 footage is the number to plan around. It was also the slowest render at 622 seconds, so this one belongs in a background queue.

Note the shape: 21:9 at "1080p" came back as 2200x940, not 2520x1080. The resolution name sets the pixel budget, not the short edge.

Image to video: start from your own frame

The image endpoint is how you keep a real product or a designed shot intact. It takes a first frame and, optionally, a last frame. The output follows the keyframe's shape: my 2752x1536 stills came back as 1924x1076 at 1080p and 1280x716 at 720p.

One frame: a product pour

First frame
first_frame_image

Kling 4.0 image to video input: matte black pour-over kettle on an oak counter

The starting still, generated with Nano Banana 2 for $0.126.

Prompt used Steam keeps curling from the spout as a hand enters from the right, lifts the kettle by its handle and pours a slow, thin stream of hot water into the glass carafe. The camera slowly pushes in toward the pour. Soft morning light stays constant. Sound: the gentle trickle of water, quiet kitchen ambience, a ceramic clink as the kettle is set back down. No text, no logos.

Parameters first_frame_image: URL  |  duration: 5  |  resolution: 1080p  |  billed: $1.2487  |  render: 468s

Kling 4.0 image to video: 5 seconds at 1080p from one frame, billed $1.2487.

The kettle keeps its exact shape, finish and walnut knob through the lift, the pour and the set-down, which is precisely what the text-only ad could not do with the headphones. The steam, the light and the background stay where the still put them. The odd part is the very end, where a second hand drifts into frame after the kettle is back on the counter. For e-commerce teams, that is the trade: perfect product fidelity, but you still review every take.

First and last frame: a planned shot

First frame
first_frame_image

Kling 4.0 keyframe input: woman alone on a rainy night train platform

Last frame
last_frame_image

Kling 4.0 keyframe input: same platform with a train stopped and the woman boarding

Two keyframes. The second was made by passing the first to Nano Banana 2 as a reference, so the camera position matches.

Prompt used A silver commuter train glides into the station on the near track and slows to a stop beside the platform, its doors sliding open and spilling warm light onto the wet concrete. The woman folds the letter, slips it into her coat pocket, turns and walks to the open doors and steps aboard. The camera holds still. Sound: steady rain, the rising rumble and brake squeal of the arriving train, a door chime, no music.

Parameters first_frame_image: URL  |  last_frame_image: URL  |  duration: 10  |  resolution: 720p  |  billed: $1.6614  |  render: 240s

Kling 4.0 image to video with first and last frame: 10 seconds at 720p, billed $1.6614.

Kling joined the two frames without a cut and ended on a match for the target frame. But look at the timing: the train is in the station by about 1.5 seconds, and the rest of the clip is her moving around near the doors before she boards. Ten seconds was more than the action needed. In an earlier test with too little time it did the opposite and jumped the subject toward the end frame. Size duration to the action: around 5 to 6 seconds would have fit this shot better and cost $0.83 less.

Reference to video: keep a person and a product consistent

The reference endpoint is the one for brand work. You hand it up to 10 images (characters, products, places) and refer to them by tag in the prompt.

Two images: a cyclist and a bottle

Reference image 1
@Image1: the cyclist

Kling 4.0 reference to video input: cyclist in a mustard jacket

Reference image 2
@Image2: the product

Kling 4.0 reference to video input: teal KELPA water bottle

Both references generated with Nano Banana 2. KELPA is an invented brand.

Prompt used @Image1 is the cyclist: keep her face, short curly black hair, round tortoiseshell glasses and the mustard yellow jacket with one silver stripe exactly as in the reference. @Image2 is the product: keep the deep teal bottle, the black screw cap with its loop and the small vertical white word KELPA exactly as in the reference. She rides a road bike up a quiet coastal road at sunrise, stops at the top of the climb, takes the bottle from the bike's bottle cage, drinks, and looks out at the sea, smiling. The camera tracks alongside her, then settles into a medium close-up as she drinks with the bottle's word KELPA facing the camera. Sound: wind, tyres on asphalt, her breathing, waves far below, no music. No other text, no other logos, no other people.

Parameters reference_images: 2 URLs  |  duration: 10  |  resolution: 1080p  |  aspect_ratio: 16:9  |  billed: $2.4868  |  render: 231s

Kling 4.0 reference to video: 10 seconds at 1080p from two images, billed $2.4868.

Identity holds well. Her face, curly hair, tortoiseshell glasses and the single silver stripe on the mustard jacket all carry through, and the bottle stays deep teal with a black cap. Two things did not follow the brief. I asked for the camera to track alongside her and then settle into a close-up; Kling cut hard at 4.0 seconds instead, the only cut in all nine clips. And the KELPA wordmark is clean while the bottle stands upright, but once she tilts it to drink, the letters smear into mirrored nonsense. If the label is the point of the shot, keep the product upright and facing the camera.

A reference video: copying a camera move

Reference image 1
@Image1: the product

Kling 4.0 reference input: KELPA bottle

@Video1 was the headphone ad above (10 seconds, 1080p), passed as reference_videos.

Prompt used Copy the camera movement of @Video1: a slow macro glide that pulls back and orbits. Apply it to @Image1, the deep teal bottle with the black cap and the small vertical white word KELPA, standing on a wet black rock at a misty shoreline at dawn, small waves washing around the base of the rock. Keep the bottle exactly as in @Image1. Sound: soft waves and wind, no music, no voice. No other text, no logos, no people.

Parameters reference_images: 1 URL  |  reference_videos: 1 URL  |  duration: 5  |  resolution: 720p  |  aspect_ratio: 16:9  |  billed: $1.4921  |  render: 119s

Kling 4.0 reference to video with a reference video: 5 seconds at 720p, billed $1.4921.

The move transferred: a slow, low glide that eases back and orbits the product, very close to the opening of the headphone ad, applied to a completely different scene. The wordmark stayed readable the whole way because the bottle never tilts. This is a useful pattern for a production house that wants one signature camera move across a whole campaign.

This is also the clip that billed 12.4% over the table. Five seconds at 720p should be $1.3280 at the listed $0.2656 per second; it billed $1.4921, which is $0.2984 per second.

Video edit: restyle footage you already have

The edit endpoint takes a clip and a prompt describing the change. It is billed at a higher rate than generation, plus a charge for any source seconds beyond your output duration. I tested it twice, and the two results taught me the most important rule for this endpoint.

Same duration: swap one object

Prompt used Replace the white ceramic mug with a tall clear glass of iced coffee with ice cubes and a paper straw. Keep the man, his hoodie, the kitchen, the handheld framing, his words and his voice exactly as in the source.

Parameters video: URL  |  duration: 8  |  resolution: 1080p  |  aspect_ratio: adaptive  |  billed: $2.3915  |  render: 221s

Source (720p)

Edited (1080p)

Kling 4.0 video edit: the 8-second selfie clip with the mug swapped for iced coffee, output at 1080p, billed $2.3915.

This is a clean edit. The mug became a glass of iced coffee with a straw, and everything else stayed put: his face, the hoodie, the kitchen, the handheld wobble, and his line, which transcribed word for word from the edited file just as it did from the source. It also upscaled a 720p source to 1080x1920 without being asked. For an MCN reworking one hero clip into sponsor variants, this is the most valuable endpoint in the family.

Shorter duration: the 2x trap

Prompt used Change the scene to a snowy winter evening: heavy snow falls past the loft windows, the warm afternoon light becomes cool blue dusk with a single warm lamp glowing inside, and the woman wears a dark green knit sweater instead of cream. Keep the headphones, her movements, her face and the camera move exactly as in the source.

Parameters video: URL  |  duration: 5  |  resolution: 720p  |  aspect_ratio: adaptive  |  billed: $1.4921  |  render: 125s  |  source: the 10s headphone ad

Kling 4.0 video edit: a 10-second source edited to a 5-second output at 720p, billed $1.4921.

I set duration to 5 expecting the first five seconds of the 10-second ad, restyled. Instead, Kling compressed the whole 10-second performance into 5 seconds. I compared frames: the edit at second 1 matches the source at second 2, and at 4 it matches the source at 8. So the motion plays at double speed. The voiceover did not survive either: the edited track is ambience only, about 15 dB quieter than the source. You still pay for the five source seconds beyond the output ($0.4974 here). The restyle itself is lovely (snow, blue dusk, a lamp, the green sweater), and it also swapped the city skyline for a snowy forest that I never asked for.

The rule: if you want part of a clip, trim the source before you upload it, and set duration to match. That is cheaper, and it keeps the timing and the audio.

How I would budget Kling 4.0 API usage

  • Draft at 720p. It is a third cheaper and renders faster. Move to 1080p for the take you will actually ship.
  • Size duration to the action. Five seconds per beat is plenty. My keyframe clip had the train in by 1.5 seconds and padded the rest.
  • Use the cost field. v2's metrics.cost gives you the real bill per job. Log it, because four of my nine bills were not exactly duration times rate.
  • Trim edit sources first. Source seconds beyond the output both bill and speed up your footage.
  • Add 12% to reference-video jobs until the billed rate matches the published one.

As a worked example: a social team making 20 vertical 8-second UGC variants a week at 720p spends about $26.67 a week on generation. Rendering the four best at 1080p as edits of those drafts adds about $9.57.

Honest assessment

What Kling 4.0 does very well: camera moves and continuity. One 30-second take with no cut, a three-part move in the headphone ad, a camera move copied from one clip into another. Dialogue is the other standout: three spoken lines across three clips, all transcribed back word for word, including after an edit.

Where it falls short: product geometry and text in motion. Invented products warp when handled, and a wordmark melts once the object rotates. It also takes liberties with timing: a hard cut where I asked for a continuous move, idle seconds in a keyframe clip, and an edit that changed playback speed instead of trimming. And the published price for reference videos does not match what it bills today.

Best fit: UGC and dialogue clips, previs and establishing shots, and restyling existing footage at matched length. Not a fit, on its own: any shot where a real product's label must stay legible while it moves. Use a first frame of the real packshot for those.

FAQ

How much does the Kling 4.0 API cost?

On Segmind, text, image and reference generation cost $0.1661 per second at 720p and $0.2487 at 1080p. Video edit is $0.1989 and $0.2984. A 10-second 1080p clip billed me $2.49.

Which Kling 4.0 API slug should I use?

Use the task slugs: kling-4-text-to-video, kling-4-image-to-video, kling-4-reference-to-video or kling-4-video-edit. The unified kling-4 slug returned "Mappings not found" in my tests.

Does the Kling 4.0 API generate audio?

Yes. Every clip comes with stereo AAC audio, with no option to turn it off. Quoted dialogue in the prompt came back word for word in all three of my dialogue tests.

How long does a Kling 4.0 generation take?

My nine renders took 119 to 622 seconds of inference. The 30-second 1080p clip was the slowest. Use the async v2 API and poll the status endpoint rather than holding a request open.

Can the Kling 4.0 API keep a character or product consistent?

Yes, with reference-to-video. Pass up to 10 images and tag them @Image1, @Image2 in the prompt. Faces and clothing held well; small printed text held only while the product stayed upright.

What happens if a video edit is shorter than the source?

Kling compresses the whole source into the output length, so motion speeds up, and in my test the voiceover was dropped. Extra source seconds still bill. Trim the source first.

Wrapping up

Kling 4.0 gives you four clean endpoints for four jobs: text for fast ideas and UGC, image for exact products and planned shots, reference for consistent characters and camera moves, and edit for reworking footage you already own. At $0.2487 per second for 1080p with audio, it is one of the cheapest ways to get 30-second single-take video through an API, as long as you size durations to the action and trim edit sources first.

Try it on Segmind: Kling 4.0 Text to Video, Image to Video, Reference to Video and Video Edit. Available via API with no setup required.