> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Metric

> Create a new metric.



## OpenAPI

````yaml /latest.yml POST /agents/metrics
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/metrics:
    post:
      tags:
        - Agents
      summary: Create Metric
      description: Create a new metric.
      operationId: agents_create-metric
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMetricRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metric'
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    CreateMetricRequest:
      title: CreateMetricRequest
      type: object
      properties:
        name:
          type: string
          description: >-
            The name of the metric. This must be a unique name that only allows
            lower case letters, numbers, and the characters _, -, and .
        display_name:
          type: string
          nullable: true
          description: The display name of the metric.
        prompt:
          type: string
          description: >-
            The prompt associated with the metric, detailing the task and
            evaluation criteria.
      required:
        - name
        - prompt
    Metric:
      title: Metric
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the metric.
        name:
          type: string
          description: >-
            The name of the metric. This is a unique name that you can use to
            identify the metric in the CLI.
        display_name:
          type: string
          nullable: true
          description: >-
            The display name of the metric, if available. This is the name that
            is displayed in the Playground.
        prompt:
          type: string
          description: >-
            The prompt associated with the metric, detailing the task and
            evaluation criteria.
        created_at:
          type: string
          format: date-time
          description: The timestamp when the metric was created.
      required:
        - id
        - name
        - prompt
        - created_at
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````