> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/data/importing-assets/contextdata-adding-extra-data-to-assets.md).

# contextData: Adding Extra Data to Assets

Ango Hub allows you to attach arbitrary text data to any [asset](/core-concepts/assets.md), in such a way that it will appear, together with the asset, in the final [export](/data/importing-and-exporting-annotations/exporting-annotations.md). We call this data `contextData`.

contextData is always a JSON dictionary with key/value pairs, for example:

```json
"contextData": {
    "key1": "value1",
    "key2": "value2"
}
```

## Uploading contextData

contextData can be added to assets when uploading them:

* Through the [SDK](/sdk/sdk-documentation.md)
* Through the *Upload Data URL* function in the UI.

### SDK

* when using the [`upload_files()`](/sdk/sdk-documentation.md#upload_files-project_id-file_paths-storage_id-batches) function as documented.
* when using the [`upload_files_cloud()`](/sdk/sdk-documentation.md#upload_files_cloud-project_id-assets-integration_id-batches) function as documented.

### Upload Data URL

1. From your project dashboard, navigate to the *Assets* tab.
2. Click on the *Add Data* button.
3. Enter the *Upload Data URL* section.
4. Prepare a JSON containing your asset URLs paired with contextData, like so:

```json
[
  {
    "data": "https://i.imgur.com/CzXTtJV.jpg",
    "externalId": "cute-cat.jpg",
    "contextData": {
      "key1": "value1",
      "key2": "value2"
    }
  },
  {
    "data": "https://i.imgur.com/OB0y6MR.jpg",
    "externalId": "cute-dog.jpg",
    "contextData": {
      "key3": "value3",
      "key4": "value4"
    }
  }
]
```

5. Drag and drop the JSON onto the upload box and upload. Your assets will have the contextData paired with them.

## Downloading/Viewing contextData

From your project, navigate to the *Export* tab and click on *Export V3.* You will obtain the contextData of each of your assets in the export:

```json
[{
  "asset": "https://asset.com/asset.jpg",
  "externalId": "7b7c4903a2ab4b22a47462af682dd7c6",
  "contextData": {
    "key1": "value1"
  },
  "metadata": {},
  "batches": [],
  "task": {
    "taskId": "64e4758e73c32b0015749157",
    "..."
    ],
    "classifications": [],
    "relations": []
  }
}]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/data/importing-assets/contextdata-adding-extra-data-to-assets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
