Skip to main content
POST
Generate or complete metric configuration with AI
You are reading the docs of Galtea 5.16. Read this page in the latest version.

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). Required

evaluationType
enum<string>

Completion mode - PARTIAL_PROMPT (binary LLM judge), HUMAN_EVALUATION (0-100 annotator guidelines) or CLASSIFIER (one Classifier question; 400 where not enabled)

Available options:
PARTIAL_PROMPT,
HUMAN_EVALUATION,
CLASSIFIER
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. For CLASSIFIER, config[0] is { classifierQuestion, evaluationParams, conditions, refused }; classifierQuestion is null when one question cannot cover every condition.

Generated metric configuration suggestion