Submit Kling AI task
curl --request POST \
--url https://api.wizzx.ai/api/v1/task/submit/kling-ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A character walks through a forest",
"type": "text-to-video",
"quality_mode": "pro",
"duration": 5,
"model_name": "kling-v2-1-master"
}
'import requests
url = "https://api.wizzx.ai/api/v1/task/submit/kling-ai"
payload = {
"prompt": "A character walks through a forest",
"type": "text-to-video",
"quality_mode": "pro",
"duration": 5,
"model_name": "kling-v2-1-master"
}
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({
prompt: 'A character walks through a forest',
type: 'text-to-video',
quality_mode: 'pro',
duration: 5,
model_name: 'kling-v2-1-master'
})
};
fetch('https://api.wizzx.ai/api/v1/task/submit/kling-ai', 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.wizzx.ai/api/v1/task/submit/kling-ai",
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([
'prompt' => 'A character walks through a forest',
'type' => 'text-to-video',
'quality_mode' => 'pro',
'duration' => 5,
'model_name' => 'kling-v2-1-master'
]),
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.wizzx.ai/api/v1/task/submit/kling-ai"
payload := strings.NewReader("{\n \"prompt\": \"A character walks through a forest\",\n \"type\": \"text-to-video\",\n \"quality_mode\": \"pro\",\n \"duration\": 5,\n \"model_name\": \"kling-v2-1-master\"\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.wizzx.ai/api/v1/task/submit/kling-ai")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A character walks through a forest\",\n \"type\": \"text-to-video\",\n \"quality_mode\": \"pro\",\n \"duration\": 5,\n \"model_name\": \"kling-v2-1-master\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizzx.ai/api/v1/task/submit/kling-ai")
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 \"prompt\": \"A character walks through a forest\",\n \"type\": \"text-to-video\",\n \"quality_mode\": \"pro\",\n \"duration\": 5,\n \"model_name\": \"kling-v2-1-master\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_key": "<string>",
"credits_deducted": 1,
"provider_task_id": "<string>",
"provider_key": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}Video Generation
Submit Kling AI task
POST a Kling text-to-video or image-to-video task
POST
/
api
/
v1
/
task
/
submit
/
kling-ai
Submit Kling AI task
curl --request POST \
--url https://api.wizzx.ai/api/v1/task/submit/kling-ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A character walks through a forest",
"type": "text-to-video",
"quality_mode": "pro",
"duration": 5,
"model_name": "kling-v2-1-master"
}
'import requests
url = "https://api.wizzx.ai/api/v1/task/submit/kling-ai"
payload = {
"prompt": "A character walks through a forest",
"type": "text-to-video",
"quality_mode": "pro",
"duration": 5,
"model_name": "kling-v2-1-master"
}
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({
prompt: 'A character walks through a forest',
type: 'text-to-video',
quality_mode: 'pro',
duration: 5,
model_name: 'kling-v2-1-master'
})
};
fetch('https://api.wizzx.ai/api/v1/task/submit/kling-ai', 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.wizzx.ai/api/v1/task/submit/kling-ai",
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([
'prompt' => 'A character walks through a forest',
'type' => 'text-to-video',
'quality_mode' => 'pro',
'duration' => 5,
'model_name' => 'kling-v2-1-master'
]),
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.wizzx.ai/api/v1/task/submit/kling-ai"
payload := strings.NewReader("{\n \"prompt\": \"A character walks through a forest\",\n \"type\": \"text-to-video\",\n \"quality_mode\": \"pro\",\n \"duration\": 5,\n \"model_name\": \"kling-v2-1-master\"\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.wizzx.ai/api/v1/task/submit/kling-ai")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A character walks through a forest\",\n \"type\": \"text-to-video\",\n \"quality_mode\": \"pro\",\n \"duration\": 5,\n \"model_name\": \"kling-v2-1-master\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizzx.ai/api/v1/task/submit/kling-ai")
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 \"prompt\": \"A character walks through a forest\",\n \"type\": \"text-to-video\",\n \"quality_mode\": \"pro\",\n \"duration\": 5,\n \"model_name\": \"kling-v2-1-master\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"data": {
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model_key": "<string>",
"credits_deducted": 1,
"provider_task_id": "<string>",
"provider_key": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "<string>"
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retry_after": 1
}Submit task
prompt, type, quality_mode, and duration are required. image-to-video requires exactly one URL in image_urls; text-to-video must omit it.
curl --fail-with-body --silent --show-error \
-X POST https://api.wizzx.ai/api/v1/task/submit/kling-ai \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
--data '{
"prompt": "The main character walks through a forest",
"type": "text-to-video",
"quality_mode": "pro",
"duration": 5,
"model_name": "kling-v2-1-master"
}'
kling-v2-1-master is the valid Master key; kling-v2-master is not accepted. aspect_ratio and sound apply only to kling-v2-6. For image-to-video, image_tail, masks, and camera_control are mutually exclusive.Authorizations
Wizzx API key. This is not a JWT.
Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
image-to-video requires exactly one image_urls item; text-to-video must omit image_urls. image_tail, masks, and camera_control are mutually exclusive for image-to-video. aspect_ratio and sound are only valid for kling-v2-6.
Available options:
text-to-video Required prompt. The gateway enforces a 2500-byte UTF-8 limit.
Minimum string length:
1Available options:
std, pro Available options:
5, 10 Maximum array length:
1Publicly reachable HTTP(S) URL.
Pattern:
^https?://Optional negative prompt. The gateway enforces a 2500-byte UTF-8 limit.
V1.x only. Explicit 0 is currently normalized to 0.5; omit for V2.x.
Required range:
0 <= x <= 1kling-v2-6 only; defaults to 16:9 for that model.
Available options:
16:9, 9:16, 1:1 kling-v2-6 only; defaults to off.
Available options:
on, off Maximum array length:
6Show child attributes
Show child attributes
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?
