# Images, Annotations and Augmentation

## Create Image Object

## Create Image

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

#### Request Body

| Name                                          | Type  | Description        |
| --------------------------------------------- | ----- | ------------------ |
| images<mark style="color:red;">\*</mark>      | array | List of Image URLs |
| project\_id<mark style="color:red;">\*</mark> | int   | Project ID         |

{% tabs %}
{% tab title="201: Created " %}

{% endtab %}
{% endtabs %}

## Get Images

## Perform quick and fully-managed model inference&#x20;

<mark style="color:blue;">`GET`</mark> `https://api.autogon.ai/api/v1/label/image`

#### Path Parameters

| Name                                          | Type | Description |
| --------------------------------------------- | ---- | ----------- |
| project\_id<mark style="color:red;">\*</mark> | int  | Project ID  |

{% tabs %}
{% tab title="200: OK Image IDs and annotations data" %}

{% endtab %}
{% endtabs %}

## Delete Images

## Delete images using IDs

<mark style="color:red;">`DELETE`</mark> `https://api.autogon.ai/api/v1/label/image/`

#### Request Body

| Name                                          | Type  | Description        |
| --------------------------------------------- | ----- | ------------------ |
| images                                        | array | Array of image IDs |
| project\_id<mark style="color:red;">\*</mark> | int   | Project ID         |

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

{% endtab %}
{% endtabs %}

## Annotate Images

Sample Request

```json
{
    "project_id": 258,
    "images": [
        {
            "image_id": 91,
            "annotations": [
                {
                    "lbl": "object_class",
                    "bbx": {
                        "x": 452,
                        "y": 134,
                        "w": 241,
                        "h": 143
                    }
                },
                {
                    "lbl": "test_class",
                    "bbx": {
                        "x": 413,
                        "y": 234,
                        "w": 143,
                        "h": 134
                    }
                }
            ]
        },
        {
            "image_url": "https://storage.autogon.ai/......",
            "w": 800,
            "h": 600,
            "annotations": [
                {
                    "lbl": "object_class",
                    "bbx": {
                        "x": 452,
                        "y": 134,
                        "w": 241,
                        "h": 143
                    }
                },
                {
                    "lbl": "test_class",
                    "bbx": {
                        "x": 413,
                        "y": 234,
                        "w": 143,
                        "h": 134
                    }
                }
            ]
        }
    ]
}
```

## Modifiy Image Annotations

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

#### Request Body

| Name                                          | Type  | Description                                                      |
| --------------------------------------------- | ----- | ---------------------------------------------------------------- |
| project\_id<mark style="color:red;">\*</mark> | int   | Project ID                                                       |
| images<mark style="color:red;">\*</mark>      | array | List of image data for each specific image including annotations |

## Image Augmentation

## Augment all

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

Augment all image-annotation pairs in a project

#### Request Body

| Name                                          | Type  | Description                                                                                                                                                                                        |
| --------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| project\_id<mark style="color:red;">\*</mark> | int   | Project ID                                                                                                                                                                                         |
| augmentations                                 | array | <p>List of augmentations to apply.<br>Default: <code>\["all"]</code><br>Equivalent to: <code>\["HorizontalFlip", "VerticalFlip", "Crop", "HueSaturation", "BrightnessContrast", "Blur"]</code></p> |
| multiplier                                    | int   | <p>Number of augmented images to generate per image<br>Default: <code>3</code></p>                                                                                                                 |

{% tabs %}
{% tab title="200: OK List of images from augmentation" %}

{% endtab %}
{% endtabs %}
