Skip to main content

Create an Index

moonshine.create(index="your-index-name")
Ensure that the index name has no spaces or special characters.
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
Uploads goes over the process of uploading videos to your index.

List all Indexes

To list all indexes in your account:
moonshine.list_indexes(token="your-token")
This returns a list of index names, example:
[
    "index1",
    "index2"
]

List Index Content

To get all videos in an index:
moonshine.items(index="your-index-name")
This returns a list of file_id and file_name pairs, for example:
[
    {"file_id": "[id1].mp4", "file_name": "[name1].mp4"},
    {"file_id": "[id2].mp4", "file_name": "[name2].mp4"}
]

index
string
required
A unique name for your index.
performance
bool
Create an optimized index for additional capabilities (e.g., streaming).
Incurs additional costs.
token
string
required
An API token
index
string
required
The index name
I