# Detect objects

POST `/detect-objects`

This is an optional step when doing image search. This endpoint helps you detect and extract specific objects in an image to give users a more precise image search experience. We use computer vision technology to automatically detect and extract the specific objects, providing you with a confidence score. Once you get the response with the cropped images, you can send pass the selected image through the [Image Search](https://docs.searchagora.com/search/image-search) flow.&#x20;

**Headers**

| Header          | Type   | Description   |
| --------------- | ------ | ------------- |
| `Authorization` | string | Bearer token. |

**Request body**

```json
{
    "base64Image": "string"
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "status": "success",
  "detectedObjects": [
        {
            "objectName": "Pants",
            "confidence": 0.8482445478439331,
            "croppedImage":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD",
            "dimensions": {
                "width": 276,
                "height": 407,
                "x": 253,
                "y": 968
                          }
         }
     ]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
 "status": "Server Error",
}
```

{% endtab %}
{% endtabs %}
