---
title: "Create Metrics"
method: POST
path: "/v1/metrics"
tags: ["Metrics"]
---

# Create Metrics

`POST /v1/metrics`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/metrics`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/metrics/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new metric on your Confident AI project.

## Request body

- CreateMetric
  - `name` string, required: The name of the metric you're creating in your project.
  - `criteria` string: The criteria for this particular metric, that will be used to evaluate test cases later.
  - `evaluationSteps` string: An alternative to criteria, it is a list of steps to take to evaluate your test cases.
  - `evaluationParams` union: It is an array of the params that will be used to evaluate your test cases.
    - string[]
    - string[]
  - `multiTurn` boolean, required: This is true if your metric is used for evaluating multi-turn test cases.
  - `rubric` Rubric[]: A list of score ranges (0–10 inclusive). Must be in order and non-overlapping. Click here to [learn more](https://deepeval.com/docs/metrics-llm-evals#rubric)
    - `scoreRange` number[], required: An array consisting of the ranges of scores to generate.
    - `expectedOutcome` string, required: The expected outcome for your evaluation.

## Response `200`

- CreateMetricResponse
  - `success` boolean, required: This is true if the metric was created successfully.
  - `data` object, required: This maps to the id of the metric created.
    - `id` string, required: The id of the metric created
  - `deprecated` boolean, required: This is true if this metrics endpoint is deprecated.

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
