# Fork Evaluator Variant

Source: https://agenta.ai/docs/reference/api/fork-evaluator-variant

`POST /evaluators/variants/fork`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Fork an evaluator variant into a new variant.

Creates a new branch whose initial revision is copied from the
source. Use this to experiment without touching the original.
The returned variant has a fresh id and slug but inherits
lineage metadata from its source.

## Parameters

- `evaluator_variant_id` (in query, string (uuid))

## Request body schema

Content type: `application/json` (required)

- `evaluator_variant` (object, required): Config for the new variant (slug, name, description, flags).
  - `flags` (object, nullable)
    - `is_application` (boolean) Default: `false`.
    - `is_evaluator` (boolean) Default: `false`.
    - `is_snippet` (boolean) Default: `false`.
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `slug` (string, nullable)
- `evaluator_variant_ref` (object, required): Source variant to fork from.
  - `version` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
- `evaluator_revision_ref` (object, nullable): Pin the fork to this revision; defaults to the source variant's head.
  - `version` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)

## Response schemas

### 200: Successful Response

- `count` (integer): 1 when a variant is returned, 0 otherwise. Default: `0`.
- `evaluator_variant` (object, nullable): The evaluator variant, or null when none matched.
  - `evaluator_slug` (string, nullable)
  - `workflow_slug` (string, nullable)
  - `evaluator_id` (string (uuid), nullable)
  - `workflow_id` (string (uuid), nullable)
  - `artifact_slug` (string, nullable)
  - `artifact_id` (string (uuid), nullable)
  - `flags` (object, nullable)
    - `is_application` (boolean) Default: `false`.
    - `is_evaluator` (boolean) Default: `false`.
    - `is_snippet` (boolean) Default: `false`.
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
