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": 123,
"status": "queued",
"total": 123,
"progress": 123,
"matched": 123,
"matchedByQuestion": {},
"failed": 123,
"skipped": 123,
"tokens": 123,
"costUsd": 123,
"priceUsd": 123,
"error": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
}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": 123,
"status": "queued",
"total": 123,
"progress": 123,
"matched": 123,
"matchedByQuestion": {},
"failed": 123,
"skipped": 123,
"tokens": 123,
"costUsd": 123,
"priceUsd": 123,
"error": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<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.
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.
Where 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.
Rows judged so far.
Judgements 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.
Per 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.
Rows the judge declined to answer.
Input tokens the judge billed for.
What the judging cost us, in United States dollars.
What 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?