Skip to main content
POST
/
metrics
/
generate-config
Generate or complete metric configuration with AI
curl --request POST \
  --url https://api.galtea.ai/metrics/generate-config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "specificationIds": [
    "spec_123",
    "spec_456"
  ],
  "automaticCreation": false,
  "maxMetricsPerSpecification": 123,
  "isOnboarding": false,
  "name": "<string>",
  "description": "<string>",
  "tags": [
    "<string>"
  ],
  "productId": "<string>"
}
'
{}

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:
["spec_123", "spec_456"]
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