Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Create automation rule evaluator

POST/v1/private/automations/evaluatorsCreate automation rule evaluator

Create automation rule evaluator

Request body

application/json
objectAutomationRuleEvaluator_Write
actionstringrequired

one of "evaluator", "annotation_queue_router"

enabledboolean
namestringrequired

maxLength 150 · minLength 0

project_idstring · uuid

Primary project ID (legacy field for backwards compatibility)

project_idsarray of string · uuid

Project IDs for write operations (used when creating/updating rules)

uniqueItems true

Show child attributes

uniqueItems true

sampling_ratenumber · float

Fraction of production (SDK-logged) items this rule scores, from 0 to 1. Trace rules ignore this value for experiment, playground and optimization traces and score them in full; span and thread rules only ever evaluate SDK-logged data.

maximum 1 · minimum 0

trigger_scopestring

Controls whether the rule fires on production traces, experiment traces, or both. Defaults to 'production' if omitted.

one of "production", "experiment", "both"

typestringrequired

one of "llm_as_judge", "user_defined_metric_python", "trace_thread_llm_as_judge", "trace_thread_user_defined_metric_python", "span_llm_as_judge", "span_user_defined_metric_python"

Example request
{
  "action": "annotation_queue_router",
  "enabled": true,
  "name": "string",
  "project_id": "00000000-0000-0000-0000-000000000000",
  "project_ids": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "sampling_rate": 0,
  "trigger_scope": "both",
  "type": "llm_as_judge"
}

Responses

201Created

Headers

Location
Documentation menu