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

# Create and View Indexes

> Indexes are isolated buckets of video separated for efficient search and retrieval

## Create an Index

<CodeGroup>
  ```python python theme={null}
  moonshine.create(index="your-index-name")
  ```
</CodeGroup>

Ensure that the index name has no spaces or special characters.

<Warning>
  Only the token used to create an index will have read/write access to it.\
  Need to share access? Ping us at [team@usemoonshine.com](mailto:team@usemoonshine.com)
</Warning>

[Uploads](/sdk-docs/upload) goes over the process of uploading videos to your index.

## List all Indexes

To list all indexes in your account:

<CodeGroup>
  ```python python theme={null}
  moonshine.list_indexes(token="your-token")
  ```
</CodeGroup>

This returns a list of index names, example:

```python theme={null}
[
    "index1",
    "index2"
]
```

## List Index Content

To get all videos in an index:

<CodeGroup>
  ```python python theme={null}
  moonshine.items(index="your-index-name")
  ```
</CodeGroup>

This returns a list of `file_id` and `file_name` pairs, for example:

```python theme={null}
[
    {"file_id": "[id1].mp4", "file_name": "[name1].mp4"},
    {"file_id": "[id2].mp4", "file_name": "[name2].mp4"}
]
```

***

<Accordion title=".create() Params" icon="code-simple">
  <ParamField path="index" type="string" required>
    A unique name for your index.

    <ParamField path="performance" type="bool" placeholder="False">
      Create an optimized index for additional capabilities (e.g., streaming).\
      Incurs additional costs.
    </ParamField>
  </ParamField>
</Accordion>

<Accordion title=".create() Params" icon="code-simple">
  <ParamField path="token" type="string" required>
    An API token
  </ParamField>
</Accordion>

<Accordion title=".items() Params" icon="code-simple">
  <ParamField path="index" type="string" required>
    The index name
  </ParamField>
</Accordion>
