---
title: "Creates a new item in a dataset."
method: POST
path: "/dataset/item"
tags: ["Dataset"]
---

# Creates a new item in a dataset.

`POST /dataset/item`

## Request body

- DatasetItemCreateRequest
  - `dataset_id` integer, required
  - `data` DatasetItemDataObject, required
    - `query` string, nullable
    - `tools` ChatCompletionTool[], nullable
      - `type` 'function', required
      - `function` FunctionRequestObject, required
        - `description` string
        - `name` string, required
        - `parameters` object
    - `chosen` string, nullable
    - `images` string, nullable
    - `prompt` string, nullable
    - `system` string, nullable
    - `history` array[], nullable
      - string[]
    - `kto_tag` string, nullable
    - `messages` RequestMessage[]
      - `role` 'system' | 'user' | 'assistant' | 'tool'
      - `content` string
    - `rejected` string, nullable
    - `response` string, nullable

## Response `200`

Successful response

- DatasetItemCreateResponse
  - `message` string
  - `id` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

- **2024-07-29** `71b312915fef` — 1 breaking
  - the `dataset_id` request property type/format changed from `number`/`` to `integer`/``
- **2024-07-25** `c68fccd51fd4` — 1 warning, 1 info
  - removed the optional property `task_id` from the response with the `200` status
  - added the optional property `id` to the response with the `200` status
- **2024-07-25** `6d461643cf66` — 2 info
  - the request property `data/history` became nullable
  - the request property `data/tools` became nullable
- **2024-07-25** `172e0332d50d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/propulsion-ai/apis/propulsionai-api/changes/dataset/item/post.md)

---

[API](https://skmtc.dev/propulsion-ai/apis/propulsionai-api.md) · [All operations](https://skmtc.dev/propulsion-ai/apis/propulsionai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/propulsion-ai/propulsionai-api/revisions/643ad4ee18ac/schema)
