import requests
url = "https://app.langwatch.ai/api/workflows/{id}/evaluate"
payload = {
"version_id": "<string>",
"data": [{}],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [1]
}
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({
version_id: '<string>',
data: [{}],
dataset_id: '<string>',
parameters: {},
row_indices: [1]
})
};
fetch('https://app.langwatch.ai/api/workflows/{id}/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/workflows/{id}/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"version_id": "<string>",
"data": [
{}
],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [
1
]
}
'{
"run_id": "<string>",
"run_url": "<string>",
"workflow_version_id": "<string>",
"version": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Create Evaluate
Trigger an evaluation run of a workflow’s committed version through the evaluations pipeline. Evaluate the workflow’s attached dataset, inline data, or a platform dataset id; parameters bind as constant entry inputs on every row. Returns a run id and a results URL to poll or open in the browser.
import requests
url = "https://app.langwatch.ai/api/workflows/{id}/evaluate"
payload = {
"version_id": "<string>",
"data": [{}],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [1]
}
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({
version_id: '<string>',
data: [{}],
dataset_id: '<string>',
parameters: {},
row_indices: [1]
})
};
fetch('https://app.langwatch.ai/api/workflows/{id}/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/workflows/{id}/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"version_id": "<string>",
"data": [
{}
],
"dataset_id": "<string>",
"parameters": {},
"row_indices": [
1
]
}
'{
"run_id": "<string>",
"run_url": "<string>",
"workflow_version_id": "<string>",
"version": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}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
Committed version to evaluate; defaults to the latest commit
Inline rows to evaluate instead of the workflow's attached dataset
Show child attributes
Show child attributes
Platform dataset id to evaluate; mutually exclusive with data
Constant entry inputs applied to every row, e.g. a feature flag or PR number
Show child attributes
Show child attributes
Subset of dataset row indices to evaluate
x >= 0Was this page helpful?