# Importing Annotations during Asset Import

Hub allows you to import pre-labels together with assets, at the same time.

{% hint style="info" %}
For more information on pre-labels, see the page [Importing Annotations](/data/importing-and-exporting-annotations/importing-annotations.md).
{% endhint %}

To do so, you will have to use the *Cloud Import JSON* method for importing assets, as explained below:

1. Navigate to the *Assets* tab and click on the *Add Data* button.
2. From the dialog that appears, enter the *Cloud Storage* tab.
3. Prepare a JSON formatted like the following. It is an array of objects, with each object representing an asset. Each object, will have a `data` field with its URL, a `externalId` field with the externalId to be assigned to the asset, and `object`, `classifications`, and `relations` fields according to the type of annotations to be imported.\
   \
   Annotations must be in the Ango Import Format, outlined in detail in [its docs page](/data/importing-and-exporting-annotations/importing-annotations/ango-import-format.md).

{% hint style="warning" %}
URLs may not contain spaces or "+" characters anywhere.
{% endhint %}

<details>

<summary>Example JSON</summary>

```json
[
  {
    "data": "https://i.imgur.com/CzXTtJV.jpg",
    "externalId": "CuteCat",
    "objects": [
      {
        "schemaId": "b1c6805d054f0e44ae11500",
        "title": "Vehicle",
        "objectId": "ObjectId123",
        "bounding-box": {
          "width": 120.005,
          "height": 135.345,
          "x": 50.3,
          "y": 30.4
        }
      },
      {
        "schemaId": "c8c1f3d2388109519849399",
        "title": "rbb",
        "objectId": "ObjectId567",
        "rotated-bounding-box": {
          "width": 100,
          "height": 100,
          "x": 100,
          "y": 100,
          "rotation": -12
        }
      },
      {
        "schemaId": "a966c7799383465850cd803",
        "title": "Pedestrian",
        "polygon": [
          [
            320,
            103.4
          ],
          [
            310.5,
            123.45
          ],
          [
            100.4,
            32
          ]
        ],
        "classifications": [
          {
            "schemaId": "4460fa700ef030c4e575604",
            "title": "Nested Radio",
            "answer": "1"
          }
        ]
      },
      {
        "schemaId": "2fef75bce2ec525300dd933",
        "title": "seg",
        "segmentation": {
          "zones": [
            {
              "region": [
                [
                  220.035775097489,
                  221.395881006865
                ],
                [
                  277.709558188864,
                  70.5377574370709
                ],
                [
                  328.05026734694,
                  74.4855089490029
                ]
              ],
              "holes": []
            },
            {
              "region": [
                [
                  326.629284918156,
                  74.141876430206
                ],
                [
                  330.233896361367,
                  74.6567505720824
                ],
                [
                  328.05026734694,
                  74.4855089490029
                ]
              ],
              "holes": []
            }
          ]
        }
      },
      {
        "schemaId": "b1919d09c9770392ebdb948",
        "title": "adjective",
        "ner": {
          "start": 54,
          "end": 78
        }
      },
      {
        "schemaId": "376a18175f35d976d204251",
        "title": "poi",
        "point": [
          48,
          120
        ]
      },
      {
        "schemaId": "aca6765850e6fa107053050",
        "title": "pdf",
        "pdf": {
          "height": 1200,
          "width": 800,
          "x1": 100,
          "y1": 250,
          "x2": 200,
          "y2": 350,
          "pageNumber": 1,
          "text": "Text"
        }
      },
      {
        "schemaId": "2019c746cd79a6514c03641",
        "title": "sentence",
        "ner": {
          "start": 54,
          "end": 78
        }
      },
      {
        "schemaId": "090d688986d9e58f2886470",
        "title": "",
        "segmentation": {
          "zones": [
            {
              "region": [
                [
                  220.035775097489,
                  221.395881006865
                ],
                [
                  277.709558188864,
                  70.5377574370709
                ],
                [
                  328.05026734694,
                  74.4855089490029
                ]
              ],
              "holes": []
            },
            {
              "region": [
                [
                  326.629284918156,
                  74.141876430206
                ],
                [
                  330.233896361367,
                  74.6567505720824
                ],
                [
                  328.05026734694,
                  74.4855089490029
                ]
              ],
              "holes": []
            }
          ]
        }
      },
      {
        "schemaId": "eda50cb6a1017a348914572",
        "title": "poi2",
        "point": [
          48,
          120
        ]
      }
    ],
    "classifications": [
      {
        "schemaId": "1ea7a275ce5c9cf30a6f148",
        "title": "chk",
        "answer": [
          "1"
        ]
      },
      {
        "schemaId": "a2b4a50bb90eb6523b88376",
        "title": "sdr",
        "answer": "1"
      },
      {
        "schemaId": "11f6ed8e4ac4852d3422341",
        "title": "mdr",
        "answer": [
          "1"
        ]
      },
      {
        "schemaId": "6590a72d09f1760a4578032",
        "title": "txt",
        "answer": "Sample Text"
      },
      {
        "schemaId": "78ce1ba37f15e535f329142",
        "title": "Rich Text",
        "answer": "Sample Text"
      }
    ],
    "relations": [
      {
        "title": "sng",
        "schemaId": "8f8e617174718e80bbea268",
        "from": "ObjectId123",
        "to": "ObjectId567"
      },
      {
        "title": "gru",
        "schemaId": "37ccadce8a7505b93659450",
        "group": [
          "ObjectId123",
          "ObjectId567"
        ]
      }
    ]
  }
]
```

</details>

4. Drag and drop the JSON you've just created on the *Cloud Storage* file box:

   <figure><img src="/files/Qrd0IHBJ7gTIUHjuAsLQ" alt=""><figcaption></figcaption></figure>
5. If your assets are located in a private cloud storage location, select the correct [storage integration](/data/storages.md) from the *Storage Method* dropdown on the left-hand side of the screen.
6. Your pre-labeled assets with attachments will appear in the *Assets* tab.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imerit.net/data/importing-assets/importing-annotations-during-asset-import.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
