> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redbrickai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Importing Data & Annotations

The RedBrick AI SDK allows you to programmatically import data and/or annotations with a Python script. You can import either locally or externally stored data via the SDK using the `create_datapoints` method.

<Note>
  Please see the full reference documentation for [`create_datapoints`
  here](https://sdk.redbrickai.com/sdk.html#redbrick.upload.Upload.create_datapoints).
</Note>

Perform the [standard RedBrick AI SDK setup](./#initializing-the-redbrick-sdk-in-python) to create a Project object.

```python theme={null}
project = redbrick.get_project(org_id, project_id, api_key)
```

## Import locally stored images

To import locally stored data, create a list of `points` with relative file paths to your locally stored data, and use the [`redbrick.StorageMethod.REDBRICK`](https://sdk.redbrickai.com/sdk.html#redbrick.StorageMethod) storage ID.&#x20;

```python theme={null}
---
title: create a list of file paths to your locally stored data
---
points = [{"items": ["path/to/data.nii"], "name": "..."}]

---
title: perform the upload operation
---
project.upload.create_datapoints(
    storage_id=redbrick.StorageMethod.REDBRICK,
    points=points
)
```

<Note>
  The points array follows the format of the [items
  list](/importing-data/import-cloud-data/creating-an-items-list).
</Note>

## Import externally stored images

To import data stored in an external storage method such as AWS S3, be sure to use the Storage ID found on the Storage tab of your RedBrick AI account instead of `redbrick.StorageMethod.REDBRICK`.

<div data-full-width="true">
  <Frame caption="Click on the field to copy the Storage ID to your clipboard!">
    <img src="https://mintcdn.com/redbrickai-c2e4bc62/kyR1SMCBxx3NFyLR/assets/images/python-sdk/sdk-overview/storage-id.png?fit=max&auto=format&n=kyR1SMCBxx3NFyLR&q=85&s=8273a49ab507e118037fe03ff95c6afa" alt="" width="3066" height="1634" data-path="assets/images/python-sdk/sdk-overview/storage-id.png" />
  </Frame>
</div>

<Note>
  [Visit our documentation on external storage](/importing-data/import-cloud-data) to learn how to
  integrate your own external storage like AWS s3, GCS, or Azure blob.
</Note>

## Import annotations

First, please follow our guide on [preparing your items list for annotation](/python-sdk/importing-annotations-guide) import to prepare your points object correctly.

<Card href="/python-sdk/importing-annotations-guide" title="Importing Annotations Guide">
  Importing Annotations
</Card>

### Importing locally stored annotations & images

```python theme={null}
project.upload.create_datapoints(
    storage_id=redbrick.StorageMethod.REDBRICK,
    points=points
)
```

### Importing locally stored annotations with externally stored images

```python theme={null}
project.upload.create_datapoints(
    storage_id="your_storage_id",
    label_storage_id=redbrick.StorageMethod.REDBRICK
    points=points
)
```

### Importing externally stored annotations and images

```python theme={null}
project.upload.create_datapoints(
    storage_id="your_storage_id",
    label_storage_id="your_storage_id"
    points=points
)
```
