Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Accepts a bare id, id@version, or id@environment.

Body

application/json

Accepts two shapes. context names its fields after the template variables they feed and is the one to use; the flat fields below are the legacy body, folded into context when it is absent. Setting context wins.

context
object

The data to grade. When messages is present it is the conversation and input.user_query is ignored; output.response is appended only when the conversation carries no assistant turn. Mirrors graders-api buildGraderRequest.

model
string

Model to grade with, as a catalog id such as "openai/gpt-4o".

Only meaningful for a hub template of type llm_eval or ragas, which has no model of its own. A stored evaluator uses the model on its own definition and ignores this.

query
string

Latest user message. Folds into context.input.user_query.

output
string

The generated response from the model. Folds into context.output.response.

reference
string

The reference used to compare the output. Folds into context.input.expected_output.

retrievals
string[]

Knowledge base retrievals. Folds into context.input.retrievals.

messages
object[]

The conversation that produced the output. Folds into context.messages.

variables
object

Template variables for evaluator prompt substitution. Folds into context.variables.

Response

200 - application/json

OK

Response wrappers keep each RPC's response type distinct, so a future field can be added to one without touching the other.

result
object

The verdict. Shaped to match WorkflowRunMinifiedEvalSchema, the body the TypeScript route returned, so existing consumers read the same JSON.