Skip to main content
POST
Create a new metric

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for POST /metrics

name
string
required
Maximum string length: 200
type
enum<string>
required
Available options:
PYTHON,
LLM,
HUMAN,
COMPOSITE
criteria
string
required
Minimum string length: 1
description
string
default:""
return_type
enum<string>
default:float
Available options:
float,
boolean,
string,
categorical
enabled_in_prod
boolean
default:false
needs_ground_truth
boolean
default:false
sampling_percentage
number
default:10
Required range: 0 <= x <= 100
model_provider
string | null
model_name
string | null
scale
integer | null
threshold
object | null
categories
object[] | null
Minimum array length: 1
child_metrics
object[] | null
Minimum array length: 1
filters
object

Response

200 - application/json

Metric created successfully

Response for POST /metrics

inserted
boolean
required
metric_id
string
required
Minimum string length: 1