import requests
url = "https://app.langwatch.ai/api/experiments/runs/{runId}/results"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/experiments/runs/{runId}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/experiments/runs/{runId}/results \
--header 'X-Auth-Token: <api-key>'{
"experimentId": "<string>",
"runId": "<string>",
"projectId": "<string>",
"dataset": [
{
"index": 123,
"entry": {},
"targetId": "<string>",
"predicted": {},
"cost": 123,
"duration": 123,
"error": "<string>",
"domainError": {
"code": "<string>",
"kind": "<string>",
"message": "<string>",
"meta": {},
"httpStatus": 123,
"fault": "<string>",
"traceId": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
},
"traceId": "<string>"
}
],
"evaluations": [
{
"evaluator": "<string>",
"index": 123,
"name": "<string>",
"targetId": "<string>",
"score": 123,
"label": "<string>",
"passed": true,
"details": "<string>",
"cost": 123,
"duration": 123,
"inputs": {}
}
],
"timestamps": {
"createdAt": 123,
"updatedAt": 123,
"finishedAt": 123,
"stoppedAt": 123
},
"workflowVersionId": "<string>",
"progress": 123,
"total": 123,
"targets": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"promptId": "<string>",
"promptVersion": 123,
"agentId": "<string>",
"evaluatorId": "<string>",
"model": "<string>",
"metadata": {}
}
]
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}Read run results
Every dataset row of a run with what the target predicted, plus one entry per evaluator per row. Runs older than the status cache need experimentSlug as well, since a run id is only unique within its experiment.
import requests
url = "https://app.langwatch.ai/api/experiments/runs/{runId}/results"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/experiments/runs/{runId}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/experiments/runs/{runId}/results \
--header 'X-Auth-Token: <api-key>'{
"experimentId": "<string>",
"runId": "<string>",
"projectId": "<string>",
"dataset": [
{
"index": 123,
"entry": {},
"targetId": "<string>",
"predicted": {},
"cost": 123,
"duration": 123,
"error": "<string>",
"domainError": {
"code": "<string>",
"kind": "<string>",
"message": "<string>",
"meta": {},
"httpStatus": 123,
"fault": "<string>",
"traceId": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
},
"traceId": "<string>"
}
],
"evaluations": [
{
"evaluator": "<string>",
"index": 123,
"name": "<string>",
"targetId": "<string>",
"score": 123,
"label": "<string>",
"passed": true,
"details": "<string>",
"cost": 123,
"duration": 123,
"inputs": {}
}
],
"timestamps": {
"createdAt": 123,
"updatedAt": 123,
"finishedAt": 123,
"stoppedAt": 123
},
"workflowVersionId": "<string>",
"progress": 123,
"total": 123,
"targets": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"promptId": "<string>",
"promptVersion": 123,
"agentId": "<string>",
"evaluatorId": "<string>",
"model": "<string>",
"metadata": {}
}
]
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<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
Query Parameters
Owning experiment. Required once the run has aged out of the status cache.
Response
Rows and evaluations for the run
One row per dataset entry, with what the target predicted
Show child attributes
Show child attributes
One row per evaluator per dataset entry
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Resolves the targetId each dataset row and evaluation carries
Show child attributes
Show child attributes
Was this page helpful?