Sample a run
import requests
url = "https://app.langwatch.ai/api/v1/instant-evals/{id}/sample"
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/v1/instant-evals/{id}/sample', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/instant-evals/{id}/sample \
--header 'X-Auth-Token: <api-key>'{
"rows": [
{}
],
"judgments": [
{
"traceId": "<string>",
"questionId": "<string>",
"threadId": "<string>",
"spanId": "<string>",
"kind": "<string>",
"status": "judged",
"passed": true,
"score": 123,
"label": "<string>",
"probability": 123,
"probabilities": {},
"error": "<string>",
"occurredAt": "<string>"
}
]
}Instant Evals
Sample a run
Read a few of the run’s rows with the text that was judged beside the verdict it received. The text is re-read through the statement’s own extraction functions, so nothing is judged again and reading a sample is free.
GET
/
api
/
v1
/
instant-evals
/
{id}
/
sample
Sample a run
import requests
url = "https://app.langwatch.ai/api/v1/instant-evals/{id}/sample"
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/v1/instant-evals/{id}/sample', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/instant-evals/{id}/sample \
--header 'X-Auth-Token: <api-key>'{
"rows": [
{}
],
"judgments": [
{
"traceId": "<string>",
"questionId": "<string>",
"threadId": "<string>",
"spanId": "<string>",
"kind": "<string>",
"status": "judged",
"passed": true,
"score": 123,
"label": "<string>",
"probability": 123,
"probabilities": {},
"error": "<string>",
"occurredAt": "<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
The run id.
Minimum string length:
1Query Parameters
Rows to re-read, at most twenty five.
Required range:
1 <= x <= 25Last modified on September 19, 2026
Was this page helpful?