Identify Face
curl --request POST \
--url https://www.anyfast.ai/kling/v1/videos/identify-face \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://example.com/person-speaking.mp4",
"video_id": "860260754053148756"
}
'import requests
url = "https://www.anyfast.ai/kling/v1/videos/identify-face"
payload = {
"video_url": "https://example.com/person-speaking.mp4",
"video_id": "860260754053148756"
}
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({
video_url: 'https://example.com/person-speaking.mp4',
video_id: '860260754053148756'
})
};
fetch('https://www.anyfast.ai/kling/v1/videos/identify-face', 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://www.anyfast.ai/kling/v1/videos/identify-face",
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([
'video_url' => 'https://example.com/person-speaking.mp4',
'video_id' => '860260754053148756'
]),
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://www.anyfast.ai/kling/v1/videos/identify-face"
payload := strings.NewReader("{\n \"video_url\": \"https://example.com/person-speaking.mp4\",\n \"video_id\": \"860260754053148756\"\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://www.anyfast.ai/kling/v1/videos/identify-face")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://example.com/person-speaking.mp4\",\n \"video_id\": \"860260754053148756\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/kling/v1/videos/identify-face")
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 \"video_url\": \"https://example.com/person-speaking.mp4\",\n \"video_id\": \"860260754053148756\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "SUCCEED",
"data": {
"session_id": "abc123-session-id",
"face_list": [
{
"face_id": "face_001",
"face_rect": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Kuaishou
kling-identify-face
Analyze a video and detect all human faces in it. Returns a session_id and a face_list that are required for the subsequent lip sync generation step.
This is a synchronous call — the result is returned immediately, not as an async task.
POST
/
kling
/
v1
/
videos
/
identify-face
Identify Face
curl --request POST \
--url https://www.anyfast.ai/kling/v1/videos/identify-face \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://example.com/person-speaking.mp4",
"video_id": "860260754053148756"
}
'import requests
url = "https://www.anyfast.ai/kling/v1/videos/identify-face"
payload = {
"video_url": "https://example.com/person-speaking.mp4",
"video_id": "860260754053148756"
}
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({
video_url: 'https://example.com/person-speaking.mp4',
video_id: '860260754053148756'
})
};
fetch('https://www.anyfast.ai/kling/v1/videos/identify-face', 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://www.anyfast.ai/kling/v1/videos/identify-face",
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([
'video_url' => 'https://example.com/person-speaking.mp4',
'video_id' => '860260754053148756'
]),
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://www.anyfast.ai/kling/v1/videos/identify-face"
payload := strings.NewReader("{\n \"video_url\": \"https://example.com/person-speaking.mp4\",\n \"video_id\": \"860260754053148756\"\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://www.anyfast.ai/kling/v1/videos/identify-face")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://example.com/person-speaking.mp4\",\n \"video_id\": \"860260754053148756\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/kling/v1/videos/identify-face")
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 \"video_url\": \"https://example.com/person-speaking.mp4\",\n \"video_id\": \"860260754053148756\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "SUCCEED",
"data": {
"session_id": "abc123-session-id",
"face_list": [
{
"face_id": "face_001",
"face_rect": {
"x": 120,
"y": 80,
"width": 200,
"height": 250
}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Public URL of the video to analyze. The video must contain at least one clearly visible human face.
Required if video_id is not provided.
Example:
"https://example.com/person-speaking.mp4"
ID of a video previously generated by Kling (e.g. from a text-to-video or image-to-video task result).
Required if video_url is not provided.
Example:
"860260754053148756"
Was this page helpful?
⌘I