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

# Creates a new record in a dataset.

`POST /dataset/record`

## Request body

- DatasetRecordCreateRequest
  - `dataset_id` number, required
  - `data` DatasetRecordDataObject, required
    - `query` string, nullable
    - `tools` ChatCompletionTool[]
      - `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[]
      - string[]
    - `kto_tag` string, nullable
    - `messages` RequestMessage[]
      - `role` 'system' | 'user' | 'assistant' | 'tool'
      - `content` string
    - `rejected` string, nullable
    - `response` string, nullable

## Response `200`

Successful response

- DatasetRecordCreateResponse
  - `message` string
  - `task_id` string

## Other responses

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

## Changes

- **2024-07-25** `e6ff780ed2b0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/propulsion-ai/apis/propulsionai-api/changes/dataset/record/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/e6ff780ed2b0/schema)
