---
title: "Create a criterion"
method: POST
path: "/v1/evals/criteria"
tags: ["Evals", "Criteria"]
---

# Create a criterion

`POST /v1/evals/criteria`

## Request

- Base URL: `https://api.lunary.ai`
- URL: `https://api.lunary.ai/v1/evals/criteria`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lunary/apis/lunary-api/docs/v1/evals/criteria/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `evalId` string, required
  - `name` string, required
  - `metric` string, required
  - `threshold` number, nullable
  - `weighting` number
  - `parameters` object

## Response `200`

Created criterion

---

[API](https://skmtc.dev/lunary/apis/lunary-api.md) - [All operations](https://skmtc.dev/lunary/apis/lunary-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lunary/apis/lunary-api/revisions/a38233713bdc?raw)
