Run an experiment
import requests
url = "https://app.langwatch.ai/api/v1/experiments/{slug}/run"
payload = {
"data": [{}],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [4503599627370495]
}
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({
data: [{}],
dataset_id: '<string>',
parameters: {},
row_indices: [4503599627370495]
})
};
fetch('https://app.langwatch.ai/api/v1/experiments/{slug}/run', 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/experiments/{slug}/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"data": [
{}
],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [
4503599627370495
]
}
'{
"runId": "<string>",
"status": "running",
"total": 123,
"runUrl": "<string>"
}This response has no body data.This response has no body data.This response has no body data.Experiments
Run an experiment
Start a run of a saved experiment, addressed by slug. Returns a runId to poll straight away. Send Accept: text/event-stream instead to stream progress events until the run finishes.
POST
/
api
/
v1
/
experiments
/
{slug}
/
run
Run an experiment
import requests
url = "https://app.langwatch.ai/api/v1/experiments/{slug}/run"
payload = {
"data": [{}],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [4503599627370495]
}
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({
data: [{}],
dataset_id: '<string>',
parameters: {},
row_indices: [4503599627370495]
})
};
fetch('https://app.langwatch.ai/api/v1/experiments/{slug}/run', 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/experiments/{slug}/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"data": [
{}
],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [
4503599627370495
]
}
'{
"runId": "<string>",
"status": "running",
"total": 123,
"runUrl": "<string>"
}This response has no body data.This response has no body data.This response has no body data.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
The experiment's slug, or its id
Minimum string length:
1Body
application/json
Last modified on October 12, 2026
Was this page helpful?