Skip to main content
POST
Create Metric

Authorizations

Authorization
string
header
default:$CARTESIA_API_KEY
required

Cartesia API key (sk_car_...). Get one at play.cartesia.ai/keys.

Headers

Cartesia-Version
enum<string>
default:2026-03-01
required

API version header.

Available options:
2026-03-01
Example:

"2026-03-01"

Body

application/json
name
string
required

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

prompt
string
required

The prompt associated with the metric, detailing the task and evaluation criteria.

display_name
string | null

The display name of the metric.

Response

200 - application/json
id
string
required

The unique identifier for the metric.

name
string
required

The name of the metric. This is a unique name that you can use to identify the metric in the CLI.

prompt
string
required

The prompt associated with the metric, detailing the task and evaluation criteria.

created_at
string<date-time>
required

The timestamp when the metric was created.

display_name
string | null

The display name of the metric, if available. This is the name that is displayed in the Playground.