Skip to main content
POST
Estimate a run

Authorizations

X-Auth-Token
string
header
required

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

application/json
sql
string

The LangWatchQL statement to judge. It must project TraceId and at least one eval function column. Send this or target, never both.

Required string length: 1 - 50000
parameters
object

Values for the parameters the statement declares.

target
enum<string>

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.

Available options:
traces,
threads,
llm_spans
filter
string

With target: a trace filter, in the language the trace explorer's search bar speaks, narrowing which rows are judged.

Maximum string length: 4000
start
string<date-time>

With target: the oldest instant to judge, as an ISO 8601 timestamp. Defaults to seven days ago.

end
string<date-time>

With target: the newest instant to judge. Defaults to now.

questions
object[]

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.

name
string

What to call the run. Yours to choose.

Required string length: 1 - 200
limit
integer

Rows the run may judge. Ten thousand by default on every plan, up to one hundred thousand on a plan that lifts the cap.

Required range: x <= 100000

Response

200 - application/json

Success

rows
integer
required

Rows the statement matches, bounded by the run's limit.

isRowsCapped
boolean
required

Whether the statement matches more rows than the run may judge.

avgTokens
integer
required

Input tokens one judged row sends, measured from a sample.

totalTokens
integer
required

Input tokens the whole run would send.

requests
integer
required

Classifications the run would make, one per judged row.

priceUsd
number
required

What the run would cost you, in United States dollars.

freeBudgetRemainingUsd
number

What is left of the free Instant Evals budget, in United States dollars. Only present for an organization without a paid plan.

Last modified on September 19, 2026