Skip to contentSkip to page list

Docs

Create a new dataset

Create a new dataset, optionally with its first rows in entries, written in the same call.

POST/api/v1/dataset
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/dataset"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {}​response = requests.post(    origin + path,    headers=headers,    json=payload,)print(response.json())

Success

application/json · Generated from schema

{  "id": "string",  "name": "string",  "slug": "string",  "columnTypes": [    {      "name": "string",      "type": "string"    }  ],  "createdAt": "2026-01-01T00:00:00Z",  "updatedAt": "2026-01-01T00:00:00Z",  "platformUrl": "string"}
api-reference/datasets/create-dataset

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Request body

application/json · Required

namestringrequired
At least 1 character
columnTypesobject[]
namestringrequired
typestringrequired
One of"string""boolean""number""date""list""json""spans""rag_contexts""chat_messages""annotations""evaluations""image""file"
Default: []
entriesobject[]

The dataset's first rows, written with it in one call. Each key must be a column in columnTypes.

idstring

Leave it out: record ids are unique across projects, so the platform picks them.

At least 1 character

Responses

201

Success

application/json

idstringrequired
namestringrequired
slugstringrequired
columnTypesobject[]required
namestringrequired
At least 1 character
typestringrequired
One of"string""boolean""number""date""list""json""spans""rag_contexts""chat_messages""annotations""evaluations""image""file"
createdAtstring (date-time)required
updatedAtstring (date-time)required
platformUrlstringrequired

Documentation