API overview
This topic describes all API operations for this product.
The Alibaba Cloud Visual Intelligence API OpenAPI uses a Remote Procedure Call (RPC)-style signature authentication mechanism to ensure request security. For more information about the signing process, see the Request Signature documentation. For your convenience, the Alibaba Cloud Visual Intelligence API provides SDKs for various programming languages. You can download and use these SDKs to call the platform's OpenAPI directly without needing to understand the underlying technical implementation. If the provided SDKs do not meet your requirements, you can implement your own signing mechanism to call the API.
Before you call API operations, make sure that you have set up your account and created an AccessKey pair. An AccessKey pair is a credential used for identity verification when you call API operations and is crucial for account security. Because using your AccessKey ID and AccessKey secret directly on the client poses a security risk, you must integrate these credentials on the server-side. To call API operations on the client, use a temporary credential generated by Security Token Service (STS) for authorization to securely call the service.
For more information about how to use and obtain credentials from Security Token Service (STS), see the AssumeRole API documentation. For more information about how to create and manage AccessKeys, see Create an AccessKey.
Note that the use of API features is based on category authorization. When you activate an AI category, you are granted permission to call all AI features within that category.
Face and body (facebody)
To activate features in the face and body category, click Activate now.
Category | API operation | Capability Name (Chinese) | Description |
Face detection | DetectFace | Detects faces in an image and returns the coordinates of the bounding boxes for the detected faces. | |
Facial attributes | RecognizeExpression | Recognizes four attributes for each detected face: gender (male or female), age, expression (smiling or not smiling), and glasses (wearing or not wearing). | |
RecognizeFace | Detects and recognizes the expression of faces in an input image. The expression types are neutral, happiness, surprise, sadness, anger, disgust, and fear. | ||
Face editing | FaceBeauty | Retouches faces in an image, including skin smoothing, whitening, and removing dark circles and laugh lines. | |
EnhanceFace | Detects faces in an input image, then crops, aligns, and enhances the details of the faces before merging them back into the original image. | ||
BlurFace | Blurs the faces in an input image and outputs the anonymized image. | ||
GenerateHumanAnimeStyle | Transforms a portrait image into an anime-style cartoon character and returns the cartoonized image. | ||
GenerateHumanSketchStyle | Automatically crops the head area of a portrait image to generate a sketch-style headshot. | ||
LiquifyFace | Takes a portrait image, automatically detects and analyzes facial features, and generates an image with adjusted and slimmed facial features. It can process up to three faces in an image with multiple people. | ||
RetouchSkin | Takes a portrait image and automatically evens out skin tone, removes blemishes such as acne, acne scars, and freckles, and whitens the skin on the entire body while preserving skin texture as much as possible. It supports images with multiple people. | ||
MergeImageFace | Optimizes the body shape in an image, excluding the head. It can make a person appear taller and slimmer while maintaining natural body lines. This feature supports images with multiple people in full-body or half-body poses. | ||
AddFaceImageTemplate | Adds a face image that has passed content moderation as a template for the image face fusion feature. | ||
QueryFaceImageTemplate | Queries created face templates. | ||
DeleteFaceImageTemplate | Deletes a created face template. | ||
Human body recognition | BodyPosture | Retrieves the 21 keypoints of a hand gesture. | |
RecognizeAction | You can detect human bodies in an image. | ||
DetectBodyCount | Detects and categorizes human behaviors in videos and images. The supported behavior categories include raising a hand, eating or drinking, smoking, making a phone call, using a mobile phone, sleeping on a desk, and falling down. | ||
DetectPedestrian | Counts the faces in the input image. | ||
PedestrianDetectAttribute | Detects pedestrian attributes in an image. This includes pedestrian detection and attribute estimation, such as gender, age, orientation, hat, glasses, bag, clothes, and color. | ||
MonitorExamination | Recognizes the behavior of candidates during online exams. It supports the detection of on-screen chat tools and the monitoring of candidate status. | ||
ExtractFingerPrint | Automatically locates the finger area in an image of a finger and generates a binarized, black-and-white, press-type fingerprint image. | ||
Liveness detection | DetectVideoLivingFace | Determines whether the face in an input video is from a live capture or a rebroadcast. | |
DetectLivingFace | Determines whether the live object, mainly the face, in an input image is from a live capture or a rebroadcast. A face must be present in the image for liveness detection to work. | ||
DetectInfraredLivingFace | Detects whether a face in an infrared image is a live, close-range, bare face captured by a certified device. It is widely used in real-time infrared face capture scenarios to ensure the authenticity and security of infrared face registration and verification. A face must be present in the infrared image for detection to work. | ||
Facial recognition | RecognizePublicFace | Recognizes one or more public figures in an image. | |
DetectCelebrity | Recognizes celebrities in an image. | ||
CompareFace | Detects faces in two input images and compares the largest face from each image to determine if they belong to the same person. | ||
CompareFaceWithMask | Compares the largest face from two input images to determine if they belong to the same person. This feature is optimized for high-speed facial recognition even when the subject is wearing a mask. | ||
SearchFace | Searches a database for similar face images based on an input image. | ||
CreateFaceDb | Creates a face database. | ||
ListFaceDbs | Views the list of face databases. | ||
AddFaceEntity | Adds a face sample to a face database. | ||
GetFaceEntity | Queries a face sample in a face database. | ||
ListFaceEntities | Queries the list of face samples in a face database. | ||
UpdateFaceEntity | Updates a face sample in a face database. | ||
AddFace | Adds face data to a specified database. | ||
BatchAddFaces | Adds face data in batches. | ||
DeleteFace | Deletes a face image from a specified database. | ||
DeleteFaceEntity | Deletes a face sample from a face database. | ||
DeleteFaceDb | Deletes a specified face database. | ||
Financial-grade face detection | ExecuteServerSideVerification | On the server-side, requests user image information for identity verification based on the person's name and ID card number. | |
GenRealPersonVerificationToken | On the mobile client, requests user image information for identity verification based on the person's name and ID card number. | ||
GetRealPersonVerificationResult | After confirming that the certificate is valid and the name matches, returns the user's image information for identity verification. |
OCR (ocr)
To activate features in the OCR category, click Activate now.
Category | Capability Interface Name | Capability Name in Chinese | Description |
Personal ID and card recognition | RecognizeIdentityCard | Recognizes key fields on a second-generation ID card, including name, gender, ethnicity, ID number, date of birth, address, valid from date, and issuing authority. It can also output the locations of the ID card area and the face. | |
RecognizeBankCard | Takes an image of a mainstream bank card and outputs three pieces of information: issuing bank, card number, and expiration date. | ||
RecognizeQrCode | Detects QR codes in an image and outputs the text information they contain, such as a URL or text for each QR code. It supports recognizing multiple QR codes in a single image. | ||
Asset certificate recognition | RecognizeBusinessLicense | Recognizes key fields on a business license, including company address, business scope, registered capital, registration date, legal representative, company name, registration number, company type, and validity period. It can also output the locations of the QR code and seal on the license. | |
General text recognition | RecognizeCharacter | Recognizes the text content and text area coordinates in an image. It is suitable for text recognition in various image scenarios. | |
RecognizeTable | Automatically recognizes the position and content of a table. It is suitable for recognizing content in tables with complete black horizontal and vertical lines. | ||
RecognizePdf | Performs structured recognition of text in a PDF file. | ||
Vehicle and traffic recognition | RecognizeDrivingLicense | Recognizes key fields on the main and secondary pages of a vehicle registration certificate, outputting 21 key fields such as brand and model, vehicle type, license plate number, inspection record, approved load capacity, and approved passenger capacity. | |
RecognizeVINCode | Recognizes a vehicle's VIN code and outputs the VIN value. | ||
RecognizeDriverLicense | Recognizes key fields on the main and secondary pages of a driver's license, including nine key fields: file number, name, validity period, gender, issue date, license number, permitted vehicle class, valid from date, and address. | ||
RecognizeLicensePlate | Accurately recognizes the position of a license plate in an image and outputs five key pieces of information: license plate coordinates, plate type, plate number, plate number confidence level, and plate confidence level. | ||
Industry-specific document recognition | RecognizeTaxiInvoice | Accurately recognizes the position of taxi invoices from major cities across the country in an image. It supports structured recognition of taxi invoices and outputs six key fields: invoice number, code, taxi number, date, time, and amount. | |
RecognizeVATInvoice | Recognizes key fields on VAT invoices, both electronic and paper, including check code, reviewer, issuer, invoice code, and payee. | ||
RecognizeTrainTicket | Supports structured recognition of train tickets and outputs eight key fields: travel time, departure station, destination station, seat class, passenger name, train number, price, and carriage and seat number. | ||
RecognizeQuotaInvoice | Performs structured recognition of the invoice number, invoice code, and invoice amount on a quota invoice. | ||
RecognizeTicketInvoice | Supports structured recognition of fields on a roll invoice, including total price with tax, invoice code, invoice number, total tax amount, total amount, password area, issue date, tax rate, buyer's identification number, and seller's identification number. |
Product understanding (goodstech)
To activate features in the product understanding category, click Activate now.
Category | Capability Interface | Chinese Name | Description |
Product understanding | ClassifyCommodity | Recognizes the category of a product in an image and returns information such as the product category and confidence level. |
Content moderation (imageaudit)
To activate features in the content moderation category, click Activate now.
Category | Capability Interface Name | Capability Name in Chinese | Description |
Content moderation | ScanText | Supported detection scenarios include text spam, advertisements, sensitive content, terrorism-related content, abusive language, pornography, spamming, and prohibited content. | |
ScanImage | Supported detection scenarios include pornography, sensitive content, high-risk individuals, spam advertisements, undesirable scenes, and logos. |
Image recognition (imagerecog)
To activate features in the image recognition category, click Activate now.
Category | Capability Interface Name | Chinese Capability Name | Description |
Image tagging | TaggingImage | Recognizes the main content of an image and assigns it a category tag. It supports thousands of content tags covering common object categories. | |
TaggingAdImage | Tags information about people (celebrities, ordinary people, CG characters), scenes, and other elements in an image. It supports thousands of content tags covering a wide range. | ||
Basic recognition | RecognizeImageColor | Analyzes the color information of an input image and provides color values (in RGB and HEX formats) along with their corresponding percentages. | |
DetectImageElements | Recognizes the elements contained in an input image, marks their positions with bounding boxes, and distinguishes their basic types (person/object, decoration, text). | ||
RecognizeImageStyle | Analyzes the style of an input image and provides possible style tags. For example:
| ||
ClassifyingRubbish | Classifies the garbage in an image and provides the specific item names. | ||
EvaluateCertificateQuality | Identifies whether a captured ID photo has quality issues and specifies what those issues are. | ||
Scene recognition | RecognizeScene | Recognizes the scene or environment of an image. It supports dozens of common scenes, such as sky and grassland. |
Image generation (imageenhan)
To activate features in the image generation category, click Activate now.
Category | Capability Interface Name | Capability Name (Chinese) | Description |
Image generation | GenerateSuperResolutionImage | Based on a generative Large Language Model (LLM), this feature enlarges image resolution while significantly enhancing detail, making the image clearer. | |
MakeSuperResolutionImage | Enlarges an input image by four times while maintaining clarity based on inferred details. | ||
EnhanceImageColor | Optimally adjusts the saturation, brightness, and skin tone of an input image. | ||
ColorizeImage | Automatically colorizes black-and-white photos and images. | ||
Image editing | ChangeImageSize | Transforms an input image to a specified size. It automatically determines the main subject's location and uses the best cropping method. | |
IntelligentComposition | Performs an aesthetic assessment of an input image and intelligently outputs bounding boxes. You can use these bounding boxes to crop the original image for better composition. | ||
ImitatePhotoStyle | Transfers the style of a reference image, such as lighting and color, to a target image without altering the target image's structure. | ||
RemoveImageSubtitles | Removes standard subtitles from an image. | ||
RemoveImageWatermark | Removes common logos from an image, such as TV station logos and internet platform logos. | ||
ImageBlindPicWatermark | An image blind watermarking algorithm that adds or parses watermarks. It supports adding both image logos and text. | ||
ImageBlindCharacterWatermark | An image blind watermarking algorithm that adds or parses watermarks. It supports adding both image logos and text. | ||
ErasePerson | Removes a person from a specified area in an image and automatically fills in the background. | ||
Image scoring | AssessComposition | Detects an input image and outputs an aesthetic score for its composition. | |
AssessExposure | Detects an input image and outputs a score for its exposure. | ||
AssessSharpness | Detects an input image and outputs a score for its sharpness. |
Segmentation and matting (imageseg)
To activate features in the segmentation and matting category, click Activate now.
Category | API operation | Feature Name (Chinese) | Description |
Portrait segmentation | SegmentBody | Recognizes the human body contour in an input image, separates it from the background, and returns a segmented foreground portrait image (4-channel). It is suitable for scenarios with single or multiple people, complex backgrounds, and various body poses. | |
SegmentHead | Recognizes the face contour in an input image, excluding the neck, ears, and hair, and returns a transparent image with only the face area visible (4-channel). It is suitable for single or multi-person scenarios. | ||
SegmentHair | Recognizes the hair contour in an input image, excluding the neck and ears, and returns a transparent image with only the hair area visible (4-channel). It is suitable for single or multi-person scenarios. | ||
SegmentSkin | Recognizes the skin of people in an image and segments the skin areas. | ||
SegmentHDBody | Automatically recognizes the human body contour in an image, separates it from the background, and returns the segmented foreground portrait image. This feature is suitable for real-person images, not cartoon images. | ||
Product segmentation | SegmentCloth | Performs pixel-level matting of clothing in an input image and returns the matting result. | |
SegmentCommodity | Recognizes the product contour in an input image, separates it from the background, and returns a segmented foreground product image (4-channel). It is suitable for scenarios with single or multiple products and complex backgrounds. | ||
General segmentation | SegmentCommonImage | Automatically recognizes the contour of the main visual subject in an input image, removes the background, and returns a segmented foreground subject image (4-channel). It is suitable for matting scenarios involving people, animals, food, and objects. | |
SegmentSky | Recognizes the sky area in an input image, separates it from the background, and returns the segmented foreground area image. | ||
SegmentFood | Performs pixel-level matting of food in an image and returns the matting result. | ||
RefineMask | Performs fine-grained processing on an input image and a coarse mask, and outputs a refined mask. | ||
SegmentHDSky | Performs pixel-level matting of the sky in an input image to achieve segmentation. | ||
SegmentHDCommonImage | Segments the main subject in an image and outputs a corresponding transparent image in PNG format. | ||
Segmentation and replacement | ChangeSky | Replaces the sky in a target image with the sky style from a reference image, thereby changing the target image's sky. |
Object detection (objectdet)
To activate features in the object detection category, click Activate now.
Category | Capability Interface Name | Capability Name | |
Vehicle detection | DetectVehicleICongestion | Determines whether traffic congestion has occurred based on the vehicles in an image. | |
General detection | DetectMainBody | Detects the main subject in an image and returns its location and coordinate information. | |
DetectWhiteBaseImage | Detects whether an image has a white background. | ||
DetectObject | Detects objects in an input image. | ||
DetectIPCObject | Detects target objects in an input image, such as people, vehicles, and pets. | ||
DetectVideoIPCObject | Detects target objects in an input video, such as people, vehicles, and pets. |
Video understanding (videorecog)
To activate features in the video understanding category, click Activate now.
Category | Capability Interface Name | Chinese Name | Description |
Video understanding | GenerateVideoCover | Analyzes a video using an algorithm to extract engaging content and output multiple video thumbnails. | |
DetectVideoShot | Splits an input video by shots and returns the split points. | ||
RecognizeVideoCastCrewList | Recognizes text in videos, covering Chinese and English, simplified and traditional characters, and scores in scenarios such as news, movies, TV shows, entertainment, and sports. It supports various text types, including standard subtitles, fixed subtitles, scrolling subtitles, some natural scene text, vertical text, and artistic fonts. | ||
SplitVideoParts | Analyzes and understands a video from multiple dimensions, splits it into multiple segments, returns the boundary time points for each segment without returning the actual video segments, and provides a summary description for each segment. Splitting dimensions include shots and subjects. | ||
EvaluateVideoQuality | Evaluates the quality of an input video. It offers two modes: basic quality assessment and defect quality assessment. The feature outputs both a summary report and a detailed report of the assessment. |
Video segmentation (videoseg)
To activate features in the video segmentation category, click Activate now.
Category | API operation | Feature name | Description |
Video segmentation | SegmentVideoBody | Analyzes an input video and returns the mask of the portrait area as a video sequence. |
Video production (videoenhan)
To activate features in the video production category, click Activate now.
Category | Capability Interface Name | Feature name | Description |
Video editing | EraseVideoSubtitles | Removes standard subtitles from a video, such as the white subtitles at the bottom of movies and TV shows. | |
EraseVideoLogo | Removes common logos from a video, such as TV station logos and internet platform logos. | ||
ChangeVideoSize | Performs smart cropping and padding on an input video to output a video of any resolution. | ||
MergeVideoFace | Fuses the facial features of one person into a specified face in a video, creating a face-swapping effect. | ||
MergeVideoModelFace | Fuses the facial features of one person into the largest detected face in a video, creating a face-swapping effect. | ||
AddFaceVideoTemplate | Adds a video containing a face that has passed content moderation as a template for the template video face fusion feature. | ||
QueryFaceVideoTemplate | Queries the video face templates that a user has added. | ||
DeleteFaceVideoTemplate | Deletes a template video that a user has added. | ||
GenerateHumanAnimeStyleVideo | Transforms an input portrait video into a cartoon style and returns the stylized video result. | ||
Video enhancement | EnhanceVideoQuality | Based on AI deep learning algorithms, this feature performs comprehensive enhancements on standard dynamic range (SDR) videos, including frame interpolation, super-resolution (SR), and conversion from SDR to High Dynamic Range (HDR). | |
SuperResolveVideo | Enlarges an input video by two times and enhances the output video quality based on inferred details. The output video is H.264 encoded and in MP4 format. | ||
InterpolateVideoFrame | Uses a deep learning-based frame rate up-conversion method to synthesize video frames at any moment, optimizing and resolving quality issues such as stuttering and jitter in videos. | ||
AdjustVideoColor | Takes a set of videos as input and outputs a set of color-corrected videos. It can perform associated color correction based on the similarity between videos. | ||
EnhancePortraitVideo | Improves the clarity of faces in a video by enhancing facial details and texture. The feature ensures that the enhanced faces look natural and realistic. | ||
Video generation | GenerateVideo | Intelligently generates short marketing videos based on an input source video. |