POST
/
v1
/
metrics
{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "success",
  "metric_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

A request to create a new metric.

name
string
required

The name of the metric. Metric names must contain only lowercase letters, numbers, hyphens, or underscores, and must start with a lowercase letter and end with either a lowercase letter or number. Metric names must be unique within a project.

Example:

"my_metric"

metric_type
enum<string>
required

The type of metric.

Available options:
binary,
likert_1_to_5
description
string | null

An optional description of the metric.

Example:

"An example metric demonstrating functionality."

required_fields
enum<string>[]

The fields that are required for the metric. All metrics must require at least model_input and model_output, which are the default values.

An enum for the fields that can be used as inputs to an Atla evaluator.

Available options:
model_input,
model_output,
model_context,
expected_model_output
Example:
[
  "model_input",
  "model_output",
  "model_context",
  "expected_model_output"
]

Response

201
application/json
Successful Response

A response containing the ID of the created metric.

request_id
string
required

The ID of the request the response is for.

Example:

"123e4567-e89b-12d3-a456-426614174000"

metric_id
string
required

The ID of the created metric.

status
string
default:success
Allowed value: "success"