import requests
url = "https://app.langwatch.ai/api/v1/instant-evals/estimate"
payload = { "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({name: '<string>'})
};
fetch('https://app.langwatch.ai/api/v1/instant-evals/estimate', 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/estimate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>"
}
'{
"rows": 123,
"isRowsCapped": true,
"avgTokens": 123,
"totalTokens": 123,
"requests": 123,
"priceUsd": 123,
"freeBudgetRemainingUsd": 123
}Estimate a run
Price a run without starting it. The rows are counted, a sample of their texts is measured, and the cost is worked out from that. Nothing is judged and nothing is charged. Takes the same body a run does, a statement or a target with questions.
import requests
url = "https://app.langwatch.ai/api/v1/instant-evals/estimate"
payload = { "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({name: '<string>'})
};
fetch('https://app.langwatch.ai/api/v1/instant-evals/estimate', 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/estimate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>"
}
'{
"rows": 123,
"isRowsCapped": true,
"avgTokens": 123,
"totalTokens": 123,
"requests": 123,
"priceUsd": 123,
"freeBudgetRemainingUsd": 123
}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
The LangWatchQL statement to judge. It must project TraceId and at least one eval function column. Send this or target, never both.
1 - 50000Values for the parameters the statement declares.
Show child attributes
Show child attributes
What one judged row is, in place of a statement: a trace, a conversation, or one model call. The statement is written for you from this and the questions, and handed back on the run so you can edit it and resubmit.
traces, threads, llm_spans With target: a trace filter, in the language the trace explorer's search bar speaks, narrowing which rows are judged.
4000With target: the oldest instant to judge, as an ISO 8601 timestamp. Defaults to seven days ago.
With target: the newest instant to judge. Defaults to now.
With target: what to ask of each row. One classification asks them all, which is why a three-question run costs about what a one-question run does.
Show child attributes
Show child attributes
What to call the run. Yours to choose.
1 - 200Rows the run may judge. Ten thousand by default on every plan, up to one hundred thousand on a plan that lifts the cap.
x <= 100000Response
Success
Rows the statement matches, bounded by the run's limit.
Whether the statement matches more rows than the run may judge.
Input tokens one judged row sends, measured from a sample.
Input tokens the whole run would send.
Classifications the run would make, one per judged row.
What the run would cost you, in United States dollars.
What is left of the free Instant Evals budget, in United States dollars. Only present for an organization without a paid plan.
Was this page helpful?