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

# Create Judge

> Create a new judge with detectors

## Authentication

* **API Key**: Organization API key in the `X-API-Key` header

## Request Body

<ParamField body="name" type="string" required>
  The name of the judge. Must be between 1-200 characters.
</ParamField>

<ParamField body="description" type="string" required>
  A description of what this judge evaluates. Must be between 1-2000 characters.
</ParamField>

<ParamField body="content_type" type="string" required>
  The type of content this judge will evaluate.

  **Allowed values:** `video`, `image`
</ParamField>

<ParamField body="detectors" type="array" required>
  An array of detector configurations. Must contain at least 1 detector.

  <Expandable title="Detector Configuration">
    <ParamField body="detector_name" type="string" required>
      The name of the detector. Must be a valid detector name.

      See [Detector Configuration Reference](/api-docs/api-reference/detectors/overview) for available detectors.
    </ParamField>

    <ParamField body="config" type="object" required>
      Configuration object for the detector. Required keys depend on the detector type.

      See [Detector Configuration Reference](/api-docs/api-reference/detectors/overview) for detector-specific configurations.
    </ParamField>
  </Expandable>
</ParamField>

## Request Example

### cURL

```bash theme={null}
curl -X POST "https://api.getpique.ai/v1/judges" \
  -H "X-API-Key: pk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Video Quality Judge",
    "description": "Evaluates video technical quality and content",
    "content_type": "video",
    "detectors": [
      {
        "detector_name": "video_specs",
        "config": {
          "min_width": 1920,
          "min_height": 1080,
          "min_duration_sec": 15,
          "max_duration_sec": 60,
          "min_fps": 24
        }
      },
      {
        "detector_name": "audio_noise",
        "config": {}
      },
      {
        "detector_name": "pronunciation",
        "config": {
          "brand_name": "pique",
          "brand_cue": "pronounced like peak"
        }
      }
    ]
  }'
```

### JSON Body

```json theme={null}
{
  "name": "Video Quality Judge",
  "description": "Evaluates video technical quality and content",
  "content_type": "video",
  "detectors": [
    {
      "detector_name": "video_specs",
      "config": {
        "min_width": 1920,
        "min_height": 1080,
        "min_duration_sec": 15,
        "max_duration_sec": 60,
        "min_fps": 24
      }
    },
    {
      "detector_name": "audio_noise",
      "config": {}
    },
    {
      "detector_name": "pronunciation",
      "config": {
        "brand_name": "pique",
        "brand_cue": "pronounced like peak"
      }
    }
  ]
}
```

## Example with Reference Content

For detectors that require reference content (like `video_matching`), first upload the reference content:

1. Upload reference content using `/v1/judges/reference_content`
2. Use the returned `reference_content_uri` in the detector config:

```json theme={null}
{
  "name": "Content Matching Judge",
  "description": "Matches videos against reference content",
  "content_type": "video",
  "detectors": [
    {
      "detector_name": "video_matching",
      "config": {
        "reference_videos": [
          "gs://judge-artifacts/org_123/reference_uploads/abc/reference.mp4"
        ]
      }
    },
    {
      "detector_name": "audio_matching",
      "config": {
        "reference_audio": "gs://judge-artifacts/org_123/reference_uploads/def/audio.mp3"
      }
    }
  ]
}
```

## Response

<ResponseField name="id" type="string">
  The unique identifier of the created judge
</ResponseField>

<ResponseField name="status" type="string">
  The current status of the judge

  **Possible values:**

  * `pending` - Judge is being prepared (reference content preprocessing)
  * `ready` - Judge is ready to use
  * `failed` - Judge creation failed
</ResponseField>

## Response Example

```json theme={null}
{
  "id": "judge_abc123",
  "status": "ready"
}
```

**Note:** If the judge includes detectors that require preprocessing (like `video_matching`, `podcast_video_matching`, or `audio_matching`), the status will be `pending` until preprocessing completes.

## Error Responses

### 400 Bad Request

Invalid request body or validation errors

### 401 Unauthorized

Missing or invalid authentication

### 403 Forbidden

Insufficient permissions

### 500 Internal Server Error

Failed to create judge due to server error
