---
search:
  tags:
    - V1
    - POST
seo:
  description: >-
    Create an Agent judge (wire value prompt), a Code judge (wire value…
    Reference for the POST /v1/projects/{projectId}/judges endpoint in the
    Judgeval API.
sidebar:
  label: Create judge
  badge: POST
title: Create judge
type: openapi-operation
---
Create an Agent judge (wire value `prompt`), a Code judge (wire value `custom`), or a deterministic judge with categorical outputs and its initial production version. Deterministic judges require two outputs ordered match, then miss. This call fixes the judge type for its lifetime. Agent judges require prompt configuration; Code judges require a base64-encoded tar.gz bundle and Python entrypoint metadata.

`POST /v1/projects/{projectId}/judges`

**Request body** (`application/json`, required)

- `judge` (object, required)

Request body example:

```json
{
  "judge": {
    "name": "string",
    "judgeDescription": "string",
    "judgeType": "prompt",
    "initialVersion": {
      "actionConfig": {
        "action_groups": [
          {
            "id": "string",
            "name": "string",
            "enabled": true,
            "environment_names": [
              "string"
            ],
            "when": {
              "kind": "any"
            },
            "frequency": {
              "count": 1,
              "window_seconds": 1
            },
            "cooldown_seconds": 0,
            "actions": [
              {
                "id": "string",
                "enabled": true,
                "type": "webhook",
                "config": {
                  "url": "string",
                  "secret": "string"
                }
              }
            ]
          }
        ]
      },
      "scoreType": "categorical",
      "outputs": [
        {
          "name": "string",
          "description": "string"
        },
        {
          "name": "string",
          "description": "string"
        }
      ],
      "advancedSettings": {
        "online_environment_names": [
          "string"
        ],
        "online_evaluation_mode": "continuous",
        "online_sampling_rate": 0,
        "online_span_triggers": {},
        "online_session_scoring": true,
        "session_evaluation_count_enabled": true,
        "session_evaluation_idle_enabled": true,
        "session_evaluation_min_candidate_traces": 0,
        "session_evaluation_max_wait_minutes": 1
      }
    },
    "config": {
      "prompt": "string",
      "description": null,
      "reasoningLevel": "lite",
      "minScore": 0,
      "maxScore": 1
    }
  }
}
```

**Responses**

- `200` — Response for status 200

Response example, 200:

```json
{
  "judge_id": "string",
  "judge_version_id": "string",
  "implementation_id": "string"
}
```
