Skip to main content
PATCH
Update metric

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

Headers

Prefer
string

Send return=minimal to get no body back from a write and skip reading the resource: a create answers 201 with only Location, and an update answers 204.

Example:

"return=minimal"

Path Parameters

id
string
required

Metric ID. A revision ID answers 404; read a revision under /v2/revisions.

Minimum string length: 1
Example:

"metric_123"

Body

application/json
name
string
Example:

"Accuracy"

description
string | null
Example:

"Measures the accuracy of responses"

tags
string[]
Example:

Response

Metric updated successfully. The body is the resource as its GET answers it.

id
string
required

Metric ID.

Example:

"metric_123"

organizationId
string | null
required

The organization of the metric. Null for a Galtea metric.

Example:

"org_123"

userId
string | null
required
Example:

"user_123"

name
string
required

Metric name, unique in its organization.

Example:

"Accuracy"

description
string | null
required
Example:

"Measures the accuracy of responses"

tags
string[]
required
Example:
documentationUrl
string | null
required
Example:

"https://docs.example.com/metrics/accuracy"

source
enum<string> | null
required

Evaluation method for the metric. FULL_PROMPT is deprecated for creation — POST /metrics rejects it with a 400. Use PARTIAL_PROMPT for new AI Evaluation metrics. The value remains in the enum because existing FULL_PROMPT metrics are still returned by reads and filters. CLASSIFIER is the Classifier judge, accepted only where the deployment enables it.

Available options:
SELF_HOSTED,
FULL_PROMPT,
PARTIAL_PROMPT,
HUMAN_EVALUATION,
GEVAL,
DEEPEVAL,
DETERMINISTIC,
CLASSIFIER
Example:

"PARTIAL_PROMPT"

activeRevisionId
string | null
required
read-only

The revision that evaluations of this metric run. Null when no revision is active.

Example:

"revision_123"

createdAt
string<date-time>
required
disabledAt
string<date-time> | null
required
read-only

The metric's own disabled date. It ignores the evaluator model of each revision: read a revision for that.