Skip to main content
POST
Create evaluations from session

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Body

application/json
sessionId
string | null
Example:

"session_123"

inferenceResultId
string | null

The ID of the trace (one conversation turn) to evaluate

Example:

"ir_123"

metrics
object[]

Metrics to evaluate. Optional if specificationIds is provided or the product has specifications with linked metrics.

specificationIds
string[] | null

Specification IDs whose linked metrics will be evaluated. Can be combined with metrics; the API merges and deduplicates.

runId
string | null

Attribute this evaluation to a run you opened with POST /runs, and close that run yourself. Without it the API opens its own run and closes it when the launch finishes. A run the platform opened is refused.

Example:

"run_123"

Response

Evaluations created successfully

id
string
required
Example:

"eval_123"

metricId
string
required
Example:

"metric_123"

sessionId
string
required
Example:

"session_123"

productId
string | null
required
Example:

"product_123"

userId
string | null
required
Example:

"user_123"

status
enum<string>
required
Available options:
PENDING,
PENDING_HUMAN,
SUCCESS,
FAILED,
SKIPPED,
CANCELLED,
OUTDATED
Example:

"SUCCESS"

inferenceResultId
string | null
required
Example:

"ir_123"

score
number | null
required
Example:

0.95

reason
string | null
required
error
string | null
required
canRetry
boolean | null
required
creditsUsed
integer | null
required
conversationSimulatorVersion
string | null
required
humanEvaluatorId
string | null
required
humanEvaluatorStartedAt
string<date-time> | null
required
humanScore
number | null
required
humanReason
string | null
required
humanEvaluatorFinishedAt
string<date-time> | null
required
failedTurns
string[]
required
deletedAt
string<date-time> | null
required
evaluatedAt
string<date-time> | null
required
metricLegacyAt
string<date-time> | null
required
metricDisabledAt
string<date-time> | null
required
runId
string | null
required
metricExcludedFromAnalyticsAt
string<date-time> | null
required
metricExcludedByUserId
string | null
required
createdAt
string<date-time>