Unified endpoint to detect faces in either video or image from URL
.jpg, .jpeg, .png, .bmp, .webp.mp4, .mov, .avi, .webminteger0: Success1: Error occurred (check error_msg)string"SUCCESS"object"0" key is present"0", "5", "10", etc.array[[[x1, y1], [x2, y2], [x3, y3], [x4, y4], [x5, y5], [x6, y6]], ...]array["x1,y1:x2,y2:x3,y3:x4,y4:x5,y5:x6,y6"]opts parameter in Face Swap, only use the first 4 coordinate pairs (Left Eye, Right Eye, Nose, Mouth Center). Truncate the string after the 4th point (e.g., x1,y1:x2,y2:x3,y3:x4,y4).array[[x, y, width, height], ...](x, y) is the top-left corner of the bounding boxarray[[x, y, width, height], ...]number or nullnull for imagesnum_frames parameter is not required and will be ignored if provided.opts parameter), extract only the first 4 groups of coordinates from landmarks_str (Left Eye, Right Eye, Nose, Mouth Center).num_frames value
error_code before processing results:
Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.
URL of the video or image to process. The media type will be auto-detected based on the file extension.
"https://example.com/media.mp4"
Number of frames to extract and analyze (only used for videos, ignored for images)
1 <= x <= 1005
Face detection completed successfully
Error code (0: success, 1: error)
0
Error message or success message
"SUCCESS"
Dictionary of face detection results keyed by frame index (as string). For images, only frame "0" will be present. For videos, multiple frames will be present (e.g., "0", "5", "10", etc.)
{
"0": {
"landmarks": [
[
[294, 65],
[316, 64],
[304, 76],
[305, 86],
[296, 86],
[314, 85]
]
],
"landmarks_str": ["294,65:316,64:304,76:305,86:296,86:314,85"],
"region": [[284, 38, 43, 63]],
"removed": [],
"frame_time": null
}
}