Datasets

Create dataset items from JSON file

Changed on

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.

post/v1/private/datasets/items/from-json

Request

  • Base URL
    http://localhost:5173/api
  • URL
    http://localhost:5173/api/v1/private/datasets/items/from-json
  • Auth
    none declared

Request body multipart/form-data

fileobject required
dataset_idstring uuid required
format'json' | 'jsonl' required

Response

Accepted - JSON processing started

Changes