Create Metric

Create a new metric.

Headers

AuthorizationstringRequired

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

Cartesia-Version"2025-04-16"Required

Request

This endpoint expects an object.
namestringRequired

The name of the metric. This must be a unique name that only allows lower case letters, numbers, and the characters _, -, and .

promptstringRequired
The prompt associated with the metric, detailing the task and evaluation criteria.
display_namestringOptional
The display name of the metric.

Response

This endpoint returns an object.
idstring
The unique identifier for the metric.
namestring
The name of the metric. This is a unique name that you can use to identify the metric in the CLI.
promptstring
The prompt associated with the metric, detailing the task and evaluation criteria.
created_atdatetime
The timestamp when the metric was created.
display_namestring or null
The display name of the metric, if available. This is the name that is displayed in the Playground.