Automatically detects and identifies one or more objects in an image, suitable for computer vision applications such as intelligent surveillance, autonomous driving, and image search.
|
Service name |
Service ID |
Description |
API QPS limit |
|
object detection service |
ops-object-detect-001 |
A multi-object detection model developed by the Alibaba Cloud OpenSearch-AI team. Detects multiple independent objects in an image and returns a bounding box and confidence score for each. Use it to extract objects from complex scenes as input for downstream tasks, helping eliminate interference from the image background or other objects with embedding and reranking models. |
20 Note
To request a higher API QPS limit, submit a ticket to technical support. |
|
face detection service |
ops-object-detect-face-001 |
Automatically detects and locates one or more faces in an image. Ideal for applications such as intelligent surveillance and image search. |
Prerequisites
-
Get authentication credentials
The AI Search open platform requires an API key for authentication. For instructions, see Get an API key.
-
Get the service endpoint
You can call the service via the public network or a VPC. For details, see Get the service endpoint.
Request details
General notes
-
The request body cannot exceed 8 MB.
HTTP method
POST
URL
{host}/v3/openapi/workspaces/{workspace_name}/image-object-detection/{service_id}
Parameters:
-
host: The service endpoint. You can call the API service over the public network or from a VPC. For details, see Get a service endpoint. The public API domain provides public network access, and the internal API domain provides access from within the same region (including from a VPC). Both endpoints support the HTTPS protocol. -
workspace_name: The name of your workspace, such asdefault. -
service_id: The ID of the built-in service, such asops-object-detect-001.
Request parameters
Header parameters
|
Parameter |
Type |
Required |
Description |
Example |
|
Content-Type |
String |
Yes |
The content type of the request. Must be |
application/json |
|
Authorization |
String |
Yes |
Your API key for authentication. Must be prefixed with |
Bearer OS-d1**2a |
Body parameters
|
Parameter |
Type |
Required |
Description |
Example |
|
service_id |
String |
Yes |
The service ID. The value must start with |
ops-object-detect-001 |
|
image |
Object |
Yes |
The image to process. You must provide the image by using one of the following parameters:
|
|
Response parameters
|
Parameter |
Type |
Description |
Example |
|
request_id |
String |
A unique request identifier generated by the system. |
A5B25952-4406-45BF-99EC-E8020246**** |
|
latency |
Float/Integer |
The request latency, in milliseconds (ms). |
10 |
|
usage.image |
Integer |
The number of images processed. |
1 |
|
result.objects |
List<ImageObject> |
A list of the detected objects. |
|
ImageObject
|
Parameter |
Type |
Description |
Example |
|
confidence |
Float |
The confidence of the detection, ranging from 0.0 to 1.0. A higher value indicates greater confidence. |
0.4017 |
|
location |
Object |
An object that contains the coordinates of the bounding box. |
|
|
location.width |
Integer |
The width of the bounding box, in pixels. |
176 |
|
location.height |
Integer |
The height of the bounding box, in pixels. |
188 |
|
location.Y |
Integer |
The y-coordinate of the top-left corner of the bounding box. |
560 |
|
location.X |
Integer |
The x-coordinate of the top-left corner of the bounding box. |
37 |
Sample request (cURL)
curl --location 'http://****-hangzhou.opensearch.aliyuncs.com/v3/openapi/workspaces/default/image-object-detection/ops-object-detect-001/' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"image":
{
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250408/syuvxh/%E7%89%A9%E4%BD%93%E5%AE%9A%E4%BD%8D.png"
}
}'
Sample response
Successful response
{
"request_id": "138611ad4a03f620a1cdb2904768d286",
"latency": 216,
"usage": {
"image": 1
},
"result": {
"objects": [
{
"confidence": 0.4017,
"location": {
"width": 176,
"height": 188,
"X": 37,
"Y": 560
}
},
{
"confidence": 0.3805,
"location": {
"width": 191,
"height": 200,
"X": 133,
"Y": 752
}
},
{
"confidence": 0.3290,
"location": {
"width": 175,
"height": 183,
"X": 359,
"Y": 663
}
},
{
"confidence": 0.2955,
"location": {
"width": 984,
"height": 897,
"X": 16,
"Y": 8
}
},
{
"confidence": 0.2613,
"location": {
"width": 172,
"height": 174,
"X": 516,
"Y": 559
}
},
{
"confidence": 0.2573,
"location": {
"width": 360,
"height": 228,
"X": 665,
"Y": 704
}
},
{
"confidence": 0.2419,
"location": {
"width": 139,
"height": 170,
"X": 248,
"Y": 388
}
},
{
"confidence": 0.1644,
"location": {
"width": 173,
"height": 205,
"X": 815,
"Y": 507
}
},
{
"confidence": 0.1134,
"location": {
"width": 140,
"height": 122,
"X": 440,
"Y": 446
}
}
]
}
}
Status codes
For details, see the AI Search Open Platform Status Codes.