# Vision AI

## Benefits

* **Accelerate Time-to-Value:** Effortlessly construct, deploy, and oversee computer vision applications tailored to your distinct business requirements. Leverage pre-trained APIs, AutoML, and custom models to streamline development and reduce complexity.
* **Versatility for Diverse Needs:** Address a range of applications and skill levels. Choose between plug-and-play analytics through APIs, custom machine learning models, or comprehensive end-to-end development environments, all available within our vision portfolio.
* **Assured quality from the leader in vision of:** Benefit from investments in vision across our portfolio. Vision offerings have received the highest ratings from several analyst firms.

## Detect Text In Images (`text_detection)`

## Text Detection (Image)

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

`TEXT_DETECTION` detects and **extracts text from any image**. For example, a photograph might contain a street sign or traffic sign. The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                        | Type   | Description                                 |
| ------------------------------------------- | ------ | ------------------------------------------- |
| operation<mark style="color:red;">\*</mark> | String | operation to be performed: `text_detection` |
| image<mark style="color:red;">\*</mark>     | File   | image file to be processed                  |

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Detect Text In Documents (`document_text_detection`)&#x20;

## Text Detection (Documents)

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

`DOCUMENT_TEXT_DETECTION` also extracts text from an image, but the response is **optimized for dense text and documents**. The JSON includes page, block, paragraph, word, and break information.

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name      | Type   | Description                                          |
| --------- | ------ | ---------------------------------------------------- |
| operation | String | operation to be performed: `document_text_detection` |
| image     | File   | image to be processed                                |

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Detect Labels In Images (`label_detection)`

## Label Detection

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

`LABEL_DETECTION` can identify general objects, locations, activities, animal species, products, and more.

#### Headers

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| Content-Type | String | multipart/form-data |

#### Request Body

| Name                                        | Type   | Description                                  |
| ------------------------------------------- | ------ | -------------------------------------------- |
| image<mark style="color:red;">\*</mark>     | File   | image to be processed                        |
| operation<mark style="color:red;">\*</mark> | String | operation to be performed: `label_detection` |

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

```json
{
    "success": true,
    "data": {
        "labelAnnotations": [
            {
                "mid": "/m/01m3v",
                "description": "Computer",
                "score": 0.9151083,
                "topicality": 0.9151083,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/01jwgf",
                "description": "Product",
                "score": 0.90773267,
                "topicality": 0.90773267,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/0j62f",
                "description": "Rectangle",
                "score": 0.8904041,
                "topicality": 0.8904041,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/03gq5hm",
                "description": "Font",
                "score": 0.853358,
                "topicality": 0.853358,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/05khh",
                "description": "Operating system",
                "score": 0.8318895,
                "topicality": 0.8318895,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/0643t",
                "description": "Personal computer",
                "score": 0.8156862,
                "topicality": 0.8156862,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/01mf0",
                "description": "Software",
                "score": 0.80540884,
                "topicality": 0.80540884,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/01zbnw",
                "description": "Screenshot",
                "score": 0.80162287,
                "topicality": 0.80162287,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/07c1v",
                "description": "Technology",
                "score": 0.77332705,
                "topicality": 0.77332705,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            },
            {
                "mid": "/m/0541p",
                "description": "Multimedia",
                "score": 0.7660149,
                "topicality": 0.7660149,
                "locale": "",
                "confidence": 0,
                "locations": [],
                "properties": []
            }
        ],
        "faceAnnotations": [],
        "landmarkAnnotations": [],
        "logoAnnotations": [],
        "localizedObjectAnnotations": [],
        "textAnnotations": []
    }
}
```

{% endtab %}
{% endtabs %}

## Detect Landmarks In Images (`landmark_detection)`

## Landmark Detection

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

`LANDMARK_DETECTION` detects popular natural and human-made structures within an image.

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                        | Type   | Description                                     |
| ------------------------------------------- | ------ | ----------------------------------------------- |
| image<mark style="color:red;">\*</mark>     | File   | image to be processed                           |
| operation<mark style="color:red;">\*</mark> | String | operation to be performed: `landmark_detection` |

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

```json
{
    "success": true,
    "data": {
        "landmarkAnnotations": [
            {
                "mid": "/m/02_2j2l",
                "description": "Charleston Park",
                "score": 0.45514682,
                "boundingPoly": {
                    "vertices": [
                        {
                            "x": 0,
                            "y": 0
                        },
                        {
                            "x": 3024,
                            "y": 0
                        },
                        {
                            "x": 3024,
                            "y": 2212
                        },
                        {
                            "y": 2212,
                            "x": 0
                        }
                    ],
                    "normalizedVertices": []
                },
                "locations": [
                    {
                        "latLng": {
                            "latitude": 37.42209959999999,
                            "longitude": -122.0819686
                        }
                    }
                ],
                "locale": "",
                "confidence": 0,
                "topicality": 0,
                "properties": []
            },
            {
                "mid": "/m/07mj0b",
                "description": "Shoreline Amphitheatre",
                "score": 0.42295343,
                "boundingPoly": {
                    "vertices": [
                        {
                            "x": 0,
                            "y": 0
                        },
                        {
                            "x": 3024,
                            "y": 0
                        },
                        {
                            "x": 3024,
                            "y": 2212
                        },
                        {
                            "y": 2212,
                            "x": 0
                        }
                    ],
                    "normalizedVertices": []
                },
                "locations": [
                    {
                        "latLng": {
                            "latitude": 37.4268342,
                            "longitude": -122.08070230000001
                        }
                    }
                ],
                "locale": "",
                "confidence": 0,
                "topicality": 0,
                "properties": []
            },
            {
                "mid": "/g/11b73jyz5y",
                "description": "Google Android Statues Square",
                "score": 0.42287928,
                "boundingPoly": {
                    "vertices": [
                        {
                            "x": 0,
                            "y": 0
                        },
                        {
                            "x": 3024,
                            "y": 0
                        },
                        {
                            "x": 3024,
                            "y": 2212
                        },
                        {
                            "y": 2212,
                            "x": 0
                        }
                    ],
                    "normalizedVertices": []
                },
                "locations": [
                    {
                        "latLng": {
                            "latitude": 37.4184266,
                            "longitude": -122.08802519999999
                        }
                    }
                ],
                "locale": "",
                "confidence": 0,
                "topicality": 0,
                "properties": []
            }
        ],
        "faceAnnotations": [],
        "logoAnnotations": [],
        "labelAnnotations": [],
        "localizedObjectAnnotations": [],
        "textAnnotations": []
    }
}
```

{% endtab %}
{% endtabs %}

## Detect Logo In Image (`logo_detection)`&#x20;

## Logo Detection

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

`LOGO_DETECTION`detects popular product logos within an image.

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                        | Type   | Description                                 |
| ------------------------------------------- | ------ | ------------------------------------------- |
| image<mark style="color:red;">\*</mark>     | File   | image to be processed                       |
| operation<mark style="color:red;">\*</mark> | String | operation to be performed: `logo_detection` |

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

```json
{
    "success": true,
    "data": {
        "logoAnnotations": [
            {
                "mid": "/m/045c7b",
                "description": "Google",
                "score": 0.9447075,
                "boundingPoly": {
                    "vertices": [
                        {
                            "x": 969,
                            "y": 677
                        },
                        {
                            "x": 1536,
                            "y": 677
                        },
                        {
                            "x": 1536,
                            "y": 1072
                        },
                        {
                            "x": 969,
                            "y": 1072
                        }
                    ],
                    "normalizedVertices": []
                },
                "locale": "",
                "confidence": 0,
                "topicality": 0,
                "locations": [],
                "properties": []
            }
        ],
        "faceAnnotations": [],
        "landmarkAnnotations": [],
        "labelAnnotations": [],
        "localizedObjectAnnotations": [],
        "textAnnotations": []
    }
}
```

{% endtab %}
{% endtabs %}

## Detect Web entities and pages (`web_detection`)  (Deprecated)

## Web Detection

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

`WEB_DETECTION` detects the most likely owners of faces in an image and also Web references to an image.

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                        | Type   | Description                                |
| ------------------------------------------- | ------ | ------------------------------------------ |
| image<mark style="color:red;">\*</mark>     | File   | image to be processed                      |
| operation<mark style="color:red;">\*</mark> | String | operation to be performed: `web_detection` |

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

```json
{
    "success": true,
    "data": {
        "webDetection": {
            "webEntities": [
                {
                    "entityId": "/g/11f53qsk8f",
                    "score": 12.1215,
                    "description": "Juice WRLD"
                },
                {
                    "entityId": "/t/24gkcc11n6yx7",
                    "score": 0.7112,
                    "description": ""
                },
                {
                    "entityId": "/g/11c2k2k6gm",
                    "score": 0.7112,
                    "description": "SoundCloud"
                },
                {
                    "entityId": "/m/04zxmr8",
                    "score": 0.7041,
                    "description": "SoundCloud"
                },
                {
                    "entityId": "/m/0glt670",
                    "score": 0.6141,
                    "description": "Hip hop music"
                },
                {
                    "entityId": "/g/11pws4_dzr",
                    "score": 0.6012,
                    "description": ""
                },
                {
                    "entityId": "/m/0rz017g",
                    "score": 0.562,
                    "description": ""
                },
                {
                    "entityId": "/m/04yhd6c",
                    "score": 0.562,
                    "description": "Spotify"
                },
                {
                    "entityId": "/m/09jcvs",
                    "score": 0.5599,
                    "description": "YouTube"
                },
                {
                    "entityId": "/m/0svml3_",
                    "score": 0.5599,
                    "description": ""
                }
            ],
            "fullMatchingImages": [
                {
                    "url": "https://oboi-download.ru/files/wallpapers/881/23989.jpg",
                    "score": 0
                },
                {
                    "url": "https://images.hdqwalls.com/download/juice-wrld-a4-3840x2160.jpg",
                    "score": 0
                },
                {
                    "url": "https://preview.redd.it/tvhbb8mo3ps71.jpg?auto=webp&s=e2af382fe56ca3ea74a1fc8783fa879c9977a0d0",
                    "score": 0
                },
                {
                    "url": "https://i.redd.it/tvhbb8mo3ps71.jpg",
                    "score": 0
                },
                {
                    "url": "https://www.pixel4k.com/preview.php?src=https://www.pixel4k.com/wp-content/uploads/2020/12/juice-wrld-4k_1607632977.jpg&w=2560&h=1440",
                    "score": 0
                },
                {
                    "url": "https://images.hdqwalls.com/download/juice-wrld-a4-2560x1440.jpg",
                    "score": 0
                },
                {
                    "url": "https://images.hdqwalls.com/download/juice-wrld-a4-2560x1080.jpg",
                    "score": 0
                },
                {
                    "url": "https://www.pixel4k.com/preview.php?src=https://www.pixel4k.com/wp-content/uploads/2020/12/juice-wrld-4k_1607632977.jpg&w=2560&h=1024",
                    "score": 0
                },
                {
                    "url": "https://wallpaperaccess.com/full/4484535.jpg",
                    "score": 0
                },
                {
                    "url": "https://images.hdqwalls.com/download/juice-wrld-a4-2048x1152.jpg",
                    "score": 0
                }
            ],
            "partialMatchingImages": [
                {
                    "url": "https://i.ytimg.com/vi/3yOXPCvZSWw/maxresdefault.jpg",
                    "score": 0
                },
                {
                    "url": "https://stream.kick.com/thumbnails/livestream/598072/thumb614/video_thumbnail/conversion/thumb614-video_thumbnail.webp",
                    "score": 0
                },
                {
                    "url": "https://cutewallpaper.org/23/american-mountain-android-cell-phone-wallpaper/3025832262.jpg",
                    "score": 0
                },
                {
                    "url": "https://www.hdwallpapers.in/download/american_rapper_juice_wrld_on_motor_bike_in_mountains_background_wearing_black_dress_4k_hd_juice_wrld-2560x1440.jpg",
                    "score": 0
                },
                {
                    "url": "https://wallpaperfordesktop.com/wp-content/uploads/2021/09/Juice-WRLD-Wallpaper-2.jpg",
                    "score": 0
                },
                {
                    "url": "https://www.hdwallpapers.in/download/american_rapper_juice_wrld_on_motor_bike_in_mountains_background_wearing_black_dress_4k_hd_juice_wrld-3840x2160.jpg",
                    "score": 0
                },
                {
                    "url": "https://www.hdwallpapers.in/download/american_rapper_juice_wrld_on_motor_bike_in_mountains_background_wearing_black_dress_4k_hd_juice_wrld-1600x900.jpg",
                    "score": 0
                },
                {
                    "url": "https://wallpapersflix.com/wp-content/uploads/2020/07/Juice-Wrld-Desktop-Wallpaper-1-1024x576.jpg",
                    "score": 0
                },
                {
                    "url": "https://wallsbazar.com/wp-content/uploads/2021/10/Juice-WRLD-Computer-Wallpaper-HD.jpg",
                    "score": 0
                },
                {
                    "url": "https://i.ytimg.com/vi/os6Q8F0_o-Y/maxresdefault.jpg",
                    "score": 0
                }
            ],
            "pagesWithMatchingImages": [
                {
                    "url": "https://www.youtube.com/watch?v=ba7wi64igHk",
                    "pageTitle": "<b>Juice WRLD</b> - Walk This Way (Music Video) - YouTube",
                    "partialMatchingImages": [
                        {
                            "url": "https://i.ytimg.com/vi/iAve0MvJISI/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLAXqmrlYXZDXzg35ghHOHdhB8hQlA",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://www.youtube.com/watch?v=YrBJie_A3rI",
                    "pageTitle": "<b>Juice WRLD</b> - My Flaws (Unreleased)[Prod. Red Limits] - YouTube",
                    "partialMatchingImages": [
                        {
                            "url": "https://i.ytimg.com/vi/mLDQH7tBjNU/hqdefault.jpg?sqp=-oaymwE8CKgBEF5IWvKriqkDLwgBFQAAAAAYASUAAMhCPQCAokN4AfABAfgB_gmAAtAFigIMCAAQARhOIGUoYjAP&rs=AOn4CLBsT6hWH6tYoKmxHAa1A2CsLM_MEw",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://www.youtube.com/watch?v=V74ZFKJIT9Y",
                    "pageTitle": "<b>Juice WRLD</b> - Draco on me (Unreleased) - YouTube",
                    "partialMatchingImages": [
                        {
                            "url": "https://i.ytimg.com/vi/iAve0MvJISI/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLAXqmrlYXZDXzg35ghHOHdhB8hQlA",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://www.youtube.com/watch?v=os6Q8F0_o-Y",
                    "pageTitle": "<b>Juice WRLD</b> - Lonely ft. Polo G &amp; Machine Gun Kelly ... - YouTube",
                    "partialMatchingImages": [
                        {
                            "url": "https://i.ytimg.com/vi/os6Q8F0_o-Y/mqdefault.jpg",
                            "score": 0
                        },
                        {
                            "url": "https://i.ytimg.com/vi/os6Q8F0_o-Y/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLDIp1n01hbom8qjv_wh56lhLrPUxQ",
                            "score": 0
                        },
                        {
                            "url": "https://i.ytimg.com/vi/os6Q8F0_o-Y/maxresdefault.jpg",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://soundcloud.com/user-411448275/sets/juice-wrld-studio-sessions",
                    "pageTitle": "<b>Juice Wrld</b> STUDIO SESSIONS - SoundCloud",
                    "partialMatchingImages": [
                        {
                            "url": "https://i1.sndcdn.com/artworks-PMJJQUNEBOrwDuFw-XTwXZw-t240x240.jpg",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://open.spotify.com/playlist/0jLiasxMwWiZEDOw14Hh9j",
                    "pageTitle": "<b>Juice WRLD</b> Type Songs - playlist by @trabbey - Spotify",
                    "partialMatchingImages": [
                        {
                            "url": "https://i.scdn.co/image/ab67706c0000da848e325f487918c4e6f28c8489",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://soundcloud.com/strmynghts2/shoot-back-w-juice-wrld",
                    "pageTitle": "Shoot Back (w/ <b>Juice WRLD</b>) - Strmy Nghts - SoundCloud",
                    "partialMatchingImages": [
                        {
                            "url": "https://i1.sndcdn.com/artworks-UnU9o0LxyhhYhxpK-GcWj9Q-t240x240.jpg",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://soundcloud.com/user-231868378/murder-rate-1",
                    "pageTitle": "Murder Rate (Skip to :58) - <b>Juice WRLD</b> - SoundCloud",
                    "partialMatchingImages": [
                        {
                            "url": "https://i1.sndcdn.com/avatars-IMUohpyWZoigVIqx-pqiyog-t240x240.jpg",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://unsplash.com/s/photos/juice-wrld",
                    "pageTitle": "750+ <b>Juice Wrld</b> Pictures | Download Free Images on Unsplash",
                    "partialMatchingImages": [
                        {
                            "url": "https://images.unsplash.com/photo-1575918679350-bf26b1b4da71?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8anVpY2UlMjB3cmxkfGVufDB8fDB8fA%3D%3D&w=1000&q=80",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                },
                {
                    "url": "https://soundcloud.com/vendettawrld_039/cowboy-hunt-juice-wrld-1",
                    "pageTitle": "COWBOY HUNT • <b>Juice WRLD</b> - SoundCloud",
                    "partialMatchingImages": [
                        {
                            "url": "https://i1.sndcdn.com/artworks-UnU9o0LxyhhYhxpK-GcWj9Q-t240x240.jpg",
                            "score": 0
                        }
                    ],
                    "score": 0,
                    "fullMatchingImages": []
                }
            ],
            "visuallySimilarImages": [
                {
                    "url": "https://w0.peakpx.com/wallpaper/342/806/HD-wallpaper-american-rapper-juice-wrld-on-motor-bike-in-mountains-background-wearing-black-dress-juice-wrld.jpg",
                    "score": 0
                },
                {
                    "url": "https://i.ytimg.com/vi/ICDeevqrMIs/maxresdefault.jpg",
                    "score": 0
                },
                {
                    "url": "https://i.pinimg.com/736x/2a/16/81/2a16815d3e6219a4954801cf3fc522b6.jpg",
                    "score": 0
                },
                {
                    "url": "https://images.hdqwalls.com/download/juice-wrld-5k-85-1366x768.jpg",
                    "score": 0
                },
                {
                    "url": "https://img.youtube.com/vi/xaCvFsCM3GU/0.jpg",
                    "score": 0
                },
                {
                    "url": "https://i.guim.co.uk/img/media/ecef4c321a2f47ca1788a25443a820f7ec45c012/1802_511_5069_3041/500.jpg?quality=85&auto=format&fit=max&s=fc43386beae4af2d0c91e62f78ce94f3",
                    "score": 0
                },
                {
                    "url": "https://i.redd.it/h1r304b7pkr51.jpg",
                    "score": 0
                },
                {
                    "url": "https://4kwallpapers.com/images/wallpapers/juice-wrld-fighting-2560x1440-9496.jpeg",
                    "score": 0
                },
                {
                    "url": "https://images.unsplash.com/photo-1575918620264-7f672ce5b7f6?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Nnx8anVpY2UlMjB3cmxkfGVufDB8fDB8fA%3D%3D&w=1000&q=80",
                    "score": 0
                },
                {
                    "url": "https://e1.pxfuel.com/desktop-wallpaper/414/728/desktop-wallpaper-juice-wrld-gherbo-shares-the-stage-at-isu-g-herbo-and-juice-wrld-thumbnail.jpg",
                    "score": 0
                }
            ],
            "bestGuessLabels": [
                {
                    "label": "juice wrld",
                    "languageCode": "en"
                }
            ]
        },
        "faceAnnotations": [],
        "landmarkAnnotations": [],
        "logoAnnotations": [],
        "labelAnnotations": [],
        "localizedObjectAnnotations": [],
        "textAnnotations": []
    }
}


```

{% endtab %}
{% endtabs %}

## Detect Objects in Images (object\_detection)

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vision-ai/`

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                        | Type   | Description                                   |
| ------------------------------------------- | ------ | --------------------------------------------- |
| image<mark style="color:red;">\*</mark>     | File   | image to be processed                         |
| operation<mark style="color:red;">\*</mark> | String | Operation to be performed (object\_detection) |

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

```json
{
    "success": true,
    "data": {
        "localizedObjectAnnotations": [
            {
                "mid": "/m/01bqk0",
                "name": "Bicycle wheel",
                "score": 0.9002501,
                "boundingPoly": {
                    "normalizedVertices": [
                        {
                            "x": 0.31731018,
                            "y": 0.7903423
                        },
                        {
                            "x": 0.44589233,
                            "y": 0.7903423
                        },
                        {
                            "x": 0.44589233,
                            "y": 0.97311586
                        },
                        {
                            "x": 0.31731018,
                            "y": 0.97311586
                        }
                    ],
                    "vertices": []
                },
                "languageCode": ""
            },
            {
                "mid": "/m/0h9mv",
                "name": "Tire",
                "score": 0.8839195,
                "boundingPoly": {
                    "normalizedVertices": [
                        {
                            "x": 0.5012414,
                            "y": 0.76509905
                        },
                        {
                            "x": 0.62809473,
                            "y": 0.76509905
                        },
                        {
                            "x": 0.62809473,
                            "y": 0.94585633
                        },
                        {
                            "x": 0.5012414,
                            "y": 0.94585633
                        }
                    ],
                    "vertices": []
                },
                "languageCode": ""
            },
            {
                "mid": "/m/0199g",
                "name": "Bicycle",
                "score": 0.7687283,
                "boundingPoly": {
                    "normalizedVertices": [
                        {
                            "x": 0.3199663,
                            "y": 0.66994625
                        },
                        {
                            "x": 0.63588053,
                            "y": 0.66994625
                        },
                        {
                            "x": 0.63588053,
                            "y": 0.9711194
                        },
                        {
                            "x": 0.3199663,
                            "y": 0.9711194
                        }
                    ],
                    "vertices": []
                },
                "languageCode": ""
            },
            {
                "mid": "/m/06z37_",
                "name": "Picture frame",
                "score": 0.64136606,
                "boundingPoly": {
                    "normalizedVertices": [
                        {
                            "x": 0.78812456,
                            "y": 0.15784176
                        },
                        {
                            "x": 0.9710552,
                            "y": 0.15784176
                        },
                        {
                            "x": 0.9710552,
                            "y": 0.31219316
                        },
                        {
                            "x": 0.78812456,
                            "y": 0.31219316
                        }
                    ],
                    "vertices": []
                },
                "languageCode": ""
            }
        ],
        "faceAnnotations": [],
        "landmarkAnnotations": [],
        "logoAnnotations": [],
        "labelAnnotations": [],
        "textAnnotations": []
    }
}
```

{% endtab %}
{% endtabs %}

## Image Generation

## Creates an image given a prompt.

<mark style="color:green;">`POST`</mark> `http://api.autogon.ai/services/image-generation/`

Given a prompt and/or an input image, this endpoint will generate a new image.

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                     | Type   | Description                                                                                                 |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------- |
| prompt<mark style="color:red;">\*</mark> | String | A text description of the desired image(s). The maximum length is 1000 characters.                          |
| output\_size                             | String | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024, defaults to 512x512.` |

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

```json
{
    "image_url": "https://example-image-url.com",
    "date_created": "2023-04-15 10:30:49.882687"
}
```

{% endtab %}
{% endtabs %}

## License Plate Detector

Detects license plate in a given image

<mark style="color:green;">`POST`</mark> `http://api.autogon.ai/services/license-plate-detection/`

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body&#x20;

| Name                                          | Type  | Description                                          |
| --------------------------------------------- | ----- | ---------------------------------------------------- |
| image\_urls<mark style="color:red;">\*</mark> | Array | An array of image urls with images of license plates |
| <p></p><p>confidence\_thresh</p>              | Float | Default: 0.5                                         |
| overlap\_thresh                               | Float | Default: 0.5                                         |

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

```json
{
  "https://storage.autogon.ai/45c16e3a-924f-4db0-8db7-0b043598f093.jpg": [
    {
      "lbl_id": 0,
      "lbl": "LP",
      "bbx": {
        "x": 59.0321159362793,
        "y": 434.32745361328125,
        "w": 267.5981750488281,
        "h": 140.85491943359375
      },
      "conf": 0.9056000113487244
    },
    {
      "lbl_id": 0,
      "lbl": "LP",
      "bbx": {
        "x": 543.1251220703125,
        "y": 363.24102783203125,
        "w": 179.230224609375,
        "h": 43.1021728515625
      },
      "conf": 0.7953004240989685
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Motion Detection

Provides real time, accurate motion tracking for video streams

<mark style="color:green;">`POST`</mark> `http://api.autogon.ai/services/motion-detection/`

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body&#x20;

| Name                                    | Type | Description                 |
| --------------------------------------- | ---- | --------------------------- |
| video<mark style="color:red;">\*</mark> | File | video file to detect motion |

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

```json
{
  "fps": 12.0,
  "annotations": {
    "5": [
      {
        "bbx": {
          "x": 0,
          "y": 568,
          "w": 576,
          "h": 276
        }
      }
    ],
    "6": [
      {
        "bbx": {
          "x": 34,
          "y": 708,
          "w": 110,
          "h": 86
        }
      },
      {
        "bbx": {
          "x": 0,
          "y": 671,
          "w": 576,
          "h": 249
        }
      },
      {
        "bbx": {
          "x": 0,
          "y": 663,
          "w": 120,
          "h": 15
        }
      }
    ],
  }
}
```

{% endtab %}
{% endtabs %}

## Stable Diffusion (Deprecated)

Generate Images from Text

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/stable-diffusion/`

#### Headers

| Name                                           | Type | Description      |
| ---------------------------------------------- | ---- | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> |      | application/json |

#### Request Body

| Name                                   | Type   | Description                                |
| -------------------------------------- | ------ | ------------------------------------------ |
| text<mark style="color:red;">\*</mark> | String | Short description of image to be generated |

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

```json
{
    "status": true,
    "image": "https://test-image.png"
}
```

{% endtab %}
{% endtabs %}

## Image Captioning (Deprecated)

Analyzes an image and generates captions for images

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/image-captioning/`

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                         | Type   | Description                                               |
| -------------------------------------------- | ------ | --------------------------------------------------------- |
| image<mark style="color:red;">\*</mark>      | File   | image to be captioned                                     |
| image\_url<mark style="color:red;">\*</mark> | String | url of the image to be captioned (should be downloadable) |

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

```json
{
    "status": true,
    "message": "a ball with a yellow ball inside of it "
}
```

{% endtab %}
{% endtabs %}

## Document Question and Answering (Deprecated)

Leverage AI models capable of answering questions based on the content of a given document.

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/document-qa/`

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| question<mark style="color:red;">\*</mark> | String |             |
| document\_url                              | String |             |
| document                                   | File   |             |

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

```json
{
    "status": True, 
    "message": answer
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "status": False, 
    "message": error message
}
```

{% endtab %}
{% endtabs %}

## Visual Question and Answering (Deprecated)

Generate accurate answers about an image based on the visual content of the image

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/services/vilt-vq/`

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| text<mark style="color:red;">\*</mark> | String |             |
| image                                  | File   |             |
| image\_url                             | String |             |

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

```json
{
    "status": true,
    "message": "very"
}
```

{% endtab %}
{% endtabs %}
