Report batch evaluation results
import requests
url = "https://app.langwatch.ai/api/evaluations/batch/log_results"
payload = {
"run_id": "<string>",
"name": "<string>"
}
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({run_id: '<string>', name: '<string>'})
};
fetch('https://app.langwatch.ai/api/evaluations/batch/log_results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/evaluations/batch/log_results \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"run_id": "<string>",
"name": "<string>"
}
'{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"error": "<string>",
"kind": "<string>",
"meta": {}
}{
"error": "<string>",
"kind": "<string>",
"meta": {}
}Evaluations
Report batch evaluation results
Report the rows of a batch evaluation against an experiment, so its scores and progress show up in the app. This is the second half of an SDK batch evaluation: create the experiment with POST /api/experiment/init, then post rows here as they finish. Identify the experiment by either experiment_id or experiment_slug. Bodies up to 20MB are accepted.
POST
/
api
/
evaluations
/
batch
/
log_results
Report batch evaluation results
import requests
url = "https://app.langwatch.ai/api/evaluations/batch/log_results"
payload = {
"run_id": "<string>",
"name": "<string>"
}
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({run_id: '<string>', name: '<string>'})
};
fetch('https://app.langwatch.ai/api/evaluations/batch/log_results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/evaluations/batch/log_results \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"run_id": "<string>",
"name": "<string>"
}
'{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"error": "<string>",
"kind": "<string>",
"meta": {}
}{
"error": "<string>",
"kind": "<string>",
"meta": {}
}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.
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
The rows were recorded
Human-readable confirmation
Was this page helpful?
⌘I