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

# Create Slice

> [!NOTE]
>
> **[Click for Python SDK](https://docs.nucleus.scale.com/en/latest/api/nucleus/index.html#nucleus.Dataset.create_slice)**
>
> ```
> Dataset.create_slice(
>     name: str,
>     reference_ids: Optional[List[str]] = None
> ) -> Slice
> ```

This endpoint creates a `Slice` of `DatasetItems` within a `Dataset`. Pass a list of reference IDs (up to 10,000 items) to add to the slice; if no reference IDs are given, an empty slice is created.


## OpenAPI

````yaml openapi/nucleus.json POST /dataset/{dataset_id}/create_slice
openapi: 3.1.0
info:
  title: Nucleus API
  version: '1.1'
servers:
  - url: https://api.scale.com/v1/nucleus
security:
  - sec0: []
paths:
  /dataset/{dataset_id}/create_slice:
    post:
      summary: Create Slice
      operationId: create-slice
      parameters:
        - name: dataset_id
          in: path
          description: The Scale-generated ID of the Dataset.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - reference_ids
              properties:
                name:
                  type: string
                  description: Human-readable name of the Slice.
                reference_ids:
                  type: array
                  description: >-
                    Array of user-specified reference IDs pertaining to the
                    items to include in the Slice.
                  items:
                    type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    slice_id: slc_bx86ea222a6g057x4380
              schema:
                type: object
                properties:
                  slice_id:
                    type: string
                    example: slc_bx86ea222a6g057x4380
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````