Python
import requests
url = "https://app.langwatch.ai/api/v1/dataset/{slugOrId}/records"
payload = { "entries": [{}] }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({entries: [{}]})
};
fetch('https://app.langwatch.ai/api/v1/dataset/{slugOrId}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/dataset/{slugOrId}/records \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"entries": [
{}
]
}
'{
"data": [
{
"id": "<string>",
"datasetId": "<string>",
"projectId": "<string>",
"entry": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Datasets
Create records in a dataset in batch
Create records in a dataset in batch
POST
/
api
/
v1
/
dataset
/
{slugOrId}
/
records
Python
import requests
url = "https://app.langwatch.ai/api/v1/dataset/{slugOrId}/records"
payload = { "entries": [{}] }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({entries: [{}]})
};
fetch('https://app.langwatch.ai/api/v1/dataset/{slugOrId}/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/dataset/{slugOrId}/records \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"entries": [
{}
]
}
'{
"data": [
{
"id": "<string>",
"datasetId": "<string>",
"projectId": "<string>",
"entry": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
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.
Path Parameters
Body
application/json
Required array length:
1 - 4000 elementsShow child attributes
Show child attributes
Response
201 - application/json
Success
Show child attributes
Show child attributes
Last modified on October 12, 2026
Was this page helpful?