Get Catalog slices via SDK
You can programmatically retrieve a slice’s data rows and all associated information via our Python SDK. From there, you can use Catalog to inspect the data rows you retrieved via the SDK visually. Retrieving a slice programmatically is a convenient way to curate a new batch or a model run dataset directly from a saved slice.End-to-end example: create and retrieve Catalog slices
Before you start
You must import these libraries to use the code examples in this sectionReplace with your API key
Create a Catalog slice
Currently, we do not support creating slices through the SDK; for the purpose of this demo, we will create a catalog slice through the UI.1
Navigate to the Catalog section of the Labelbox Platform, and select All datasets or a particular dataset you would like to create a slice from.
2
Navigate to Search your data dropdown menu or use a similarity search to create a filter.

Example of final view after executing steps 1 - 2
3
Hit Enter and select Save slice
4
Give the slice name and select Save
5
Copy the Slice ID

Example of final view after executing steps 3 - 5
6
Paste Slice ID