import requests
url = "https://app.langwatch.ai/api/v1/instant-evals/{id}/cancel"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/instant-evals/{id}/cancel', 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/instant-evals/{id}/cancel \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"name": "<string>",
"sql": "<string>",
"parameters": {},
"questions": [
{
"id": "<string>",
"function": "<string>",
"kind": "boolean",
"reads": "<string>",
"threshold": 123
}
],
"limit": 0,
"status": "queued",
"total": 0,
"progress": 0,
"matched": 0,
"matchedByQuestion": {},
"failed": 0,
"skipped": 0,
"tokens": 0,
"priceUsd": 123,
"error": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
}This response has no body data.{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}Cancel a run
Ask a run to stop. The run stops before its next page, so the pages it already judged keep their judgements and are still readable. A run that has already finished, failed or been cancelled answers 409 instant_eval_already_finished.
import requests
url = "https://app.langwatch.ai/api/v1/instant-evals/{id}/cancel"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/instant-evals/{id}/cancel', 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/instant-evals/{id}/cancel \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"name": "<string>",
"sql": "<string>",
"parameters": {},
"questions": [
{
"id": "<string>",
"function": "<string>",
"kind": "boolean",
"reads": "<string>",
"threshold": 123
}
],
"limit": 0,
"status": "queued",
"total": 0,
"progress": 0,
"matched": 0,
"matchedByQuestion": {},
"failed": 0,
"skipped": 0,
"tokens": 0,
"priceUsd": 123,
"error": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
}This response has no body data.{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}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.
1Response
Success
The run id.
What the run was called, if anything.
The statement, exactly as submitted.
The values the statement's parameters were filled with.
Show child attributes
Show child attributes
One entry per eval function the statement projects, derived from it when the run was accepted.
Show child attributes
Show child attributes
Rows this run may judge.
-9007199254740991 <= x <= 9007199254740991Where the run is in its life.
queued, planning, running, finished, failed, cancelled Rows the run found, bounded by its limit. Null until it has looked.
-9007199254740991 <= x <= 9007199254740991Rows judged so far.
-9007199254740991 <= x <= 9007199254740991Judgements that matched, across this run's boolean questions. Null when the run asked none: a score or a category question has no match to count.
-9007199254740991 <= x <= 9007199254740991Per question: matches for a boolean question, judged rows for a score or a category one.
Show child attributes
Show child attributes
Rows the judge could not answer.
-9007199254740991 <= x <= 9007199254740991Rows the judge declined to answer.
-9007199254740991 <= x <= 9007199254740991Input tokens the judge billed for.
-9007199254740991 <= x <= 9007199254740991What the judging costs you, in United States dollars.
The code of the failure that ended the run, when one did.
When the run was accepted.
When the run was last written to.
When the run began reading rows.
When the run ended.
Was this page helpful?