Skip to main content
POST
Generate or complete metric configuration with AI

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
specificationIds
string[]

Spec mode - IDs of the specifications to generate metrics for. Completion mode - at most one id used as context.

Example:
automaticCreation
boolean

Spec mode only - when true, creates metrics from generated config

Example:

false

maxMetricsPerSpecification
integer

Spec mode only - maximum number of metrics to generate per specification

isOnboarding
boolean

Spec mode only - whether this is an onboarding flow

Example:

false

name
string

Completion mode - the user-authored metric name (source of truth)

description
string

Completion mode - the user-authored metric description (the criteria to evaluate)

evaluationType
enum<string>

Completion mode - PARTIAL_PROMPT (binary LLM judge) or HUMAN_EVALUATION (0-100 annotator guidelines)

Available options:
PARTIAL_PROMPT,
HUMAN_EVALUATION
tags
string[]

Completion mode - user-provided tags (source of truth, optional)

productId
string

Completion mode - optional product id for additional context

Response

Metric configuration generated successfully

Generated metric configuration suggestion