# Pixeltable Quickstart

<!-- -->

[Pixeltable](https://www.pixeltable.com/) is declarative data infrastructure for building multimodal AI applications. It allows you to create and manage tables similar to how you create and use tables with database engines like Postgres. When you combine Pixeltable and Tigris, you get unlimited media storage with no egress fees and truly global scalability. This guide will tell you how to configure Pixeltable to work with Tigris.

Pixeltable contains a storage integration for Tigris as of [version 0.5.0](https://github.com/pixeltable/pixeltable/releases/tag/v0.5.0). This allows you to store your structured data in Pixeltable and have references to unstructured multimodal data in Tigris.

In order to configure Pixeltable to use Tigris, you need to set the following environment variables or make changes to the configuration file in `~/.pixeltable/config.toml`:

* Configuration file
* Environment variables

```
[pixeltable]

# The location where new media files are stored when they are added to tables.

input_media_dest = "s3://contoso-data/input"

# The location where media files are stored when they are generated by Pixeltable operations.

output_media_dest = "s3://contoso-data/output"

# The name of the AWS configuration profile that is configured for accessing Tigris.

tigris_profile = "tigris"
```

| Environment variable           | Example                    | Description                                                                                                                                 |
| ------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `PIXELTABLE_TIGRIS_PROFILE`    | `tigris`                   | The name of the [AWS configuration profile](/docs/sdks/s3/aws-cli/.md#using-multiple-aws-profiles) that is configured for accessing Tigris. |
| `PIXELTABLE_INPUT_MEDIA_DEST`  | `s3://contoso-data/input`  | The location where new media files are stored when they are added to tables.                                                                |
| `PIXELTABLE_OUTPUT_MEDIA_DEST` | `s3://contoso-data/output` | The location where media files are stored when they are generated by Pixeltable operations.                                                 |

Then when you insert a video into a [table](https://docs.pixeltable.com/datastore/tables-and-operations):

```
import pixeltable as pxt



videos = pxt.create_table(

    "content",

    schema={

        "video": pxt.Video,

        "title": pxt.String,

    },

    if_exists="ignore",

)



videos.insert(

    [

        {

            "video": "./var/big-buck-bunny.mp4",

            "title": "Big Buck Bunny",

        },

    ]

)
```

Pixeltable will automatically upload the media file to Tigris as it ingests it.

If you create an image with the [OpenAI `image_generation` user-defined function](https://docs.pixeltable.com/sdk/v0.5.1/openai#udf-image-generations), the generated image will automatically be uploaded to Tigris:

```
import pixeltable as pxt

from pixeltable.functions import openai



pxt.drop_table("wallpapers")

wallpapers = pxt.create_table(

    "wallpapers",

    schema={

        "text": pxt.String,

    },

    if_exists="ignore",

)



wallpapers.insert(

    [

        {"text": "A surrealist oil on canvas painting of a taco dancing in a datacentre"}

    ]

)



wallpapers.add_computed_column(

    gen_image=openai.image_generations(wallpapers.text, model='dall-e-2')

)
```

You can then browse the generated images in Tigris.

From here, go [read the Pixeltable documentation](https://docs.pixeltable.com/overview/pixeltable) so you can get started building your next multimodal app.
