Jevrouter Video API · video-to-video
kling v4.0 · video edit
kwaivgi/kling-v4.0/video-edit:video
Kling V4.0 Video Edit rewrites a 3 to 30 second video from a text instruction: it keeps the scene, subject and motion and changes what you describe, with optional reference images and audios, 720p and 1080p output and new synchronized audio generated by default (the original sound can be kept instead). Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Create an API keyOptions and pricing
Task: video-to-video. Catalog base price: $0.188. The exact quote depends on your inputs; the catalog price is not a fixed per-task charge.
We reserve the quoted maximum before submission, settle the actual generation cost and release the remainder. Set jev.max_cost_usd to your maximum reservation. A quote above this limit is rejected before generation.
| Input field | Type | Required | Options / default |
|---|---|---|---|
video | string | Yes | See schema |
audios | array | No | See schema |
images | array | No | See schema |
prompt | string | Yes | See schema |
duration | integer | No | [3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30] |
resolution | string | No | ["720p","1080p"] |
aspect_ratio | string | No | ["16:9","9:16","1:1","21:9"] |
keep_original_sound | boolean | No | false |
Complete input schema
{
"type": "object",
"required": [
"prompt",
"video"
],
"properties": {
"video": {
"type": "string",
"description": "URL of the video to edit. The edit keeps its scene, subject and motion; 3-30 seconds, longer videos are trimmed to 30 seconds."
},
"audios": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 3,
"description": "Reference audios (up to 3), 5-30 seconds each. They guide the voice and sound of the video."
},
"images": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 10,
"description": "Optional reference images (up to 10) for a subject, object or style to bring into the edit."
},
"prompt": {
"type": "string",
"description": "Describe the edit you want applied to the video - change a subject, the setting, the weather or the style. Refer to the video as @Video1, to reference images as @Image1, @Image2, ... and to reference audios as @Audio1, @Audio2, ... in array order."
},
"duration": {
"enum": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
],
"type": "integer",
"description": "Output duration in seconds (3-30). Follows the input video's length if not specified.",
"x-ui-component": "select"
},
"resolution": {
"enum": [
"720p",
"1080p"
],
"type": "string",
"default": "720p",
"description": "Output resolution.",
"x-ui-component": "select"
},
"aspect_ratio": {
"enum": [
"16:9",
"9:16",
"1:1",
"21:9"
],
"type": "string",
"description": "Aspect ratio of the output video. Follows the input video if not specified.",
"x-ui-component": "select"
},
"keep_original_sound": {
"type": "boolean",
"default": false,
"description": "Keep the input video's own sound instead of generating new synchronized audio."
}
},
"x-order-properties": [
"prompt",
"video",
"images",
"audios",
"keep_original_sound",
"resolution",
"duration",
"aspect_ratio"
],
"additionalProperties": false
}Required fields and conditional rules come from the published schema. Catalog support does not mean every option has been independently tested by Jevrouter. Synchronous generation, base64 output and customer callbacks are unavailable.
1. Submit a video task
Allow this model on your Jevrouter key. Replace every placeholder below with a value of the correct type, set a USD limit, and supply any conditional fields required by the schema. Media inputs must use your own accessible URLs; this endpoint does not upload files.
curl https://api.jevrouter.io/v1/videos \
-H "Authorization: Bearer $JEVROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: video-demo-001" \
-d @- <<'JSON'
{
"model": "kwaivgi/kling-v4.0/video-edit:video",
"input": {
"video": "<video: provide string>",
"prompt": "<prompt: provide string>",
"resolution": "720p",
"keep_original_sound": false
},
"jev": {
"max_cost_usd": "YOUR_USD_LIMIT"
}
}
JSONSave data.id and data.urls.get. An accepted task continues even if you disconnect.
Let Jevrouter choose
Use jev/auto as the model and set task to video-to-video. Your project must enable Auto, and both the project and key must allow Auto and the candidate models.
Auto checks the task type and all supplied input fields against each candidate. It compares live quotes for up to eight compatible candidates, shortlisted by catalog base price. It selects the lowest quote within that shortlist and your budget; this is not a quality ranking or a guarantee of the cheapest model in the entire catalog.
Use common options such as duration, resolution and aspect_ratio at the top level where available. Model-specific options belong in input and may narrow the pool. Unsupported options are rejected, never silently dropped. Without task, Auto defaults to text-to-video.
2. Check the result
curl https://api.jevrouter.io/v1/videos/REQUEST_ID \ -H "Authorization: Bearer $JEVROUTER_API_KEY"
Replace REQUEST_ID with your task ID. Wait at least three seconds between checks. Status progresses from queued to processing, then completed or failed. Results appear in data.outputs as media URLs or structured output objects.
If the submission response is lost, repeat the original request with the same idempotency key. A new key may create another billed task.
Results and billing
View the request in your dashboard or query /v1/requests/REQUEST_ID for reservation and settlement details. Results may be ready before the bill arrives.
Result links are retained for up to seven days and may expire earlier. Save your video while it is available. Anyone with a media URL may be able to access it. Cancellation and customer webhooks are not available.