---
title: "Create dataset items from JSON file"
method: POST
path: "/v1/private/datasets/items/from-json"
tags: ["Datasets"]
---

# Create dataset items from JSON file

`POST /v1/private/datasets/items/from-json`

Create dataset items from an uploaded JSON or JSONL file. JSON files must contain a top-level array of objects.
JSONL files contain one JSON object per non-blank line; multi-line JSON objects are not supported.
Reserved keys (id, source, description, tags, evaluators, execution_policy) are extracted into the
corresponding DatasetItem fields; all remaining keys form the item's data map and preserve their JSON types.
To link dataset items to specific traces or spans use the dedicated /items/from-traces or /items/from-spans endpoints.
Processing happens asynchronously in batches. With dataset versioning enabled, a supplied id acts as an upsert key.

## Response `202`

Accepted - JSON processing started

## Other responses

- `400` — Bad Request

## Changes

- **2026-06-04** `7e2bdcbaba06` — 1 info
  - endpoint added
- **2026-05-04** `d606e84c75e4` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/private/datasets/items/from-json/post.md)

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/1a1bcfd67f99/schema)
