curl --request POST \
--url https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "pro",
"duration": 5,
"first_frame": "https://example.com/reference-image.jpg",
"prompt": "The character slowly turns to face the camera",
"sound": "off"
}
'import requests
url = "https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation"
payload = {
"mode": "pro",
"duration": 5,
"first_frame": "https://example.com/reference-image.jpg",
"prompt": "The character slowly turns to face the camera",
"sound": "off"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'pro',
duration: 5,
first_frame: 'https://example.com/reference-image.jpg',
prompt: 'The character slowly turns to face the camera',
sound: 'off'
})
};
fetch('https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'pro',
'duration' => 5,
'first_frame' => 'https://example.com/reference-image.jpg',
'prompt' => 'The character slowly turns to face the camera',
'sound' => 'off'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation"
payload := strings.NewReader("{\n \"mode\": \"pro\",\n \"duration\": 5,\n \"first_frame\": \"https://example.com/reference-image.jpg\",\n \"prompt\": \"The character slowly turns to face the camera\",\n \"sound\": \"off\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"pro\",\n \"duration\": 5,\n \"first_frame\": \"https://example.com/reference-image.jpg\",\n \"prompt\": \"The character slowly turns to face the camera\",\n \"sound\": \"off\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"pro\",\n \"duration\": 5,\n \"first_frame\": \"https://example.com/reference-image.jpg\",\n \"prompt\": \"The character slowly turns to face the camera\",\n \"sound\": \"off\"\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "8e1e315e-b50d-4334-a231-be7d19a372f4",
"status": "pending",
"created_at": "2026-02-14T00:00:00.000Z",
"updated_at": "2026-02-14T00:00:00.000Z"
}
}Kling V3.0 Image to Video
Generate videos from images using the Kling v3.0 model with multi-shot, audio, element reference, and extended duration support.
curl --request POST \
--url https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "pro",
"duration": 5,
"first_frame": "https://example.com/reference-image.jpg",
"prompt": "The character slowly turns to face the camera",
"sound": "off"
}
'import requests
url = "https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation"
payload = {
"mode": "pro",
"duration": 5,
"first_frame": "https://example.com/reference-image.jpg",
"prompt": "The character slowly turns to face the camera",
"sound": "off"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'pro',
duration: 5,
first_frame: 'https://example.com/reference-image.jpg',
prompt: 'The character slowly turns to face the camera',
sound: 'off'
})
};
fetch('https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'pro',
'duration' => 5,
'first_frame' => 'https://example.com/reference-image.jpg',
'prompt' => 'The character slowly turns to face the camera',
'sound' => 'off'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation"
payload := strings.NewReader("{\n \"mode\": \"pro\",\n \"duration\": 5,\n \"first_frame\": \"https://example.com/reference-image.jpg\",\n \"prompt\": \"The character slowly turns to face the camera\",\n \"sound\": \"off\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"pro\",\n \"duration\": 5,\n \"first_frame\": \"https://example.com/reference-image.jpg\",\n \"prompt\": \"The character slowly turns to face the camera\",\n \"sound\": \"off\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/klingai/v1/kling-v3/image-to-video/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"pro\",\n \"duration\": 5,\n \"first_frame\": \"https://example.com/reference-image.jpg\",\n \"prompt\": \"The character slowly turns to face the camera\",\n \"sound\": \"off\"\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "8e1e315e-b50d-4334-a231-be7d19a372f4",
"status": "pending",
"created_at": "2026-02-14T00:00:00.000Z",
"updated_at": "2026-02-14T00:00:00.000Z"
}
}Overview
Generate videos from reference images using the Kling V3.0 model. In addition to the text-to-video features, image-to-video supports:- First/Last frame control — provide
first_frameandlast_framefor start-to-end frame interpolation - Element references — reference up to 3 subjects via
elementswith frontal and reference images
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
First frame image (URL or Base64). Sets the opening frame of the generated video.
Important: When using Base64 encoding, do not add any prefixes such as data:image/png;base64,. Provide only the Base64-encoded string itself.
- Supported image formats: .jpg, .jpeg, .png
- Image file size cannot exceed 10MB
- Width and height dimensions must not be less than 300px
- Aspect ratio should be between 1:2.5 ~ 2.5:1
- At least one of
first_frameandlast_framemust be provided.
Last frame image (URL or Base64). Sets the closing frame of the generated video.
- At least one of
first_frameandlast_framemust be provided. last_frame,dynamic_masks/static_mask, andcamera_controlare mutually exclusive.
Positive text prompt. Cannot exceed 2500 characters.
Required when multi_shot is false or when shot_type is intelligence.
2500Negative text prompt. Cannot exceed 2500 characters.
2500Whether to generate a multi-shot video.
true: Enable multi-shot mode.promptis ignored; useshot_typeandmulti_promptinstead.false: Single-shot mode (default).
Shot segmentation method. Required when multi_shot is true.
customize: Custom shots, requiresmulti_prompt.intelligence: AI-generated shots, requiresprompt.
customize, intelligence Shot prompt list for multi-shot videos.
- Max 6 shots, min 1 shot.
- Each shot prompt max 512 characters.
- Each shot duration must not exceed total duration and must be >= 1.
- Sum of all shot durations must equal total task duration.
Required when multi_shot is true and shot_type is customize.
1 - 6 elementsShow child attributes
Show child attributes
Element definitions. Max 3 elements.
Provide frontal and reference images.
Use <<<element_1>>> in prompt to reference elements.
1 - 3 elementsShow child attributes
Show child attributes
Generate audio simultaneously when generating videos.
on: Enable audio generationoff: Disable audio generation (silent video)
on, off Video generation mode.
std: Standard Mode (720P), cost-effective.
pro: Professional Mode (1080P), higher quality video output.
std, pro Video length in seconds (3-15).
Response
Accepted - Task created successfully
Show child attributes
Show child attributes

