Kling v4 V2V
NewKlingTeam/v4-V2V
KlingVideo → videoRESTAsync task
Price$0.19 /seclowest tier
EndpointPOST /v2/video/kling-4-v2v/generate REST
Quick start
This model runs asynchronously: the request returns a task ID, and you poll
GET /v2/tasks/{task_id} or receive a webhook when the result is ready.curl -X POST https://api.widelabs.tr/v2/video/kling-4-v2v/generate \ -H "Authorization: Bearer $WIDELABS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Edit @base_video: turn the snowy meadow into a golden autumn meadow with tall amber grass and orange leaves drifting in the air. Keep the fox, its movement and the camera move exactly as they are. Sound: rustling grass and leaves under its paws, soft wind.", "base_video_url": "https://api.widelabs.tr/cdn/content/6HA6kjFuuaYrH1V7MkNMeA", "resolution": "720p", "duration": 5 }'
import os
import requests
resp = requests.post(
"https://api.widelabs.tr/v2/video/kling-4-v2v/generate",
headers={"Authorization": "Bearer " + os.environ["WIDELABS_API_KEY"]},
json={
"prompt": "Edit @base_video: turn the snowy meadow into a golden autumn meadow with tall amber grass and orange leaves drifting in the air. Keep the fox, its movement and the camera move exactly as they are. Sound: rustling grass and leaves under its paws, soft wind.",
"base_video_url": "https://api.widelabs.tr/cdn/content/6HA6kjFuuaYrH1V7MkNMeA",
"resolution": "720p",
"duration": 5
},
)
resp.raise_for_status()
# Video jobs are asynchronous: poll the task until it finishes.
import time
task = resp.json()
while task.get("status") not in ("completed", "failed"):
time.sleep(5)
task = requests.get("https://api.widelabs.tr/v2/tasks/" + task["task_id"], params={"wait": 30}).json()
print(task.get("result"))
const resp = await fetch("https://api.widelabs.tr/v2/video/kling-4-v2v/generate", { method: "POST", headers: { Authorization: `Bearer ${process.env.WIDELABS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "Edit @base_video: turn the snowy meadow into a golden autumn meadow with tall amber grass and orange leaves drifting in the air. Keep the fox, its movement and the camera move exactly as they are. Sound: rustling grass and leaves under its paws, soft wind.", base_video_url: "https://api.widelabs.tr/cdn/content/6HA6kjFuuaYrH1V7MkNMeA", resolution: "720p", duration: 5 }), }); let task = await resp.json(); // Video jobs are asynchronous: poll the task until it finishes. while (!["completed", "failed"].includes(task.status)) { await new Promise(r => setTimeout(r, 5000)); task = await (await fetch(`https://api.widelabs.tr/v2/tasks/${task.task_id}?wait=30`)).json(); } console.log(task.result);
Parameters
| Name | Type | Description |
|---|---|---|
store_output | "provider" | "wl1d" | "wl7d" | "wl30d" default "provider" | Where this request's output media is hosted, and for how long. `provider` (default) returns a Wide Labs CDN link that live-proxies the provider for 1 hour — the same hour the task record itself lives. `wl1d` / `wl7d` / `wl30d` copy the output into Wide Labs own storage and keep BOTH the link and the task record for 1, 7 or 30 days,… |
prompt required | string | Text description of the video (required; English up to 26,000 characters, other languages up to 11,000). Refer to inputs as @first_frame, @frame_1... (middle frames), @last_frame, @image_1... (reference_image_urls), @video_1... (reference_video_urls) and @base_video. |
resolution | "720p" | "1080p" default "720p" | Output resolution: 720p or 1080p. Priced per output second by resolution. |
duration | integer default 5 | Video duration in seconds (3-15); must be at least the total input video length (each video rounded up). Billed per output second. |
aspect_ratio | "16:9" | "9:16" | "1:1" | "21:9" | "adaptive" | Aspect ratio. Text only: default 16:9 (adaptive not allowed). Frames only: the video follows the first frame (leave empty or adaptive). With reference images or videos: default adaptive. |
first_frame_url | string | First frame image: URL or base64 data URI (JPG/PNG, max 30MB, sides >=300 px, ratio 2:5 to 5:2). |
middle_frame_urls | string[] | Middle keyframe images in playback order (URLs or base64 data URIs). |
last_frame_url | string | Last frame image: URL or base64 data URI. |
reference_image_urls | string[] | Reference images (characters, objects, scenes, style), referred to as @image_1...; URLs or base64 data URIs (each side >=300 px). Images in total (frames included): max 10. |
webhook_url | string | HTTPS URL to receive a signed completion webhook when the async task reaches a terminal state (requires an API key, "async": true and direct mode; otherwise 422). See the Webhooks section for the delivery payload and events, and GET /v2/customer/webhook-secret for the signing secret + verification. |
reference_video_urls | string[] | Feature-reference videos (motion, camera, style), referred to as @video_1...: http(s) URLs of MP4/MOV files (each >=3 s, max 50MB, 700-4553 px, 24-60 fps; up to 5). Videos in total (each rounded up to a whole second) must not exceed duration. |
base_video_url | string | Video to edit, referred to as @base_video: an http(s) URL of an MP4/MOV file (>=3 s, max 50MB, 700-4553 px). Describe what to change and what to keep in the prompt. Counts toward the same total-length rule. |
keep_original_audio | boolean default false | Keep the input video's own sound instead of generating new audio (the base video's sound when set, else the first reference video's). |
Related
Similar models
KlingNew
Kling v4
KlingTeam/v4
Text → videoAsync task
From$0.16
per sec
Kling
Kling v3 Omni
KlingTeam/v3-Omni
Text → videoAsync task
From$0.084
per sec
Kling
Kling v3 I2V
KlingTeam/v3-I2V
Image → videoAsync task
From$0.084
per sec
Kling
Kling v3 T2V
KlingTeam/v3-T2V
Text → videoAsync task
From$0.084
per sec
Start building on Wide Labs Compute
Create an account, add credit and send your first request with the SDK you already use.