Skip to main content
POST
Python

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

202 - application/json

Success

id
string
required

The run id.

name
string | null
required

What the run was called, if anything.

sql
string
required

The statement, exactly as submitted.

parameters
object
required

The values the statement's parameters were filled with.

questions
object[]
required

One entry per eval function the statement projects, derived from it when the run was accepted.

limit
integer
required

Rows this run may judge.

status
enum<string>
required

Where the run is in its life.

Available options:
queued,
planning,
running,
finished,
failed,
cancelled
total
integer | null
required

Rows the run found, bounded by its limit. Null until it has looked.

progress
integer
required

Rows judged so far.

matched
integer | null
required

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.

matchedByQuestion
object
required

Per question: matches for a boolean question, judged rows for a score or a category one.

failed
integer
required

Rows the judge could not answer.

skipped
integer
required

Rows the judge declined to answer.

tokens
integer
required

Input tokens the judge billed for.

priceUsd
number
required

What the judging costs you, in United States dollars.

error
string | null
required

The code of the failure that ended the run, when one did.

createdAt
string
required

When the run was accepted.

updatedAt
string
required

When the run was last written to.

startedAt
string | null
required

When the run began reading rows.

finishedAt
string | null
required

When the run ended.

Last modified on September 19, 2026