> ## 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.

# Add Scenes

> [!NOTE]
>
> **[Click for Python SDK](https://docs.nucleus.scale.com/en/latest/api/nucleus/index.html#nucleus.Dataset.append)**
>
> ```
> Dataset.append(
>     items: Union[List[LidarScene], List[VideoScene]],
>     update: bool = False
> ) -> AsyncJob
> ```

This endpoint allows you to upload scenes to a Nucleus `Dataset`.

#### Uploading from a cloud provider

* Keep the content-type of the request as application/json.
* Specify the URL of the image or pointcloud location. Make sure Scale can access this URL.
* We currently support remote URLs starting in: `gs:`, `s3:`, `http:`, or `https:`


## OpenAPI

````yaml openapi/nucleus.json POST /{dataset_id}/upload_scenes?async=1
openapi: 3.1.0
info:
  title: Nucleus API
  version: '1.1'
servers:
  - url: https://api.scale.com/v1/nucleus
security:
  - sec0: []
paths:
  /{dataset_id}/upload_scenes?async=1:
    post:
      summary: Add Scenes
      operationId: add-scenes
      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:
                - reference_id
                - frames
              properties:
                reference_id:
                  type: string
                  description: User-specified identifier to reference the image.
                frames:
                  type: array
                  description: Mapping from sensor name to `DatasetItem`.
                  items:
                    properties:
                      lidar:
                        type: object
                        description: >-
                          Each Frame must have exactly 1 pointcloud item. Note
                          that you can use any arbitrary key such as
                          `"pointcloud"` or `"radar_1"`.
                        required:
                          - url
                          - type
                          - reference_id
                        properties:
                          url:
                            type: string
                            description: >-
                              The Scale-accessible remote URL of the pointcloud
                              JSON.
                          type:
                            type: string
                            enum:
                              - pointcloud
                              - image
                            description: 'Item type: `"pointcloud"` or `"image"`.'
                          reference_id:
                            type: string
                            description: User-specified identifier to reference the image.
                          metadata:
                            type: object
                            description: >-
                              Optional metadata to include with the item. Camera
                              parameters should be built into a object and
                              passed in as metadata with the key
                              `"camera_params"`.
                            properties: {}
                      camera_1:
                        type: object
                        description: >-
                          Frames can have an arbtirary number of camera image
                          items, including 0. The key can also be arbitrarily
                          defined, but note that Nucleus will order the scene's
                          camera image items by key lexicographically.
                        required:
                          - url
                          - type
                          - reference_id
                        properties:
                          url:
                            type: string
                            description: >-
                              The Scale-accessible remote URL containing the
                              image.
                          type:
                            type: string
                            enum:
                              - pointcloud
                              - image
                            description: 'Item type: `"pointcloud"` or `"image"`.'
                          reference_id:
                            type: string
                            description: User-specified identifier to reference the image.
                          metadata:
                            type: object
                            description: >-
                              Optional metadata to include with the item. Camera
                              parameters should be built into a object and
                              passed in as metadata with the key
                              `"camera_params"`.
                            properties: {}
                      camera_2:
                        type: object
                        description: >-
                          Another camera image item for this example Frame; note
                          that any amount of camera image items can be
                          associated with a Frame.
                        required:
                          - url
                          - type
                          - reference_id
                        properties:
                          url:
                            type: string
                            description: >-
                              The Scale-accessible remote URL containing the
                              image.
                          type:
                            type: string
                            enum:
                              - pointcloud
                              - image
                            description: 'Item type: `"pointcloud"` or `"image"`.'
                          reference_id:
                            type: string
                            description: User-specified identifier to reference the image.
                          metadata:
                            type: object
                            description: >-
                              Optional metadata to include with the item. Camera
                              parameters should be built into a object and
                              passed in as metadata with the key
                              `"camera_params"`.
                            properties: {}
                    type: object
                update:
                  type: boolean
                  description: >-
                    Whether or not to update scene-level and item-level metadata
                    upon reference ID collision. Nucleus expects scenes to have
                    the exact same structure and will ignore re-uploaded scenes
                    (same reference ID) that now have a different number of
                    frames or items per frame.
                  default: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    dataset_id: ds_bw6de8s84pe0vbn6p5zg
                    new_scenes: 2
                    ignored_scenes: 0
                    scenes_errored: 0
                    errors: 0
              schema:
                type: object
                properties:
                  dataset_id:
                    type: string
                    example: ds_bw6de8s84pe0vbn6p5zg
                  new_scenes:
                    type: integer
                    example: 2
                    default: 0
                  ignored_scenes:
                    type: integer
                    example: 0
                    default: 0
                  scenes_errored:
                    type: integer
                    example: 0
                    default: 0
                  errors:
                    type: integer
                    example: 0
                    default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````