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

# Add Dataset Row

> Create a new dataset item in the specified dataset



## OpenAPI

````yaml POST /datasets/{slug}/items
openapi: 3.1.0
info:
  title: Basalt API
  description: Basalt API
  version: 0.2.1
servers:
  - url: https://api.getbasalt.ai
    description: Basalt Endpoint API
security:
  - bearerAuth: []
paths:
  /datasets/{slug}/items:
    post:
      summary: Create a dataset item
      description: Create a new dataset item in the specified dataset
      parameters:
        - schema:
            type: string
            description: The slug of the dataset to add an item to
            example: my-dataset
          required: true
          name: slug
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                    - string
                    - 'null'
                  description: The name of the dataset row
                  example: Test case 1
                values:
                  type: object
                  additionalProperties:
                    type: string
                  description: The values for each column in this dataset row
                  example:
                    columnName1: value1
                    columnName2: value2
                idealOutput:
                  type:
                    - string
                    - 'null'
                  description: The ideal output for this dataset row, if any
                  example: This is the expected output
                metadata:
                  type:
                    - object
                    - 'null'
                  additionalProperties: {}
                  description: Additional metadata for this dataset row
                  example:
                    source: api
                    context: testing
              required:
                - values
      responses:
        '201':
          description: The created dataset item
          content:
            application/json:
              schema:
                type: object
                properties:
                  warning:
                    type: string
                    description: >-
                      Warning message about columns that were omitted because
                      they do not exist in the dataset
                    example: >-
                      The following columns do not exist in the dataset and were
                      omitted: extraColumn1, extraColumn2
                  datasetRow:
                    type: object
                    properties:
                      name:
                        type:
                          - string
                          - 'null'
                        description: The name of the dataset row
                        example: Test case 1
                      values:
                        type: object
                        additionalProperties:
                          type: string
                        description: The values for each column in this dataset row
                        example:
                          columnName1: value1
                          columnName2: value2
                      idealOutput:
                        type:
                          - string
                          - 'null'
                        description: The ideal output for this dataset row, if any
                        example: This is the expected output
                      metadata:
                        type:
                          - object
                          - 'null'
                        additionalProperties: {}
                        description: Additional metadata for this dataset row
                        example:
                          source: api
                          context: testing
                    required:
                      - values
                    description: The created dataset row
                required:
                  - datasetRow
        '400':
          description: Bad request - missing required columns
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Dataset not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````