REST API Objects

This page documents all the public data types and response models used by the REST API methods. These objects represent the data structures returned by REST API calls and used as parameters.

The types are automatically generated from the REST API definition and include classes for resources, page objects for pagination, filter objects for queries, and various utility types.

Note

These are the raw REST API data types. For the main SDK objects like Dataset, Experiment, etc., see the main Opik documentation and the Objects section in the main documentation.

class opik.rest_api.types.Agent(*, name: str | None = None, description: str | None = None, language: str | None = None, executable: str | None = None, source_file: str | None = None, params: List[Param] | None = None, timeout: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
description: str | None
language: str | None
executable: str | None
source_file: str | None
params: List[Param] | None
timeout: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentBlueprintHistory(*, id: str | None = None, name: str | None = None, type: Literal['blueprint', 'mask'] | Any, description: str | None = None, envs: List[str] | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, values: List[AgentConfigValueHistory], **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
type: Literal['blueprint', 'mask'] | Any
description: str | None
envs: List[str] | None
created_by: str | None
created_at: datetime | None
last_updated_by: str | None
last_updated_at: datetime | None
values: List[AgentConfigValueHistory]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentBlueprintPublic(*, id: str | None = None, name: str | None = None, type: Literal['blueprint', 'mask'] | Any, description: str | None = None, envs: List[str] | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, values: List[AgentConfigValuePublic], **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
type: Literal['blueprint', 'mask'] | Any
description: str | None
envs: List[str] | None
created_by: str | None
created_at: datetime | None
last_updated_by: str | None
last_updated_at: datetime | None
values: List[AgentConfigValuePublic]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentBlueprintWrite(*, id: str | None = None, type: Literal['blueprint', 'mask'] | Any, description: str | None = None, values: List[AgentConfigValueWrite], **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
type: Literal['blueprint', 'mask'] | Any
description: str | None
values: List[AgentConfigValueWrite]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentConfigCreateWrite(*, project_id: str | None = None, project_name: str | None = None, id: str | None = None, blueprint: AgentBlueprintWrite, **extra_data: Any)

Bases: UniversalBaseModel

project_id: str | None

Project ID. Either project_id or project_name must be provided

project_name: str | None

Project name. Either project_id or project_name must be provided

id: str | None

Agent config ID. Generated automatically if not provided

blueprint: AgentBlueprintWrite
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentConfigEnv(*, id: str | None = None, project_id: str | None = None, env_name: str, blueprint_id: str, created_by: str | None = None, created_at: datetime | None = None, ended_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_id: str | None
env_name: str
blueprint_id: str
created_by: str | None
created_at: datetime | None
ended_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentConfigValueHistory(*, key: str, value: str | None = None, type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any, description: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

key: str
value: str | None
type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any
description: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentConfigValuePublic(*, key: str, value: str | None = None, type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any, description: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

key: str
value: str | None
type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any
description: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentConfigValueWrite(*, key: str, value: str | None = None, type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any, description: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

key: str
value: str | None
type: Literal['string', 'integer', 'float', 'boolean', 'prompt', 'prompt_commit'] | Any
description: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentInsightsIssue(*, id: str | None = None, name: str | None = None, description: str | None = None, cause: str | None = None, suggested_fix: str | None = None, status: Literal['open', 'resolved', 'closed'] | Any | None = None, severity: Literal['critical', 'high', 'medium', 'low'] | Any | None = None, traces_query: str | None = None, total_occurrences: int | None = None, latest_count: int | None = None, total: int | None = None, users_impacted: int | None = None, total_users: int | None = None, first_seen: date | None = None, last_seen: date | None = None, days_reported: int | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
description: str | None
cause: str | None
suggested_fix: str | None
status: Literal['open', 'resolved', 'closed'] | Any | None
severity: Literal['critical', 'high', 'medium', 'low'] | Any | None
traces_query: str | None
total_occurrences: int | None

SUM(count) over the requested window

latest_count: int | None

Occurrences on the latest report day in the window only. The issue’s description/cause narrate that most recent run, so this is the count consistent with them; totalOccurrences instead sums every day in the window.

total: int | None

SUM(total_count) over the requested window

users_impacted: int | None

SUM(users_impacted) over the requested window

total_users: int | None

SUM(total_users) over the requested window

first_seen: date | None

MIN(report_day) in the requested window

last_seen: date | None

MAX(report_day) in the requested window

days_reported: int | None

COUNT(DISTINCT report_day) in the requested window

created_by: str | None
created_at: datetime | None
last_updated_by: str | None
last_updated_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentInsightsIssueDetail(*, report_day: date | None = None, count: int | None = None, total_count: int | None = None, users_impacted: int | None = None, total_users: int | None = None, metadata: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Per-day breakdown within the requested window, ordered by report_day ascending

report_day: date | None
count: int | None
total_count: int | None
users_impacted: int | None
total_users: int | None
metadata: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentInsightsIssuePage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AgentInsightsIssue] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[AgentInsightsIssue] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentInsightsIssueWithDetails(*, id: str | None = None, name: str | None = None, description: str | None = None, cause: str | None = None, suggested_fix: str | None = None, status: Literal['open', 'resolved', 'closed'] | Any | None = None, severity: Literal['critical', 'high', 'medium', 'low'] | Any | None = None, traces_query: str | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, details: List[AgentInsightsIssueDetail] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
description: str | None
cause: str | None
suggested_fix: str | None
status: Literal['open', 'resolved', 'closed'] | Any | None
severity: Literal['critical', 'high', 'medium', 'low'] | Any | None
traces_query: str | None
created_by: str | None
created_at: datetime | None
last_updated_by: str | None
last_updated_at: datetime | None
details: List[AgentInsightsIssueDetail] | None

Per-day breakdown within the requested window, ordered by report_day ascending

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AgentInsightsJob(*, id: str | None = None, project_id: str | None = None, status: Literal['enabled', 'disabled'] | Any | None = None, last_scan_at: datetime | None = None, last_failure_reason: str | None = None, last_failure_detail: str | None = None, last_failed_at: datetime | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_id: str | None
status: Literal['enabled', 'disabled'] | Any | None
last_scan_at: datetime | None
last_failure_reason: str | None
last_failure_detail: str | None
last_failed_at: datetime | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AggregationData(*, experiment_count: int | None = None, trace_count: int | None = None, total_estimated_cost: float | None = None, total_estimated_cost_avg: float | None = None, duration: PercentageValues | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, experiment_scores: List[FeedbackScoreAverage] | None = None, pass_rate_avg: float | None = None, passed_count_sum: int | None = None, total_count_sum: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

experiment_count: int | None
trace_count: int | None
total_estimated_cost: float | None
total_estimated_cost_avg: float | None
duration: PercentageValues | None
feedback_scores: List[FeedbackScoreAverage] | None
experiment_scores: List[FeedbackScoreAverage] | None
pass_rate_avg: float | None
passed_count_sum: int | None
total_count_sum: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Alert(*, id: str | None = None, name: str | None = None, enabled: bool | None = None, alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None = None, metadata: Dict[str, str] | None = None, webhook: Webhook, triggers: List[AlertTrigger] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, project_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
enabled: bool | None
alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None
metadata: Dict[str, str] | None
webhook: Webhook
triggers: List[AlertTrigger] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
project_id: str | None

project trigger config will result in an error.

Type:

Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a ‘scope

Type:

project’ trigger config — the system will create it automatically from this field. Sending both project_id and a scope

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AlertPublic] | None = None, sortable_by: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[AlertPublic] | None
sortable_by: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertPublic(*, id: str | None = None, name: str | None = None, enabled: bool | None = None, alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None = None, metadata: Dict[str, str] | None = None, webhook: WebhookPublic, triggers: List[AlertTriggerPublic] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, project_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
enabled: bool | None
alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None
metadata: Dict[str, str] | None
webhook: WebhookPublic
triggers: List[AlertTriggerPublic] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
project_id: str | None

project trigger config will result in an error.

Type:

Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a ‘scope

Type:

project’ trigger config — the system will create it automatically from this field. Sending both project_id and a scope

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertTrigger(*, id: str | None = None, alert_id: str | None = None, event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any, trigger_configs: List[AlertTriggerConfig] | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
alert_id: str | None
event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any
trigger_configs: List[AlertTriggerConfig] | None
created_at: datetime | None
created_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertTriggerConfig(*, id: str | None = None, alert_trigger_id: str | None = None, type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any, config_value: Dict[str, str] | None = None, group_index: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
alert_trigger_id: str | None
type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any
config_value: Dict[str, str] | None
group_index: int | None

project configs.

Type:

Groups configs within a trigger

Type:

same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope

created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertTriggerConfigPublic(*, id: str | None = None, alert_trigger_id: str | None = None, type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any, config_value: Dict[str, str] | None = None, group_index: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
alert_trigger_id: str | None
type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any
config_value: Dict[str, str] | None
group_index: int | None

project configs.

Type:

Groups configs within a trigger

Type:

same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope

created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertTriggerConfigWrite(*, id: str | None = None, type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any, config_value: Dict[str, str] | None = None, group_index: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
type: Literal['scope:project', 'threshold:feedback_score', 'threshold:cost', 'threshold:latency', 'threshold:errors', 'filter:guardrail_type'] | Any
config_value: Dict[str, str] | None
group_index: int | None

project configs.

Type:

Groups configs within a trigger

Type:

same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertTriggerPublic(*, id: str | None = None, alert_id: str | None = None, event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any, trigger_configs: List[AlertTriggerConfigPublic] | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
alert_id: str | None
event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any
trigger_configs: List[AlertTriggerConfigPublic] | None
created_at: datetime | None
created_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertTriggerWrite(*, id: str | None = None, event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any, trigger_configs: List[AlertTriggerConfigWrite] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
event_type: Literal['trace:errors', 'trace:feedback_score', 'trace_thread:feedback_score', 'prompt:created', 'prompt:committed', 'trace:guardrails_triggered', 'prompt:deleted', 'experiment:finished', 'trace:cost', 'trace:latency'] | Any
trigger_configs: List[AlertTriggerConfigWrite] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AlertWrite(*, id: str | None = None, name: str | None = None, enabled: bool | None = None, alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None = None, metadata: Dict[str, str] | None = None, webhook: WebhookWrite, triggers: List[AlertTriggerWrite] | None = None, project_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
enabled: bool | None
alert_type: Literal['general', 'slack', 'pagerduty'] | Any | None
metadata: Dict[str, str] | None
webhook: WebhookWrite
triggers: List[AlertTriggerWrite] | None
project_id: str | None

project trigger config will result in an error.

Type:

Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a ‘scope

Type:

project’ trigger config — the system will create it automatically from this field. Sending both project_id and a scope

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnalyticsQueryResponse(*, results: List[Dict[str, Any | None]] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

results: List[Dict[str, Any | None]] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueue(*, id: str | None = None, project_id: str, project_name: str | None = None, name: str, description: str | None = None, instructions: str | None = None, scope: Literal['trace', 'thread'] | Any, comments_enabled: bool | None = None, feedback_definition_names: List[str] | None = None, annotators_per_item: int | None = None, lock_timeout_seconds: int | None = None, reviewers: List[AnnotationQueueReviewer] | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, items_count: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

List of annotation queues to create

id: str | None
project_id: str
project_name: str | None
name: str
description: str | None
instructions: str | None
scope: Literal['trace', 'thread'] | Any
comments_enabled: bool | None
feedback_definition_names: List[str] | None
annotators_per_item: int | None
lock_timeout_seconds: int | None
reviewers: List[AnnotationQueueReviewer] | None
feedback_scores: List[FeedbackScoreAverage] | None
items_count: int | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueueBatch(*, annotation_queues: List[AnnotationQueue], **extra_data: Any)

Bases: UniversalBaseModel

Batch of annotation queues to create

annotation_queues: List[AnnotationQueue]

List of annotation queues to create

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueueItemIds(*, ids: List[str], **extra_data: Any)

Bases: UniversalBaseModel

ids: List[str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueuePagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AnnotationQueuePublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f292516f0b0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[AnnotationQueuePublic] | None
sortable_by: FieldMetadata object at 0x7f292516f0b0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueuePublic(*, id: str | None = None, project_id: str, project_name: str | None = None, name: str, description: str | None = None, instructions: str | None = None, scope: Literal['trace', 'thread'] | Any, comments_enabled: bool | None = None, feedback_definition_names: List[str] | None = None, annotators_per_item: int | None = None, lock_timeout_seconds: int | None = None, reviewers: List[AnnotationQueueReviewerPublic] | None = None, feedback_scores: List[FeedbackScoreAveragePublic] | None = None, items_count: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_id: str
project_name: str | None
name: str
description: str | None
instructions: str | None
scope: Literal['trace', 'thread'] | Any
comments_enabled: bool | None
feedback_definition_names: List[str] | None
annotators_per_item: int | None
lock_timeout_seconds: int | None
reviewers: List[AnnotationQueueReviewerPublic] | None
feedback_scores: List[FeedbackScoreAveragePublic] | None
items_count: int | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueueReviewer(*, username: str | None = None, status: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

username: str | None
status: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueueReviewerPublic(*, username: str | None = None, status: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

username: str | None
status: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AnnotationQueueWrite(*, id: str | None = None, project_id: str, name: str, description: str | None = None, instructions: str | None = None, scope: Literal['trace', 'thread'] | Any, comments_enabled: bool | None = None, feedback_definition_names: List[str] | None = None, annotators_per_item: int | None = None, lock_timeout_seconds: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

List of annotation queues to create

id: str | None
project_id: str
name: str
description: str | None
instructions: str | None
scope: Literal['trace', 'thread'] | Any
comments_enabled: bool | None
feedback_definition_names: List[str] | None
annotators_per_item: int | None
lock_timeout_seconds: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AssertionResult(*, value: str | None = None, passed: bool | None = None, reason: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: str | None
passed: bool | None
reason: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AssertionResultBatchItem(*, entity_id: str, project_name: str | None = None, project_id: str | None = None, name: str, status: Literal['passed', 'failed'] | Any, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, **extra_data: Any)

Bases: UniversalBaseModel

entity_id: str
project_name: str | None

If null, the default project is used

project_id: str | None
name: str
status: Literal['passed', 'failed'] | Any
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AssertionResultCompare(*, value: str | None = None, passed: bool | None = None, reason: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: str | None
passed: bool | None
reason: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AssertionScoreAverage(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

Per-assertion average pass rates for test suite experiments. Null for regular experiments.

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AssertionScoreAveragePublic(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

Per-assertion average pass rates for test suite experiments. Null for regular experiments.

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AssistantMessage(*, role: Literal['system', 'user', 'assistant', 'tool', 'function'] | Any | None = None, content: str | None = None, reasoning_content: str | None = None, name: str | None = None, tool_calls: List[ToolCall] | None = None, refusal: str | None = None, function_call: FunctionCall | None = None, **extra_data: Any)

Bases: UniversalBaseModel

role: Literal['system', 'user', 'assistant', 'tool', 'function'] | Any | None
content: str | None
reasoning_content: str | None
name: str | None
tool_calls: List[ToolCall] | None
refusal: str | None
function_call: FunctionCall | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Attachment(*, link: str | None = None, file_name: str, file_size: int, mime_type: str, **extra_data: Any)

Bases: UniversalBaseModel

file_name: str
file_size: int
mime_type: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AttachmentPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[Attachment] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2925ab9280>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[Attachment] | None
sortable_by: FieldMetadata object at 0x7f2925ab9280>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AudioUrl(*, url: str, **extra_data: Any)

Bases: UniversalBaseModel

url: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AudioUrlPublic(*, url: str, **extra_data: Any)

Bases: UniversalBaseModel

url: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AudioUrlWrite(*, url: str, **extra_data: Any)

Bases: UniversalBaseModel

url: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AuthorizationServerMetadata(*, issuer: str | None = None, authorization_endpoint: str | None = None, token_endpoint: str | None = None, revocation_endpoint: str | None = None, registration_endpoint: str | None = None, response_types_supported: List[str] | None = None, grant_types_supported: List[str] | None = None, code_challenge_methods_supported: List[str] | None = None, token_endpoint_auth_methods_supported: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

issuer: str | None
authorization_endpoint: str | None
token_endpoint: str | None
revocation_endpoint: str | None
registration_endpoint: str | None
response_types_supported: List[str] | None
grant_types_supported: List[str] | None
code_challenge_methods_supported: List[str] | None
token_endpoint_auth_methods_supported: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AuthorizeContext(*, client_name: str | None = None, client_logo_uri: str | None = None, workspaces: List[WorkspaceInfo] | None = None, csrf_token: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

client_name: str | None
client_logo_uri: str | None
workspaces: List[WorkspaceInfo] | None
csrf_token: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorLlmAsJudge(*, filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilter] | None
code: LlmAsJudgeCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorLlmAsJudgePublic(*, filters: List[TraceFilterPublic] | None = None, code: LlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilterPublic] | None
code: LlmAsJudgeCodePublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorLlmAsJudgeWrite(*, filters: List[TraceFilterWrite] | None = None, code: LlmAsJudgeCodeWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilterWrite] | None
code: LlmAsJudgeCodeWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilterPublic] | None = None, code: LlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['llm_as_judge']
filters: Optional[List[TraceFilterPublic]]
code: Optional[LlmAsJudgeCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilterPublic] | None = None, code: SpanLlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_llm_as_judge']
filters: Optional[List[SpanFilterPublic]]
code: Optional[SpanLlmAsJudgeCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_SpanUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilterPublic] | None = None, code: SpanUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_user_defined_metric_python']
filters: Optional[List[SpanFilterPublic]]
code: Optional[SpanUserDefinedMetricPythonCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadLlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_llm_as_judge']
filters: Optional[List[TraceThreadFilterPublic]]
code: Optional[TraceThreadLlmAsJudgeCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_user_defined_metric_python']
filters: Optional[List[TraceThreadFilterPublic]]
code: Optional[TraceThreadUserDefinedMetricPythonCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilterPublic] | None = None, code: UserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['user_defined_metric_python']
filters: Optional[List[TraceFilterPublic]]
code: Optional[UserDefinedMetricPythonCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_SpanUserDefinedMetricPython] | None = None, sortable_by: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic_SpanUserDefinedMetricPython] | None
sortable_by: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPublic_LlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilterPublic] | None = None, code: LlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['llm_as_judge']
filters: Optional[List[TraceFilterPublic]]
code: Optional[LlmAsJudgeCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPublic_SpanLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilterPublic] | None = None, code: SpanLlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_llm_as_judge']
filters: Optional[List[SpanFilterPublic]]
code: Optional[SpanLlmAsJudgeCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPublic_SpanUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilterPublic] | None = None, code: SpanUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_user_defined_metric_python']
filters: Optional[List[SpanFilterPublic]]
code: Optional[SpanUserDefinedMetricPythonCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadLlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_llm_as_judge']
filters: Optional[List[TraceThreadFilterPublic]]
code: Optional[TraceThreadLlmAsJudgeCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_user_defined_metric_python']
filters: Optional[List[TraceThreadFilterPublic]]
code: Optional[TraceThreadUserDefinedMetricPythonCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorPublic_UserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReferencePublic] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilterPublic] | None = None, code: UserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['user_defined_metric_python']
filters: Optional[List[TraceFilterPublic]]
code: Optional[UserDefinedMetricPythonCodePublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorSpanLlmAsJudge(*, filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilter] | None
code: SpanLlmAsJudgeCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorSpanLlmAsJudgePublic(*, filters: List[SpanFilterPublic] | None = None, code: SpanLlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilterPublic] | None
code: SpanLlmAsJudgeCodePublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorSpanLlmAsJudgeWrite(*, filters: List[SpanFilterWrite] | None = None, code: SpanLlmAsJudgeCodeWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilterWrite] | None
code: SpanLlmAsJudgeCodeWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorSpanUserDefinedMetricPython(*, filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilter] | None
code: SpanUserDefinedMetricPythonCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic(*, filters: List[SpanFilterPublic] | None = None, code: SpanUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilterPublic] | None
code: SpanUserDefinedMetricPythonCodePublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite(*, filters: List[SpanFilterWrite] | None = None, code: SpanUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilterWrite] | None
code: SpanUserDefinedMetricPythonCodeWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadLlmAsJudge(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilter] | None
code: TraceThreadLlmAsJudgeCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic(*, filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadLlmAsJudgeCodePublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilterPublic] | None
code: TraceThreadLlmAsJudgeCodePublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite(*, filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadLlmAsJudgeCodeWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilterWrite] | None
code: TraceThreadLlmAsJudgeCodeWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilter] | None
code: TraceThreadUserDefinedMetricPythonCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic(*, filters: List[TraceThreadFilterPublic] | None = None, code: TraceThreadUserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilterPublic] | None
code: TraceThreadUserDefinedMetricPythonCodePublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite(*, filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilterWrite] | None
code: TraceThreadUserDefinedMetricPythonCodeWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdateLlmAsJudge(*, filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilter] | None
code: LlmAsJudgeCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdateSpanLlmAsJudge(*, filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilter] | None
code: SpanLlmAsJudgeCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython(*, filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[SpanFilter] | None
code: SpanUserDefinedMetricPythonCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilter] | None
code: TraceThreadLlmAsJudgeCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython(*, filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceThreadFilter] | None
code: TraceThreadUserDefinedMetricPythonCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdateUserDefinedMetricPython(*, filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilter] | None
code: UserDefinedMetricPythonCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdate_LlmAsJudge(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['llm_as_judge']
filters: Optional[List[TraceFilter]]
code: Optional[LlmAsJudgeCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdate_SpanLlmAsJudge(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_llm_as_judge']
filters: Optional[List[SpanFilter]]
code: Optional[SpanLlmAsJudgeCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdate_SpanUserDefinedMetricPython(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_user_defined_metric_python']
filters: Optional[List[SpanFilter]]
code: Optional[SpanUserDefinedMetricPythonCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_llm_as_judge']
filters: Optional[List[TraceThreadFilter]]
code: Optional[TraceThreadLlmAsJudgeCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_user_defined_metric_python']
filters: Optional[List[TraceThreadFilter]]
code: Optional[TraceThreadUserDefinedMetricPythonCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUpdate_UserDefinedMetricPython(*, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, project_id: str | None = None, project_ids: List[str] | None = None, action: Literal['evaluator'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['user_defined_metric_python']
filters: Optional[List[TraceFilter]]
code: Optional[UserDefinedMetricPythonCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUserDefinedMetricPython(*, filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilter] | None
code: UserDefinedMetricPythonCode | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUserDefinedMetricPythonPublic(*, filters: List[TraceFilterPublic] | None = None, code: UserDefinedMetricPythonCodePublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilterPublic] | None
code: UserDefinedMetricPythonCodePublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorUserDefinedMetricPythonWrite(*, filters: List[TraceFilterWrite] | None = None, code: UserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

filters: List[TraceFilterWrite] | None
code: UserDefinedMetricPythonCodeWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorWrite_LlmAsJudge(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilterWrite] | None = None, code: LlmAsJudgeCodeWrite | None = None, **extra_data: Any)

Bases: Base

type: Literal['llm_as_judge']
filters: Optional[List[TraceFilterWrite]]
code: Optional[LlmAsJudgeCodeWrite]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorWrite_SpanLlmAsJudge(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilterWrite] | None = None, code: SpanLlmAsJudgeCodeWrite | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_llm_as_judge']
filters: Optional[List[SpanFilterWrite]]
code: Optional[SpanLlmAsJudgeCodeWrite]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorWrite_SpanUserDefinedMetricPython(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilterWrite] | None = None, code: SpanUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_user_defined_metric_python']
filters: Optional[List[SpanFilterWrite]]
code: Optional[SpanUserDefinedMetricPythonCodeWrite]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadLlmAsJudgeCodeWrite | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_llm_as_judge']
filters: Optional[List[TraceThreadFilterWrite]]
code: Optional[TraceThreadLlmAsJudgeCodeWrite]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilterWrite] | None = None, code: TraceThreadUserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_user_defined_metric_python']
filters: Optional[List[TraceThreadFilterWrite]]
code: Optional[TraceThreadUserDefinedMetricPythonCodeWrite]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluatorWrite_UserDefinedMetricPython(*, project_id: str | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, action: Literal['evaluator'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilterWrite] | None = None, code: UserDefinedMetricPythonCodeWrite | None = None, **extra_data: Any)

Bases: Base

type: Literal['user_defined_metric_python']
filters: Optional[List[TraceFilterWrite]]
code: Optional[UserDefinedMetricPythonCodeWrite]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluator_LlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['llm_as_judge'] = 'llm_as_judge', filters: List[TraceFilter] | None = None, code: LlmAsJudgeCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['llm_as_judge']
filters: Optional[List[TraceFilter]]
code: Optional[LlmAsJudgeCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluator_SpanLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['span_llm_as_judge'] = 'span_llm_as_judge', filters: List[SpanFilter] | None = None, code: SpanLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_llm_as_judge']
filters: Optional[List[SpanFilter]]
code: Optional[SpanLlmAsJudgeCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluator_SpanUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['span_user_defined_metric_python'] = 'span_user_defined_metric_python', filters: List[SpanFilter] | None = None, code: SpanUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['span_user_defined_metric_python']
filters: Optional[List[SpanFilter]]
code: Optional[SpanUserDefinedMetricPythonCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluator_TraceThreadLlmAsJudge(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_llm_as_judge'] = 'trace_thread_llm_as_judge', filters: List[TraceThreadFilter] | None = None, code: TraceThreadLlmAsJudgeCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_llm_as_judge']
filters: Optional[List[TraceThreadFilter]]
code: Optional[TraceThreadLlmAsJudgeCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['trace_thread_user_defined_metric_python'] = 'trace_thread_user_defined_metric_python', filters: List[TraceThreadFilter] | None = None, code: TraceThreadUserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['trace_thread_user_defined_metric_python']
filters: Optional[List[TraceThreadFilter]]
code: Optional[TraceThreadUserDefinedMetricPythonCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AutomationRuleEvaluator_UserDefinedMetricPython(*, id: str | None = None, project_id: str | None = None, project_name: str | None = None, projects: List[ProjectReference] | None = None, project_ids: List[str] | None = None, name: str, sampling_rate: float | None = None, enabled: bool | None = None, trigger_scope: Literal['production', 'experiment', 'both'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, action: Literal['evaluator'] | Any, type: Literal['user_defined_metric_python'] = 'user_defined_metric_python', filters: List[TraceFilter] | None = None, code: UserDefinedMetricPythonCode | None = None, **extra_data: Any)

Bases: Base

type: Literal['user_defined_metric_python']
filters: Optional[List[TraceFilter]]
code: Optional[UserDefinedMetricPythonCode]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.AvgValueStatPublic(*, value: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BatchDelete(*, ids: List[str], **extra_data: Any)

Bases: UniversalBaseModel

ids: List[str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BiInformation(*, workspace_id: str | None = None, user: str | None = None, count: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspace_id: str | None
user: str | None
count: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BiInformationResponse(*, bi_information: List[BiInformation] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

bi_information: List[BiInformation] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BlueprintPageHistory(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[AgentBlueprintHistory] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[AgentBlueprintHistory] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDefinition(*, details: BooleanFeedbackDetail | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: BooleanFeedbackDetail | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDefinitionCreate(*, details: BooleanFeedbackDetailCreate | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: BooleanFeedbackDetailCreate | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDefinitionPublic(*, details: BooleanFeedbackDetailPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: BooleanFeedbackDetailPublic | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDefinitionUpdate(*, details: BooleanFeedbackDetailUpdate | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: BooleanFeedbackDetailUpdate | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDetail(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed4590>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed4260>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

true_label: FieldMetadata object at 0x7f2924ed4590>]

Label for true/1 value

false_label: FieldMetadata object at 0x7f2924ed4260>]

Label for false/0 value

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDetailCreate(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed49e0>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed4890>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

true_label: FieldMetadata object at 0x7f2924ed49e0>]

Label for true/1 value

false_label: FieldMetadata object at 0x7f2924ed4890>]

Label for false/0 value

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDetailPublic(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed4da0>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed4fe0>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

true_label: FieldMetadata object at 0x7f2924ed4da0>]

Label for true/1 value

false_label: FieldMetadata object at 0x7f2924ed4fe0>]

Label for false/0 value

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BooleanFeedbackDetailUpdate(*, true_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed5220>], false_label: ~typing.Annotated[str, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed5280>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

true_label: FieldMetadata object at 0x7f2924ed5220>]

Label for true/1 value

false_label: FieldMetadata object at 0x7f2924ed5280>]

Label for false/0 value

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BreakdownConfig(*, field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None = None, metadata_key: str | None = None, sub_metric: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None
metadata_key: str | None
sub_metric: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BreakdownConfigPublic(*, field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None = None, metadata_key: str | None = None, sub_metric: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: Literal['none', 'tags', 'metadata', 'name', 'error_info', 'error_type', 'model', 'provider', 'type', 'guardrail_name'] | Any | None
metadata_key: str | None
sub_metric: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BridgeCommand(*, command_id: str | None = None, runner_id: str | None = None, type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None = None, status: Literal['pending', 'picked_up', 'completed', 'failed', 'timed_out'] | Any | None = None, args: Dict[str, Any | None] | None = None, result: Dict[str, Any | None] | None = None, error: Dict[str, Any | None] | None = None, timeout_seconds: int | None = None, submitted_at: datetime | None = None, picked_up_at: datetime | None = None, completed_at: datetime | None = None, duration_ms: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

command_id: str | None
runner_id: str | None
type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None
status: Literal['pending', 'picked_up', 'completed', 'failed', 'timed_out'] | Any | None
args: Dict[str, Any | None] | None
result: Dict[str, Any | None] | None
error: Dict[str, Any | None] | None
timeout_seconds: int | None
submitted_at: datetime | None
picked_up_at: datetime | None
completed_at: datetime | None
duration_ms: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BridgeCommandBatchResponse(*, commands: List[BridgeCommandItem] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

commands: List[BridgeCommandItem] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BridgeCommandItem(*, command_id: str | None = None, type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None = None, args: Dict[str, Any | None] | None = None, timeout_seconds: int | None = None, submitted_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

command_id: str | None
type: Literal['ReadFile', 'WriteFile', 'EditFile', 'ListFiles', 'SearchFiles', 'Exec'] | Any | None
args: Dict[str, Any | None] | None
timeout_seconds: int | None
submitted_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.BridgeCommandSubmitResponse(*, command_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

command_id: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDefinition(*, details: CategoricalFeedbackDetail | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: CategoricalFeedbackDetail | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDefinitionCreate(*, details: CategoricalFeedbackDetailCreate | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: CategoricalFeedbackDetailCreate | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDefinitionPublic(*, details: CategoricalFeedbackDetailPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: CategoricalFeedbackDetailPublic | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDefinitionUpdate(*, details: CategoricalFeedbackDetailUpdate | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: CategoricalFeedbackDetailUpdate | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDetail(*, categories: Dict[str, float], **extra_data: Any)

Bases: UniversalBaseModel

categories: Dict[str, float]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDetailCreate(*, categories: Dict[str, float], **extra_data: Any)

Bases: UniversalBaseModel

categories: Dict[str, float]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDetailPublic(*, categories: Dict[str, float], **extra_data: Any)

Bases: UniversalBaseModel

categories: Dict[str, float]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CategoricalFeedbackDetailUpdate(*, categories: Dict[str, float], **extra_data: Any)

Bases: UniversalBaseModel

categories: Dict[str, float]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ChatCompletionChoice(*, index: int | None = None, message: AssistantMessage | None = None, delta: Delta | None = None, finish_reason: str | None = None, logprobs: LogProbs | None = None, **extra_data: Any)

Bases: UniversalBaseModel

index: int | None
message: AssistantMessage | None
delta: Delta | None
finish_reason: str | None
logprobs: LogProbs | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ChatCompletionResponse(*, id: str | None = None, created: int | None = None, model: str | None = None, choices: List[ChatCompletionChoice] | None = None, usage: Usage | None = None, system_fingerprint: str | None = None, service_tier: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
created: int | None
model: str | None
choices: List[ChatCompletionChoice] | None
usage: Usage | None
system_fingerprint: str | None
service_tier: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Check(*, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None = None, result: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None
result: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CheckPublic(*, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None = None, result: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any | None
result: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ChunkedOutputJsonNode(*, type: ChunkedOutputJsonNodeType | None = None, closed: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: ChunkedOutputJsonNodeType | None
closed: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ChunkedOutputJsonNodePublic(*, type: ChunkedOutputJsonNodePublicType | None = None, closed: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: ChunkedOutputJsonNodePublicType | None
closed: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ChunkedOutputJsonNodePublicType(*, type_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924edac00>]=None, **extra_data: Any)

Bases: UniversalBaseModel

type_name: FieldMetadata object at 0x7f2924edac00>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ChunkedOutputJsonNodeType(*, type_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924eda6f0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

type_name: FieldMetadata object at 0x7f2924eda6f0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ClientRegistrationResponse(*, client_id: str | None = None, client_id_issued_at: int | None = None, client_name: str | None = None, logo_uri: str | None = None, redirect_uris: List[str] | None = None, token_endpoint_auth_method: str | None = None, grant_types: List[str] | None = None, response_types: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

client_id: str | None
client_id_issued_at: int | None
client_name: str | None
logo_uri: str | None
redirect_uris: List[str] | None
token_endpoint_auth_method: str | None
grant_types: List[str] | None
response_types: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Column(*, name: str | None = None, types: Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | ~typing.Any] | None=None, filter_field_prefix: str | None = None, filter_field: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed5d60>]=None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
types: List[Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | Any] | None
filter_field_prefix: str | None
filter_field: FieldMetadata object at 0x7f2924ed5d60>]

The field to use for filtering

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ColumnCompare(*, name: str | None = None, types: Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | ~typing.Any] | None=None, filter_field_prefix: str | None = None, filter_field: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed6b70>]=None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
types: List[Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | Any] | None
filter_field_prefix: str | None
filter_field: FieldMetadata object at 0x7f2924ed6b70>]

The field to use for filtering

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ColumnPublic(*, name: str | None = None, types: Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | ~typing.Any] | None=None, filter_field_prefix: str | None = None, filter_field: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924f2b110>]=None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
types: List[Literal['string', 'number', 'object', 'boolean', 'array', 'null'] | Any] | None
filter_field_prefix: str | None
filter_field: FieldMetadata object at 0x7f2924f2b110>]

The field to use for filtering

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Comment(*, id: str | None = None, text: str, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
text: str
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CommentCompare(*, id: str | None = None, text: str, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
text: str
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CommentPublic(*, id: str | None = None, text: str, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
text: str
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CompleteMultipartUploadRequest(*, file_name: str, project_name: str | None = None, entity_type: Literal['trace', 'span'] | Any, entity_id: str, container_id: str | None = None, file_size: int, mime_type: str | None = None, upload_id: str, uploaded_file_parts: List[MultipartUploadPart], **extra_data: Any)

Bases: UniversalBaseModel

file_name: str
project_name: str | None

If null, the default project is used

entity_type: Literal['trace', 'span'] | Any
entity_id: str
container_id: str | None
file_size: int
mime_type: str | None
upload_id: str
uploaded_file_parts: List[MultipartUploadPart]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CompletionTokensDetails(*, reasoning_tokens: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

reasoning_tokens: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ConsentResponse(*, redirect_to: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

redirect_to: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CountValueStatPublic(*, value: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.CreateSessionResponse(*, session_id: str | None = None, runner_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

session_id: str | None
runner_id: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DashboardPagePublic(*, content: List[DashboardPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, sortable_by: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[DashboardPublic] | None
page: int | None
size: int | None
total: int | None
sortable_by: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DashboardPublic(*, id: str | None = None, workspace_id: str | None = None, project_id: str | None = None, name: str, slug: str | None = None, type: Literal['multi_project', 'experiments'] | Any | None = None, scope: Literal['workspace', 'insights'] | Any | None = None, description: str | None = None, config: Dict[str, Any | None], created_by: str | None = None, last_updated_by: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
workspace_id: str | None
project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

name: str
slug: str | None
type: Literal['multi_project', 'experiments'] | Any | None
scope: Literal['workspace', 'insights'] | Any | None
description: str | None
config: Dict[str, Any | None]
created_by: str | None
last_updated_by: str | None
created_at: datetime | None
last_updated_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DashboardUpdatePublic(*, name: str | None = None, type: Literal['multi_project', 'experiments'] | Any | None = None, description: str | None = None, config: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
type: Literal['multi_project', 'experiments'] | Any | None
description: str | None
config: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DashboardWrite(*, project_id: str | None = None, project_name: str | None = None, name: str, type: Literal['multi_project', 'experiments'] | Any | None = None, description: str | None = None, config: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

project_name: str | None

For project scope, specify either project_id or project_name. If project_name is provided and the project does not exist, it will be created. Ignored when project_id is provided. If neither is provided, the dashboard is created at workspace level.

name: str
type: Literal['multi_project', 'experiments'] | Any | None
description: str | None
config: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DataPointDouble(*, time: datetime, value: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

time: datetime
value: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DataPointNumberPublic(*, time: datetime, value: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

time: datetime
value: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetExpansion(*, model: str, sample_count: int | None = None, preserve_fields: List[str] | None = None, variation_instructions: str | None = None, custom_prompt: str | None = None, max_completion_tokens: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

model: str

The model to use for synthetic data generation

sample_count: int | None

Number of synthetic samples to generate

preserve_fields: List[str] | None

Fields to preserve patterns from original data

variation_instructions: str | None

Additional instructions for data variation

custom_prompt: str | None

Custom prompt to use for generation instead of auto-generated one

max_completion_tokens: int | None

Maximum number of tokens for the LLM response. Required by Anthropic, used as maxOutputTokens for Gemini. If not provided, defaults to 4000 for Anthropic models only.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetExpansionResponse(*, generated_samples: List[DatasetItem] | None = None, model: str | None = None, total_generated: int | None = None, generation_time: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

generated_samples: List[DatasetItem] | None

List of generated synthetic dataset items

model: str | None

Model used for generation

total_generated: int | None

Total number of samples generated

generation_time: datetime | None

Generation timestamp

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetExportJobPublic(*, id: str | None = None, dataset_id: str | None = None, dataset_name: str | None = None, status: Literal['PENDING', 'PROCESSING', 'COMPLETED', 'FAILED'] | Any | None = None, file_path: str | None = None, error_message: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, expires_at: datetime | None = None, viewed_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
dataset_id: str | None
dataset_name: str | None
status: Literal['PENDING', 'PROCESSING', 'COMPLETED', 'FAILED'] | Any | None
file_path: str | None
error_message: str | None
created_at: datetime | None
last_updated_at: datetime | None
expires_at: datetime | None
viewed_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItem(*, id: str | None = None, dataset_item_id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItem] | None = None, execution_policy: ExecutionPolicy | None = None, experiment_items: List[ExperimentItem] | None = None, run_summaries_by_experiment: Dict[str, ExperimentRunSummary] | None = None, dataset_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions

dataset_item_id: str | None

Deprecated. Always equals ‘id’. Retained for backward compatibility and will be removed in a future version

trace_id: str | None
span_id: str | None
source: Literal['manual', 'trace', 'span', 'sdk'] | Any
data: Dict[str, Any | None]
description: str | None
tags: List[str] | None
evaluators: List[EvaluatorItem] | None
execution_policy: ExecutionPolicy | None
experiment_items: List[ExperimentItem] | None
run_summaries_by_experiment: Dict[str, ExperimentRunSummary] | None
dataset_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemBatch(*, dataset_name: str | None = None, dataset_id: str | None = None, project_name: str | None = None, project_id: str | None = None, items: List[DatasetItem], batch_group_id: str | None = None, copy_from_dataset_id: str | None = None, copy_from_version_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

dataset_name: str | None

If null, dataset_id must be provided

dataset_id: str | None

If null, dataset_name must be provided

project_name: str | None

Optional. Associates the batch with a project by name. Ignored if project_id is provided.

project_id: str | None

Optional. Associates the batch with a project by ID. Takes precedence over project_name.

items: List[DatasetItem]
batch_group_id: str | None

Optional batch group ID to group multiple batches into a single dataset version. If null, mutates the latest version instead of creating a new one.

copy_from_dataset_id: str | None

Optional. Dataset to read carry-forward rows from when materializing the new version. Required together with copy_from_version_id. When null, carry-forward rows are read from the destination dataset’s prior version.

copy_from_version_id: str | None

Optional. Version within copy_from_dataset_id to read carry-forward rows from. Required together with copy_from_dataset_id.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemCompare(*, id: str | None = None, dataset_item_id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItemCompare] | None = None, execution_policy: ExecutionPolicyCompare | None = None, experiment_items: List[ExperimentItemCompare] | None = None, run_summaries_by_experiment: Dict[str, ExperimentRunSummaryCompare] | None = None, dataset_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions

dataset_item_id: str | None

Deprecated. Always equals ‘id’. Retained for backward compatibility and will be removed in a future version

trace_id: str | None
span_id: str | None
source: Literal['manual', 'trace', 'span', 'sdk'] | Any
data: Dict[str, Any | None]
description: str | None
tags: List[str] | None
evaluators: List[EvaluatorItemCompare] | None
execution_policy: ExecutionPolicyCompare | None
experiment_items: List[ExperimentItemCompare] | None
run_summaries_by_experiment: Dict[str, ExperimentRunSummaryCompare] | None
dataset_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Filters to select dataset items to delete within the specified dataset. Must be used with ‘dataset_id’. Mutually exclusive with ‘item_ids’. Empty array means ‘delete all items in the dataset’.

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemPageCompare(*, content: List[DatasetItemCompare] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, columns: List[ColumnCompare] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924f90170>]=None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[DatasetItemCompare] | None
page: int | None
size: int | None
total: int | None
columns: List[ColumnCompare] | None
sortable_by: FieldMetadata object at 0x7f2924f90170>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemPagePublic(*, content: List[DatasetItemPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, columns: List[ColumnPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924ed4830>]=None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[DatasetItemPublic] | None
page: int | None
size: int | None
total: int | None
columns: List[ColumnPublic] | None
sortable_by: FieldMetadata object at 0x7f2924ed4830>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemPublic(*, id: str | None = None, dataset_item_id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItemPublic] | None = None, execution_policy: ExecutionPolicyPublic | None = None, experiment_items: List[ExperimentItemPublic] | None = None, run_summaries_by_experiment: Dict[str, ExperimentRunSummaryPublic] | None = None, dataset_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions

dataset_item_id: str | None

Deprecated. Always equals ‘id’. Retained for backward compatibility and will be removed in a future version

trace_id: str | None
span_id: str | None
source: Literal['manual', 'trace', 'span', 'sdk'] | Any
data: Dict[str, Any | None]
description: str | None
tags: List[str] | None
evaluators: List[EvaluatorItemPublic] | None
execution_policy: ExecutionPolicyPublic | None
experiment_items: List[ExperimentItemPublic] | None
run_summaries_by_experiment: Dict[str, ExperimentRunSummaryPublic] | None
dataset_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemUpdate(*, input: str | None = None, expected_output: str | None = None, metadata: Dict[str, Any | None] | None = None, data: Dict[str, Any | None] | None = None, description: str | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, evaluators: List[EvaluatorItem] | None = None, execution_policy: ExecutionPolicy | None = None, clear_execution_policy: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Dataset item update request

input: str | None

Dataset item input

expected_output: str | None

Dataset item expected output

metadata: Dict[str, Any | None] | None
data: Dict[str, Any | None] | None
description: str | None

Dataset item description

tags: List[str] | None

Tags

tags_to_add: List[str] | None

Tags to add

tags_to_remove: List[str] | None

Tags to remove

evaluators: List[EvaluatorItem] | None

Evaluators

execution_policy: ExecutionPolicy | None
clear_execution_policy: bool | None

When true, clears the item-level execution policy (falls back to dataset-level)

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetItemWrite(*, id: str | None = None, trace_id: str | None = None, span_id: str | None = None, source: Literal['manual', 'trace', 'span', 'sdk'] | Any, data: Dict[str, Any | None], description: str | None = None, tags: List[str] | None = None, evaluators: List[EvaluatorItemWrite] | None = None, execution_policy: ExecutionPolicyWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

Stable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions

trace_id: str | None
span_id: str | None
source: Literal['manual', 'trace', 'span', 'sdk'] | Any
data: Dict[str, Any | None]
description: str | None
tags: List[str] | None
evaluators: List[EvaluatorItemWrite] | None
execution_policy: ExecutionPolicyWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetPagePublic(*, content: List[DatasetPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924e9f9e0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[DatasetPublic] | None
page: int | None
size: int | None
total: int | None
sortable_by: FieldMetadata object at 0x7f2924e9f9e0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetPublic(*, id: str | None = None, name: str, project_id: str | None = None, type: Literal['dataset', 'evaluation_suite'] | Any | None = None, visibility: Literal['private', 'public'] | Any | None = None, tags: List[str] | None = None, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, experiment_count: int | None = None, dataset_items_count: int | None = None, optimization_count: int | None = None, most_recent_experiment_at: datetime | None = None, last_created_experiment_at: datetime | None = None, most_recent_optimization_at: datetime | None = None, last_created_optimization_at: datetime | None = None, status: Literal['unknown', 'processing', 'completed', 'failed'] | Any | None = None, latest_version: DatasetVersionSummaryPublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

type: Literal['dataset', 'evaluation_suite'] | Any | None
visibility: Literal['private', 'public'] | Any | None
tags: List[str] | None
description: str | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
experiment_count: int | None
dataset_items_count: int | None
optimization_count: int | None
most_recent_experiment_at: datetime | None
last_created_experiment_at: datetime | None
most_recent_optimization_at: datetime | None
last_created_optimization_at: datetime | None
status: Literal['unknown', 'processing', 'completed', 'failed'] | Any | None
latest_version: DatasetVersionSummaryPublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetVersionDiff(*, from_version: str | None = None, to_version: str | None = None, statistics: DatasetVersionDiffStats | None = None, **extra_data: Any)

Bases: UniversalBaseModel

from_version: str | None
to_version: str | None
statistics: DatasetVersionDiffStats | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetVersionDiffStats(*, items_added: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924b0d3d0>]=None, items_modified: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924b0d310>]=None, items_deleted: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924b0d730>]=None, items_unchanged: Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924b0d640>]=None, **extra_data: Any)

Bases: UniversalBaseModel

items_added: FieldMetadata object at 0x7f2924b0d3d0>]
items_modified: FieldMetadata object at 0x7f2924b0d310>]
items_deleted: FieldMetadata object at 0x7f2924b0d730>]
items_unchanged: FieldMetadata object at 0x7f2924b0d640>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetVersionPagePublic(*, content: List[DatasetVersionPublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[DatasetVersionPublic] | None
page: int | None
size: int | None
total: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetVersionPublic(*, id: str | None = None, dataset_id: str | None = None, version_hash: str | None = None, tags: List[str] | None = None, is_latest: bool | None = None, version_name: str | None = None, items_total: int | None = None, items_added: int | None = None, items_modified: int | None = None, items_deleted: int | None = None, change_description: str | None = None, metadata: Dict[str, str] | None = None, evaluators: List[EvaluatorItemPublic] | None = None, execution_policy: ExecutionPolicyPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
dataset_id: str | None
version_hash: str | None
tags: List[str] | None
is_latest: bool | None

Indicates whether this is the latest version of the dataset

version_name: str | None

Sequential version name formatted as ‘v1’, ‘v2’, etc.

items_total: int | None

Total number of items in this version

items_added: int | None

Number of items added since last version

items_modified: int | None

Number of items modified since last version

items_deleted: int | None

Number of items deleted since last version

change_description: str | None
metadata: Dict[str, str] | None
evaluators: List[EvaluatorItemPublic] | None

Default evaluators for items in this version

execution_policy: ExecutionPolicyPublic | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetVersionSummary(*, id: str | None = None, version_hash: str | None = None, version_name: str | None = None, change_description: str | None = None, tags: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Summary of the latest dataset version

id: str | None

Unique identifier of the version

version_hash: str | None

Hash of the version content

version_name: str | None

Sequential version name formatted as ‘v1’, ‘v2’, etc.

change_description: str | None

Description of changes in this version

tags: List[str] | None

Tags associated with this version

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DatasetVersionSummaryPublic(*, id: str | None = None, version_hash: str | None = None, version_name: str | None = None, change_description: str | None = None, tags: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Summary of the latest dataset version

id: str | None

Unique identifier of the version

version_hash: str | None

Hash of the version content

version_name: str | None

Sequential version name formatted as ‘v1’, ‘v2’, etc.

change_description: str | None

Description of changes in this version

tags: List[str] | None

Tags associated with this version

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DeleteAttachmentsRequest(*, file_names: List[str], entity_type: Literal['trace', 'span'] | Any, entity_id: str, container_id: str, **extra_data: Any)

Bases: UniversalBaseModel

file_names: List[str]
entity_type: Literal['trace', 'span'] | Any
entity_id: str
container_id: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DeleteFeedbackScore(*, name: str, author: str | None = None, source_queue_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
author: str | None
source_queue_id: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.DeleteIdsHolder(*, ids: List[str], **extra_data: Any)

Bases: UniversalBaseModel

ids: List[str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Delta(*, role: str | None = None, content: str | None = None, reasoning_content: str | None = None, tool_calls: List[ToolCall] | None = None, function_call: FunctionCall | None = None, **extra_data: Any)

Bases: UniversalBaseModel

role: str | None
content: str | None
reasoning_content: str | None
tool_calls: List[ToolCall] | None
function_call: FunctionCall | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Environment(*, id: str | None = None, name: str, description: str | None = None, color: str | None = None, position: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
description: str | None
color: str | None
position: int | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.EnvironmentPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[EnvironmentPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f292523d9a0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[EnvironmentPublic] | None
sortable_by: FieldMetadata object at 0x7f292523d9a0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.EnvironmentPublic(*, id: str | None = None, name: str, description: str | None = None, color: str | None = None, position: int | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
description: str | None
color: str | None
position: int | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorCountWithDeviation(*, count: int | None = None, deviation: int | None = None, deviation_percentage: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

count: int | None
deviation: int | None
deviation_percentage: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorCountWithDeviationDetailed(*, count: int | None = None, deviation: int | None = None, deviation_percentage: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

count: int | None
deviation: int | None
deviation_percentage: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorInfo(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)

Bases: UniversalBaseModel

exception_type: str
message: str | None
traceback: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorInfoExperimentItemBulkWriteView(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)

Bases: UniversalBaseModel

exception_type: str
message: str | None
traceback: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorInfoPublic(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)

Bases: UniversalBaseModel

exception_type: str
message: str | None
traceback: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorInfoWrite(*, exception_type: str, message: str | None = None, traceback: str, **extra_data: Any)

Bases: UniversalBaseModel

exception_type: str
message: str | None
traceback: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorMessage(*, code: int | None = None, message: str | None = None, details: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

code: int | None
message: str | None
details: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorMessageDetail(*, errors: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

errors: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorMessageDetailed(*, errors: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

errors: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorMessageHistory(*, errors: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

errors: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorMessagePublic(*, code: int | None = None, message: str | None = None, details: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

code: int | None
message: str | None
details: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ErrorMessageWrite(*, errors: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

errors: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.EvaluatorItem(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: Literal['llm_judge', 'code_metric'] | Any
config: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.EvaluatorItemCompare(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: Literal['llm_judge', 'code_metric'] | Any
config: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.EvaluatorItemPublic(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

Default evaluators for items in this version

name: str
type: Literal['llm_judge', 'code_metric'] | Any
config: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.EvaluatorItemWrite(*, name: str, type: Literal['llm_judge', 'code_metric'] | Any, config: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: Literal['llm_judge', 'code_metric'] | Any
config: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExecutionPolicy(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

runs_per_item: int | None
pass_threshold: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExecutionPolicyCompare(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

runs_per_item: int | None
pass_threshold: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExecutionPolicyPublic(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Default execution policy for items in this version

runs_per_item: int | None
pass_threshold: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExecutionPolicyWrite(*, runs_per_item: int | None = None, pass_threshold: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

runs_per_item: int | None
pass_threshold: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExistenceResponse(*, exists: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

exists: bool | None

Whether the project has at least one matching entity for the given scope

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentExecutionResponse(*, experiments: List[ExperimentInfo] | None = None, total_items: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

experiments: List[ExperimentInfo] | None
total_items: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentGroupAggregationsResponse(*, content: Dict[str, GroupContentWithAggregations] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: Dict[str, GroupContentWithAggregations] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentGroupResponse(*, content: Dict[str, GroupContent] | None = None, details: GroupDetails | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: Dict[str, GroupContent] | None
details: GroupDetails | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentInfo(*, experiment_id: str | None = None, prompt_index: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

experiment_id: str | None
prompt_index: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItem(*, id: str | None = None, experiment_id: str, dataset_item_id: str, trace_id: str, project_id: str | None = None, project_name: str | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, feedback_scores: List[FeedbackScore] | None = None, comments: List[Comment] | None = None, total_estimated_cost: float | None = None, duration: float | None = None, usage: Dict[str, int] | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, trace_visibility_mode: Literal['default', 'hidden'] | Any | None = None, description: str | None = None, execution_policy: ExecutionPolicy | None = None, assertion_results: List[AssertionResult] | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
experiment_id: str
dataset_item_id: str
trace_id: str
project_id: str | None
project_name: str | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
feedback_scores: List[FeedbackScore] | None
comments: List[Comment] | None
total_estimated_cost: float | None
duration: float | None
usage: Dict[str, int] | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
trace_visibility_mode: Literal['default', 'hidden'] | Any | None
description: str | None
execution_policy: ExecutionPolicy | None
assertion_results: List[AssertionResult] | None
status: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemBulkRecord(*, dataset_item_id: str, evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace: Trace | None = None, spans: List[Span] | None = None, feedback_scores: List[FeedbackScore] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

dataset_item_id: str
evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
trace: Trace | None
spans: List[Span] | None
feedback_scores: List[FeedbackScore] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemBulkRecordExperimentItemBulkWriteView(*, dataset_item_id: str, evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace: TraceExperimentItemBulkWriteView | None = None, spans: List[SpanExperimentItemBulkWriteView] | None = None, feedback_scores: List[FeedbackScoreExperimentItemBulkWriteView] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

dataset_item_id: str
evaluate_task_result: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
trace: TraceExperimentItemBulkWriteView | None
spans: List[SpanExperimentItemBulkWriteView] | None
feedback_scores: List[FeedbackScoreExperimentItemBulkWriteView] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemBulkUpload(*, experiment_name: str, dataset_name: str, experiment_id: str | None = None, project_name: str | None = None, items: List[ExperimentItemBulkRecord], **extra_data: Any)

Bases: UniversalBaseModel

experiment_name: str
dataset_name: str
experiment_id: str | None

Optional experiment ID. If provided, items will be added to the existing experiment and experimentName will be ignored. If not provided or experiment with that ID doesn’t exist, a new experiment will be created with the given experimentName

project_name: str | None

Project for traces auto-created from items that provide evaluate_task_result (i.e. without an explicit trace). If null, the default project is used; relying on this fallback is deprecated, please provide project_name explicitly.

items: List[ExperimentItemBulkRecord]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemCompare(*, id: str | None = None, experiment_id: str, dataset_item_id: str, trace_id: str, project_id: str | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, feedback_scores: List[FeedbackScoreCompare] | None = None, comments: List[CommentCompare] | None = None, total_estimated_cost: float | None = None, duration: float | None = None, usage: Dict[str, int] | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, trace_visibility_mode: Literal['default', 'hidden'] | Any | None = None, description: str | None = None, execution_policy: ExecutionPolicyCompare | None = None, assertion_results: List[AssertionResultCompare] | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
experiment_id: str
dataset_item_id: str
trace_id: str
project_id: str | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
trace_metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
feedback_scores: List[FeedbackScoreCompare] | None
comments: List[CommentCompare] | None
total_estimated_cost: float | None
duration: float | None
usage: Dict[str, int] | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
trace_visibility_mode: Literal['default', 'hidden'] | Any | None
description: str | None
execution_policy: ExecutionPolicyCompare | None
assertion_results: List[AssertionResultCompare] | None
status: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemPublic(*, id: str | None = None, experiment_id: str, dataset_item_id: str, trace_id: str, project_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, trace_visibility_mode: Literal['default', 'hidden'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
experiment_id: str
dataset_item_id: str
trace_id: str
project_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
trace_visibility_mode: Literal['default', 'hidden'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemReference(*, id: str, name: str, dataset_id: str, dataset_item_id: str, **extra_data: Any)

Bases: UniversalBaseModel

Experiment reference with ID, name, dataset ID, and dataset item ID

id: str

Experiment ID

name: str

Experiment name

dataset_id: str

Dataset ID

dataset_item_id: str

Dataset Item ID

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentItemReferencePublic(*, id: str, name: str, dataset_id: str, dataset_item_id: str, **extra_data: Any)

Bases: UniversalBaseModel

Experiment reference with ID, name, dataset ID, and dataset item ID

id: str

Experiment ID

name: str

Experiment name

dataset_id: str

Dataset ID

dataset_item_id: str

Dataset Item ID

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[ExperimentPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924b0ce30>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[ExperimentPublic] | None
sortable_by: FieldMetadata object at 0x7f2924b0ce30>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentPublic(*, id: str | None = None, dataset_name: str | None = None, dataset_id: str | None = None, project_id: str | None = None, project_name: str | None = None, name: str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None = None, evaluation_method: Literal['dataset', 'evaluation_suite'] | Any | None = None, optimization_id: str | None = None, feedback_scores: List[FeedbackScoreAveragePublic] | None = None, comments: List[CommentPublic] | None = None, trace_count: int | None = None, dataset_item_count: int | None = None, created_at: datetime | None = None, duration: PercentageValuesPublic | None = None, total_estimated_cost: float | None = None, total_estimated_cost_avg: float | None = None, usage: Dict[str, float] | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, status: Literal['running', 'completed', 'cancelled'] | Any | None = None, experiment_scores: List[ExperimentScorePublic] | None = None, prompt_version: PromptVersionLinkPublic | None = None, prompt_versions: List[PromptVersionLinkPublic] | None = None, dataset_version_id: str | None = None, dataset_version_summary: DatasetVersionSummaryPublic | None = None, pass_rate: float | None = None, passed_count: int | None = None, total_count: int | None = None, assertion_scores: List[AssertionScoreAveragePublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
dataset_name: str | None
dataset_id: str | None
project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

project_name: str | None

Project name. Creates project if it doesn’t exist. Ignored when project_id is provided.

name: str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
tags: List[str] | None
type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None
evaluation_method: Literal['dataset', 'evaluation_suite'] | Any | None
optimization_id: str | None
feedback_scores: List[FeedbackScoreAveragePublic] | None
comments: List[CommentPublic] | None
trace_count: int | None
dataset_item_count: int | None
created_at: datetime | None
duration: PercentageValuesPublic | None
total_estimated_cost: float | None
total_estimated_cost_avg: float | None
usage: Dict[str, float] | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
status: Literal['running', 'completed', 'cancelled'] | Any | None
experiment_scores: List[ExperimentScorePublic] | None
prompt_version: PromptVersionLinkPublic | None
prompt_versions: List[PromptVersionLinkPublic] | None
dataset_version_id: str | None

ID of the dataset version this experiment is linked to. If not provided at creation, experiment will be automatically linked to the latest version.

dataset_version_summary: DatasetVersionSummaryPublic | None
pass_rate: float | None

Pass rate for test suite experiments (0.0-1.0). Null for regular experiments.

passed_count: int | None

Number of items that passed for test suite experiments. Null for regular experiments.

total_count: int | None

Total number of items for test suite experiments. Null for regular experiments.

assertion_scores: List[AssertionScoreAveragePublic] | None

Per-assertion average pass rates for test suite experiments. Null for regular experiments.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentRunSummary(*, passed_runs: int | None = None, total_runs: int | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

passed_runs: int | None
total_runs: int | None
status: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentRunSummaryCompare(*, passed_runs: int | None = None, total_runs: int | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

passed_runs: int | None
total_runs: int | None
status: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentRunSummaryPublic(*, passed_runs: int | None = None, total_runs: int | None = None, status: Literal['passed', 'failed'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

passed_runs: int | None
total_runs: int | None
status: Literal['passed', 'failed'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentScore(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentScorePublic(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentScoreWrite(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ExperimentUpdate(*, name: str | None = None, metadata: Dict[str, Any | None] | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None = None, status: Literal['running', 'completed', 'cancelled'] | Any | None = None, experiment_scores: List[ExperimentScore] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
metadata: Dict[str, Any | None] | None
tags: List[str] | None

Tags

tags_to_add: List[str] | None

Tags to add

tags_to_remove: List[str] | None

Tags to remove

type: Literal['regular', 'trial', 'mini-batch', 'mutation'] | Any | None
status: Literal['running', 'completed', 'cancelled'] | Any | None

The status of the experiment

experiment_scores: List[ExperimentScore] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackCreate_Boolean(*, id: str | None = None, name: str, description: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailCreate | None = None, **extra_data: Any)

Bases: Base

type: Literal['boolean']
details: Optional[BooleanFeedbackDetailCreate]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackCreate_Categorical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailCreate | None = None, **extra_data: Any)

Bases: Base

type: Literal['categorical']
details: Optional[CategoricalFeedbackDetailCreate]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackCreate_Numerical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailCreate | None = None, **extra_data: Any)

Bases: Base

type: Literal['numerical']
details: Optional[NumericalFeedbackDetailCreate]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackDefinitionPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[FeedbackObjectPublic_Numerical | FeedbackObjectPublic_Categorical | FeedbackObjectPublic_Boolean] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[FeedbackObjectPublic_Numerical | FeedbackObjectPublic_Categorical | FeedbackObjectPublic_Boolean] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackObjectPublic_Boolean(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['boolean']
details: Optional[BooleanFeedbackDetailPublic]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackObjectPublic_Categorical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['categorical']
details: Optional[CategoricalFeedbackDetailPublic]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackObjectPublic_Numerical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['numerical']
details: Optional[NumericalFeedbackDetailPublic]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackPublic_Boolean(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['boolean']
details: Optional[BooleanFeedbackDetailPublic]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackPublic_Categorical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['categorical']
details: Optional[CategoricalFeedbackDetailPublic]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackPublic_Numerical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['numerical']
details: Optional[NumericalFeedbackDetailPublic]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScore(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntry] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
category_name: str | None
value: float
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
value_by_author: Dict[str, ValueEntry] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreAverage(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreAverageDetailed(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreAveragePublic(*, name: str, value: float, **extra_data: Any)

Bases: UniversalBaseModel

name: str
value: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreBatch(*, scores: List[FeedbackScoreBatchItem], **extra_data: Any)

Bases: UniversalBaseModel

scores: List[FeedbackScoreBatchItem]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreBatchItem(*, project_name: str | None = None, project_id: str | None = None, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, author: str | None = None, source_queue_id: str | None = None, id: str, **extra_data: Any)

Bases: UniversalBaseModel

project_name: str | None

If null, the default project is used

project_id: str | None
name: str
category_name: str | None
value: float
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
author: str | None
source_queue_id: str | None
id: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreBatchItemThread(*, project_name: str | None = None, project_id: str | None = None, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, author: str | None = None, source_queue_id: str | None = None, thread_id: str, **extra_data: Any)

Bases: UniversalBaseModel

project_name: str | None

If null, the default project is used

project_id: str | None
name: str
category_name: str | None
value: float
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
author: str | None
source_queue_id: str | None
thread_id: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreCompare(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntryCompare] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
category_name: str | None
value: float
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
value_by_author: Dict[str, ValueEntryCompare] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreExperimentItemBulkWriteView(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntryExperimentItemBulkWriteView] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
category_name: str | None
value: float
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
value_by_author: Dict[str, ValueEntryExperimentItemBulkWriteView] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreNames(*, scores: List[ScoreName] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

scores: List[ScoreName] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScoreNamesPublic(*, scores: List[ScoreNamePublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

scores: List[ScoreNamePublic] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackScorePublic(*, name: str, category_name: str | None = None, value: float, reason: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any, source_queue_id: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, value_by_author: Dict[str, ValueEntryPublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Aggregated feedback scores from all spans in this trace, averaged by score name

name: str
category_name: str | None
value: float
reason: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any
source_queue_id: str | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
value_by_author: Dict[str, ValueEntryPublic] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackUpdate_Boolean(*, id: str | None = None, name: str, description: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetailUpdate | None = None, **extra_data: Any)

Bases: Base

type: Literal['boolean']
details: Optional[BooleanFeedbackDetailUpdate]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackUpdate_Categorical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetailUpdate | None = None, **extra_data: Any)

Bases: Base

type: Literal['categorical']
details: Optional[CategoricalFeedbackDetailUpdate]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FeedbackUpdate_Numerical(*, id: str | None = None, name: str, description: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetailUpdate | None = None, **extra_data: Any)

Bases: Base

type: Literal['numerical']
details: Optional[NumericalFeedbackDetailUpdate]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Feedback_Boolean(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['boolean'] = 'boolean', details: BooleanFeedbackDetail | None = None, **extra_data: Any)

Bases: Base

type: Literal['boolean']
details: Optional[BooleanFeedbackDetail]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Feedback_Categorical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['categorical'] = 'categorical', details: CategoricalFeedbackDetail | None = None, **extra_data: Any)

Bases: Base

type: Literal['categorical']
details: Optional[CategoricalFeedbackDetail]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Feedback_Numerical(*, id: str | None = None, name: str, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, type: Literal['numerical'] = 'numerical', details: NumericalFeedbackDetail | None = None, **extra_data: Any)

Bases: Base

type: Literal['numerical']
details: Optional[NumericalFeedbackDetail]
created_at: Optional[dt.datetime]
created_by: Optional[str]
last_updated_at: Optional[dt.datetime]
last_updated_by: Optional[str]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Function(*, name: str | None = None, description: str | None = None, strict: bool | None = None, parameters: Dict[str, Dict[str, Any | None]] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
description: str | None
strict: bool | None
parameters: Dict[str, Dict[str, Any | None]] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.FunctionCall(*, name: str | None = None, arguments: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
arguments: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GenerateReportResponse(*, report_id: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f292487ffe0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

Response for report generation trigger

report_id: FieldMetadata object at 0x7f292487ffe0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GroupContent(*, label: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

label: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GroupContentWithAggregations(*, label: str | None = None, aggregations: AggregationData | None = None, **extra_data: Any)

Bases: UniversalBaseModel

label: str | None
aggregations: AggregationData | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GroupDetail(*, group_sorting: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

group_sorting: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GroupDetails(*, groups_details: List[GroupDetail] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

groups_details: List[GroupDetail] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Guardrail(*, id: str | None = None, entity_id: str, secondary_id: str, project_name: str | None = None, project_id: str | None = None, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, result: Literal['passed', 'failed'] | Any, config: Dict[str, Any | None], details: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
entity_id: str
secondary_id: str
project_name: str | None

If null, the default project is used

project_id: str | None
name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any
result: Literal['passed', 'failed'] | Any
config: Dict[str, Any | None]
details: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GuardrailBatch(*, guardrails: List[Guardrail], **extra_data: Any)

Bases: UniversalBaseModel

guardrails: List[Guardrail]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GuardrailWrite(*, entity_id: str, secondary_id: str, project_name: str | None = None, project_id: str | None = None, name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any, result: Literal['passed', 'failed'] | Any, config: Dict[str, Any | None], details: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

entity_id: str
secondary_id: str
project_name: str | None

If null, the default project is used

project_id: str | None
name: Literal['TOPIC', 'PII', 'LLM_JUDGE', 'PROMPT_INJECTION', 'CUSTOM_CLASSIFIER'] | Any
result: Literal['passed', 'failed'] | Any
config: Dict[str, Any | None]
details: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GuardrailsValidation(*, span_id: str | None = None, checks: List[Check] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

span_id: str | None
checks: List[Check] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.GuardrailsValidationPublic(*, span_id: str | None = None, checks: List[CheckPublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

span_id: str | None
checks: List[CheckPublic] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.IdsHolder(*, ids: List[str], **extra_data: Any)

Bases: UniversalBaseModel

ids: List[str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ImageUrl(*, url: str, detail: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

url: str
detail: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ImageUrlPublic(*, url: str, detail: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

url: str
detail: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ImageUrlWrite(*, url: str, detail: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

url: str
detail: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ItemLockInfo(*, active_locks: int | None = None, locked_by: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

active_locks: int | None
locked_by: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.JsonSchema(*, name: str | None = None, strict: bool | None = None, schema_: Dict[str, ~typing.Dict[str, ~typing.Any | None]] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924996330>]=None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
strict: bool | None
schema_: FieldMetadata object at 0x7f2924996330>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.KpiCardResponse(*, stats: List[KpiMetric] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

stats: List[KpiMetric] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.KpiMetric(*, type: Literal['count', 'errors', 'avg_duration', 'total_cost'] | Any | None = None, current_value: float | None = None, previous_value: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: Literal['count', 'errors', 'avg_duration', 'total_cost'] | Any | None
current_value: float | None

count is an integer count; errors is a percentage in [0, 100]; avg_duration is milliseconds; total_cost is in USD.

Type:

Metric value for the current period. Unit depends on type

previous_value: float | None

Metric value for the immediately preceding period of equal length. Same unit as current_value.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeCode(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters.LlmAsJudgeModelParameters, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message.LlmAsJudgeMessage], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema.LlmAsJudgeOutputSchema], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924f1ba10>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParameters
messages: List[LlmAsJudgeMessage]
variables: Dict[str, str]
schema_: FieldMetadata object at 0x7f2924f1ba10>]
max_cost_usd: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeCodePublic(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_public.LlmAsJudgeModelParametersPublic, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_public.LlmAsJudgeMessagePublic], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_public.LlmAsJudgeOutputSchemaPublic], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924f190d0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParametersPublic
messages: List[LlmAsJudgeMessagePublic]
variables: Dict[str, str]
schema_: FieldMetadata object at 0x7f2924f190d0>]
max_cost_usd: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeCodeWrite(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_write.LlmAsJudgeModelParametersWrite, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_write.LlmAsJudgeMessageWrite], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_write.LlmAsJudgeOutputSchemaWrite], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924f20560>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParametersWrite
messages: List[LlmAsJudgeMessageWrite]
variables: Dict[str, str]
schema_: FieldMetadata object at 0x7f2924f20560>]
max_cost_usd: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeMessage(*, role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any, content: str | None = None, content_array: List[LlmAsJudgeMessageContent] | None = None, string_content: bool | None = None, structured_content: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any
content: str | None
content_array: List[LlmAsJudgeMessageContent] | None
string_content: bool | None
structured_content: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeMessageContent(*, type: str, text: str | None = None, image_url: ImageUrl | None = None, video_url: VideoUrl | None = None, audio_url: AudioUrl | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
text: str | None
image_url: ImageUrl | None
video_url: VideoUrl | None
audio_url: AudioUrl | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeMessageContentPublic(*, type: str, text: str | None = None, image_url: ImageUrlPublic | None = None, video_url: VideoUrlPublic | None = None, audio_url: AudioUrlPublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
text: str | None
image_url: ImageUrlPublic | None
video_url: VideoUrlPublic | None
audio_url: AudioUrlPublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeMessageContentWrite(*, type: str, text: str | None = None, image_url: ImageUrlWrite | None = None, video_url: VideoUrlWrite | None = None, audio_url: AudioUrlWrite | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
text: str | None
image_url: ImageUrlWrite | None
video_url: VideoUrlWrite | None
audio_url: AudioUrlWrite | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeMessagePublic(*, role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any, content: str | None = None, content_array: List[LlmAsJudgeMessageContentPublic] | None = None, string_content: bool | None = None, structured_content: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any
content: str | None
content_array: List[LlmAsJudgeMessageContentPublic] | None
string_content: bool | None
structured_content: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeMessageWrite(*, role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any, content: str | None = None, content_array: List[LlmAsJudgeMessageContentWrite] | None = None, string_content: bool | None = None, structured_content: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

role: Literal['SYSTEM', 'USER', 'AI', 'TOOL_EXECUTION_RESULT', 'CUSTOM'] | Any
content: str | None
content_array: List[LlmAsJudgeMessageContentWrite] | None
string_content: bool | None
structured_content: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeModelParameters(*, name: str, temperature: float | None = None, seed: int | None = None, custom_parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
temperature: float | None
seed: int | None
custom_parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeModelParametersPublic(*, name: str, temperature: float | None = None, seed: int | None = None, custom_parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
temperature: float | None
seed: int | None
custom_parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeModelParametersWrite(*, name: str, temperature: float | None = None, seed: int | None = None, custom_parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
temperature: float | None
seed: int | None
custom_parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeOutputSchema(*, name: str, type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any, description: str, **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any
description: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeOutputSchemaPublic(*, name: str, type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any, description: str, **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any
description: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LlmAsJudgeOutputSchemaWrite(*, name: str, type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any, description: str, **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: Literal['BOOLEAN', 'INTEGER', 'DOUBLE'] | Any
description: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunner(*, id: str | None = None, name: str | None = None, project_id: str | None = None, status: Literal['pairing', 'connected', 'disconnected'] | Any | None = None, connected_at: datetime | None = None, agents: List[Agent] | None = None, capabilities: List[str] | None = None, checklist: Dict[str, Any | None] | None = None, type: Literal['connect', 'endpoint'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
project_id: str | None
status: Literal['pairing', 'connected', 'disconnected'] | Any | None
connected_at: datetime | None
agents: List[Agent] | None
capabilities: List[str] | None
checklist: Dict[str, Any | None] | None
type: Literal['connect', 'endpoint'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunnerHeartbeatResponse(*, cancelled_job_ids: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

cancelled_job_ids: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunnerJob(*, id: str | None = None, runner_id: str | None = None, agent_name: str | None = None, status: Literal['pending', 'running', 'completed', 'failed', 'cancelled'] | Any | None = None, inputs: Dict[str, Any | None] | None = None, result: Dict[str, Any | None] | None = None, error: str | None = None, project_id: str | None = None, trace_id: str | None = None, mask_id: str | None = None, prompt_masks: Dict[str, str] | None = None, blueprint_name: str | None = None, metadata: LocalRunnerJobMetadata | None = None, timeout: int | None = None, created_at: datetime | None = None, started_at: datetime | None = None, completed_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
runner_id: str | None
agent_name: str | None
status: Literal['pending', 'running', 'completed', 'failed', 'cancelled'] | Any | None
inputs: Dict[str, Any | None] | None
result: Dict[str, Any | None] | None
error: str | None
project_id: str | None
trace_id: str | None
mask_id: str | None

Deprecated. Use prompt_masks to read one or more mask overlays keyed by prompt id.

prompt_masks: Dict[str, str] | None

Mask overlays to apply during agent execution, keyed by prompt id.

blueprint_name: str | None
metadata: LocalRunnerJobMetadata | None
timeout: int | None
created_at: datetime | None
started_at: datetime | None
completed_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunnerJobMetadata(*, dataset_id: str | None = None, dataset_version_id: str | None = None, dataset_item_version_id: str | None = None, dataset_item_id: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

dataset_id: str | None
dataset_version_id: str | None
dataset_item_version_id: str | None
dataset_item_id: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunnerJobPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[LocalRunnerJob] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[LocalRunnerJob] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunnerLogEntry(*, stream: str, text: str, **extra_data: Any)

Bases: UniversalBaseModel

stream: str
text: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocalRunnerPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[LocalRunner] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[LocalRunner] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LockResponse(*, acquired: bool | None = None, item_id: str | None = None, locked_by: str | None = None, expires_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

acquired: bool | None
item_id: str | None
locked_by: str | None
expires_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LocksResponse(*, locks: Dict[str, ItemLockInfo] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

locks: Dict[str, ItemLockInfo] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LogItem(*, timestamp: datetime | None = None, rule_id: str | None = None, level: Literal['INFO', 'WARN', 'ERROR', 'DEBUG', 'TRACE'] | Any | None = None, message: str | None = None, markers: Dict[str, str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

timestamp: datetime | None
rule_id: str | None
level: Literal['INFO', 'WARN', 'ERROR', 'DEBUG', 'TRACE'] | Any | None
message: str | None
markers: Dict[str, str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LogPage(*, content: List[LogItem] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[LogItem] | None
page: int | None
size: int | None
total: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LogProb(*, token: str | None = None, logprob: float | None = None, bytes: List[int] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

token: str | None
logprob: float | None
bytes: List[int] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.LogProbs(*, content: List[LogProb] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[LogProb] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ManualEvaluationRequest(*, project_id: str, entity_ids: List[str], rule_ids: List[str], entity_type: Literal['trace', 'thread', 'span'] | Any, **extra_data: Any)

Bases: UniversalBaseModel

project_id: str

Project ID

entity_ids: List[str]

List of entity IDs (trace IDs or thread IDs) to evaluate

rule_ids: List[str]

List of automation rule IDs to apply

entity_type: Literal['trace', 'thread', 'span'] | Any

Type of entity to evaluate (trace or thread)

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ManualEvaluationResponse(*, entities_queued: int | None = None, rules_applied: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

entities_queued: int | None

Number of entities queued for evaluation

rules_applied: int | None

Number of rules that will be applied

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Message(*, role: str, content: Dict[str, Any | None], **extra_data: Any)

Bases: UniversalBaseModel

role: str
content: Dict[str, Any | None]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.MultipartUploadPart(*, e_tag: str, part_number: int, **extra_data: Any)

Bases: UniversalBaseModel

e_tag: str
part_number: int
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDefinition(*, details: NumericalFeedbackDetail | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: NumericalFeedbackDetail | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDefinitionCreate(*, details: NumericalFeedbackDetailCreate | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: NumericalFeedbackDetailCreate | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDefinitionPublic(*, details: NumericalFeedbackDetailPublic | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: NumericalFeedbackDetailPublic | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDefinitionUpdate(*, details: NumericalFeedbackDetailUpdate | None = None, **extra_data: Any)

Bases: UniversalBaseModel

details: NumericalFeedbackDetailUpdate | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDetail(*, max: float, min: float, **extra_data: Any)

Bases: UniversalBaseModel

max: float
min: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDetailCreate(*, max: float, min: float, **extra_data: Any)

Bases: UniversalBaseModel

max: float
min: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDetailPublic(*, max: float, min: float, **extra_data: Any)

Bases: UniversalBaseModel

max: float
min: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.NumericalFeedbackDetailUpdate(*, max: float, min: float, **extra_data: Any)

Bases: UniversalBaseModel

max: float
min: float
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OAuthError(*, error: str | None = None, error_description: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

error: str | None
error_description: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OllamaConnectionTestResponse(*, connected: bool | None = None, version: str | None = None, error_message: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Response from Ollama connection test.

connected: bool | None

Whether the connection was successful

version: str | None

Server version (returned even if connection failed or version is incompatible)

error_message: str | None

Error message if connection failed

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OllamaInstanceBaseUrlRequest(*, base_url: str, api_key: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Request with Ollama instance base URL for connection testing or model discovery.

base_url: str

Base URL of the Ollama instance. May include /v1 suffix which will be automatically removed for connection testing. For inference, use the URL with /v1 suffix for OpenAI-compatible endpoints.

api_key: str | None

Optional API key for authenticated Ollama instances. If provided, will be sent as Bearer token in Authorization header.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OllamaModel(*, name: str, size: int | None = None, digest: str | None = None, modified_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Ollama model information

name: str

Model name

size: int | None

Model size in bytes

digest: str | None

Model digest/hash

modified_at: datetime | None

Model modification date

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OllieReport(*, id: str | None = None, project_id: str | None = None, session_id: str | None = None, content: str | None = None, recommended_actions: Dict[str, Any | None] | None = None, status: Literal['pending', 'completed', 'failed'] | Any | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_id: str | None
session_id: str | None
content: str | None
recommended_actions: Dict[str, Any | None] | None
status: Literal['pending', 'completed', 'failed'] | Any | None
created_at: datetime | None
last_updated_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OllieReportPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[OllieReport] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[OllieReport] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Optimization(*, id: str | None = None, name: str | None = None, dataset_name: str, project_name: str | None = None, project_id: str | None = None, objective_name: str, status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, studio_config: OptimizationStudioConfig | None = None, error_info: ErrorInfo | None = None, dataset_id: str | None = None, num_trials: int | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, experiment_scores: List[FeedbackScoreAverage] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, baseline_objective_score: float | None = None, best_objective_score: float | None = None, baseline_duration: float | None = None, best_duration: float | None = None, baseline_cost: float | None = None, best_cost: float | None = None, total_optimization_cost: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
dataset_name: str
project_name: str | None

Project name. Creates project if it doesn’t exist. Ignored when project_id is provided.

project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

objective_name: str
status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
studio_config: OptimizationStudioConfig | None
error_info: ErrorInfo | None
dataset_id: str | None
num_trials: int | None
feedback_scores: List[FeedbackScoreAverage] | None
experiment_scores: List[FeedbackScoreAverage] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
baseline_objective_score: float | None
best_objective_score: float | None
baseline_duration: float | None
best_duration: float | None
baseline_cost: float | None
best_cost: float | None
total_optimization_cost: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[OptimizationPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924b0ef60>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[OptimizationPublic] | None
sortable_by: FieldMetadata object at 0x7f2924b0ef60>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationPublic(*, id: str | None = None, name: str | None = None, dataset_name: str, project_id: str | None = None, objective_name: str, status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, studio_config: OptimizationStudioConfigPublic | None = None, error_info: ErrorInfoPublic | None = None, dataset_id: str | None = None, num_trials: int | None = None, feedback_scores: List[FeedbackScoreAveragePublic] | None = None, experiment_scores: List[FeedbackScoreAveragePublic] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, baseline_objective_score: float | None = None, best_objective_score: float | None = None, baseline_duration: float | None = None, best_duration: float | None = None, baseline_cost: float | None = None, best_cost: float | None = None, total_optimization_cost: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
dataset_name: str
project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

objective_name: str
status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
studio_config: OptimizationStudioConfigPublic | None
error_info: ErrorInfoPublic | None
dataset_id: str | None
num_trials: int | None
feedback_scores: List[FeedbackScoreAveragePublic] | None
experiment_scores: List[FeedbackScoreAveragePublic] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
baseline_objective_score: float | None
best_objective_score: float | None
baseline_duration: float | None
best_duration: float | None
baseline_cost: float | None
best_cost: float | None
total_optimization_cost: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationStudioConfig(*, dataset_name: str, prompt: StudioPrompt, llm_model: StudioLlmModel, evaluation: StudioEvaluation, optimizer: StudioOptimizer, **extra_data: Any)

Bases: UniversalBaseModel

dataset_name: str
prompt: StudioPrompt
llm_model: StudioLlmModel
evaluation: StudioEvaluation
optimizer: StudioOptimizer
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationStudioConfigPublic(*, dataset_name: str, prompt: StudioPromptPublic, llm_model: StudioLlmModelPublic, evaluation: StudioEvaluationPublic, optimizer: StudioOptimizerPublic, **extra_data: Any)

Bases: UniversalBaseModel

dataset_name: str
prompt: StudioPromptPublic
llm_model: StudioLlmModelPublic
evaluation: StudioEvaluationPublic
optimizer: StudioOptimizerPublic
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationStudioConfigWrite(*, dataset_name: str, prompt: StudioPromptWrite, llm_model: StudioLlmModelWrite, evaluation: StudioEvaluationWrite, optimizer: StudioOptimizerWrite, **extra_data: Any)

Bases: UniversalBaseModel

dataset_name: str
prompt: StudioPromptWrite
llm_model: StudioLlmModelWrite
evaluation: StudioEvaluationWrite
optimizer: StudioOptimizerWrite
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationStudioLog(*, url: str | None = None, last_modified: datetime | None = None, expires_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

url: str | None
last_modified: datetime | None
expires_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.OptimizationWrite(*, id: str | None = None, name: str | None = None, dataset_name: str, project_name: str | None = None, project_id: str | None = None, objective_name: str, status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, studio_config: OptimizationStudioConfigWrite | None = None, error_info: ErrorInfoWrite | None = None, last_updated_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
dataset_name: str
project_name: str | None

Project name. Creates project if it doesn’t exist. Ignored when project_id is provided.

project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

objective_name: str
status: Literal['running', 'completed', 'cancelled', 'initialized', 'error'] | Any
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
studio_config: OptimizationStudioConfigWrite | None
error_info: ErrorInfoWrite | None
last_updated_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PageColumns(*, columns: List[Column] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

columns: List[Column] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Param(*, name: str, type: str, presence: Literal['required', 'optional'] | Any | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str
type: str
presence: Literal['required', 'optional'] | Any | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PercentageValueStatPublic(*, value: PercentageValuesPublic | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: PercentageValuesPublic | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PercentageValues(*, p50: float | None = None, p90: float | None = None, p99: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

p50: float | None
p90: float | None
p99: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PercentageValuesDetailed(*, p50: float | None = None, p90: float | None = None, p99: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

p50: float | None
p90: float | None
p99: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PercentageValuesPublic(*, p50: float | None = None, p90: float | None = None, p99: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

p50: float | None
p90: float | None
p99: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Permission(*, permission_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f292473cb90>]=None, permission_value: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29247b4d40>]=None, **extra_data: Any)

Bases: UniversalBaseModel

permission_name: FieldMetadata object at 0x7f292473cb90>]
permission_value: FieldMetadata object at 0x7f29247b4d40>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectDetailed(*, id: str | None = None, name: str, visibility: Literal['private', 'public'] | Any | None = None, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, last_updated_trace_at: datetime | None = None, feedback_scores: List[FeedbackScoreAverageDetailed] | None = None, duration: PercentageValuesDetailed | None = None, total_estimated_cost: float | None = None, total_estimated_cost_sum: float | None = None, usage: Dict[str, float] | None = None, trace_count: int | None = None, thread_count: int | None = None, guardrails_failed_count: int | None = None, error_count: ErrorCountWithDeviationDetailed | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
visibility: Literal['private', 'public'] | Any | None
description: str | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
last_updated_trace_at: datetime | None
feedback_scores: List[FeedbackScoreAverageDetailed] | None
duration: PercentageValuesDetailed | None
total_estimated_cost: float | None
total_estimated_cost_sum: float | None
usage: Dict[str, float] | None
trace_count: int | None
thread_count: int | None
guardrails_failed_count: int | None
error_count: ErrorCountWithDeviationDetailed | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectMetricResponsePublic(*, project_id: str | None = None, metric_type: Literal['FEEDBACK_SCORES', 'TRACE_COUNT', 'TOKEN_USAGE', 'DURATION', 'COST', 'GUARDRAILS_FAILED_COUNT', 'THREAD_COUNT', 'THREAD_DURATION', 'THREAD_FEEDBACK_SCORES', 'SPAN_FEEDBACK_SCORES', 'SPAN_COUNT', 'SPAN_DURATION', 'SPAN_TOKEN_USAGE', 'TRACE_AVERAGE_DURATION', 'TRACE_ERROR_RATE', 'SPAN_AVERAGE_DURATION', 'SPAN_COST', 'SPAN_ERROR_RATE', 'THREAD_AVERAGE_DURATION', 'THREAD_COST'] | Any | None = None, interval: Literal['HOURLY', 'DAILY', 'WEEKLY', 'TOTAL'] | Any | None = None, results: List[ResultsNumberPublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_id: str | None
metric_type: Literal['FEEDBACK_SCORES', 'TRACE_COUNT', 'TOKEN_USAGE', 'DURATION', 'COST', 'GUARDRAILS_FAILED_COUNT', 'THREAD_COUNT', 'THREAD_DURATION', 'THREAD_FEEDBACK_SCORES', 'SPAN_FEEDBACK_SCORES', 'SPAN_COUNT', 'SPAN_DURATION', 'SPAN_TOKEN_USAGE', 'TRACE_AVERAGE_DURATION', 'TRACE_ERROR_RATE', 'SPAN_AVERAGE_DURATION', 'SPAN_COST', 'SPAN_ERROR_RATE', 'THREAD_AVERAGE_DURATION', 'THREAD_COST'] | Any | None
interval: Literal['HOURLY', 'DAILY', 'WEEKLY', 'TOTAL'] | Any | None
results: List[ResultsNumberPublic] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[ProjectPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f292487f650>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[ProjectPublic] | None
sortable_by: FieldMetadata object at 0x7f292487f650>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectPublic(*, id: str | None = None, name: str, visibility: Literal['private', 'public'] | Any | None = None, description: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, last_updated_trace_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
visibility: Literal['private', 'public'] | Any | None
description: str | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
last_updated_trace_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectReference(*, project_id: str, project_name: str, **extra_data: Any)

Bases: UniversalBaseModel

Project reference with ID and name

project_id: str

Project ID

project_name: str

Project name

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectReferencePublic(*, project_id: str, project_name: str, **extra_data: Any)

Bases: UniversalBaseModel

Project reference with ID and name

project_id: str

Project ID

project_name: str

Project name

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectStatItemObjectPublic_Avg(*, name: str | None = None, type: Literal['AVG'] = 'AVG', value: float | None = None, **extra_data: Any)

Bases: Base

type: Literal['AVG']
value: Optional[float]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectStatItemObjectPublic_Count(*, name: str | None = None, type: Literal['COUNT'] = 'COUNT', value: int | None = None, **extra_data: Any)

Bases: Base

type: Literal['COUNT']
value: Optional[int]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectStatItemObjectPublic_Percentage(*, name: str | None = None, type: Literal['PERCENTAGE'] = 'PERCENTAGE', value: PercentageValuesPublic | None = None, **extra_data: Any)

Bases: Base

type: Literal['PERCENTAGE']
value: Optional[PercentageValuesPublic]
model_config: ClassVar[pydantic.ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectStatsPublic(*, stats: List[ProjectStatItemObjectPublic_Percentage | ProjectStatItemObjectPublic_Count | ProjectStatItemObjectPublic_Avg] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

stats: List[ProjectStatItemObjectPublic_Percentage | ProjectStatItemObjectPublic_Count | ProjectStatItemObjectPublic_Avg] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectStatsSummary(*, content: List[ProjectStatsSummaryItem] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[ProjectStatsSummaryItem] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProjectStatsSummaryItem(*, project_id: str | None = None, feedback_scores: List[FeedbackScoreAverage] | None = None, duration: PercentageValues | None = None, total_estimated_cost: float | None = None, total_estimated_cost_sum: float | None = None, usage: Dict[str, float] | None = None, trace_count: int | None = None, thread_count: int | None = None, guardrails_failed_count: int | None = None, error_count: ErrorCountWithDeviation | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_id: str | None
feedback_scores: List[FeedbackScoreAverage] | None
duration: PercentageValues | None
total_estimated_cost: float | None
total_estimated_cost_sum: float | None
usage: Dict[str, float] | None
trace_count: int | None
thread_count: int | None
guardrails_failed_count: int | None
error_count: ErrorCountWithDeviation | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptDetail(*, id: str | None = None, name: str, project_id: str | None = None, description: str | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, tags: List[str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, version_count: int | None = None, latest_version: PromptVersionDetail | None = None, requested_version: PromptVersionDetail | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

description: str | None
template_structure: Literal['text', 'chat'] | Any | None

‘text’ or ‘chat’. Immutable after creation.

Type:

Template structure type

tags: List[str] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
version_count: int | None
latest_version: PromptVersionDetail | None
requested_version: PromptVersionDetail | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[PromptPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29248d8800>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[PromptPublic] | None
sortable_by: FieldMetadata object at 0x7f29248d8800>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptPublic(*, id: str | None = None, name: str, project_id: str | None = None, description: str | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, tags: List[str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, version_count: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
project_id: str | None

Project ID. Takes precedence over project_name when both are provided.

description: str | None
template_structure: Literal['text', 'chat'] | Any | None

‘text’ or ‘chat’. Immutable after creation.

Type:

Template structure type

tags: List[str] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
version_count: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptTokensDetails(*, cached_tokens: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

cached_tokens: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVariant(*, model: str, messages: List[Message], configs: Dict[str, Dict[str, Any | None]] | None = None, prompt_versions: List[PromptVersionLink] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

model: str
messages: List[Message]
configs: Dict[str, Dict[str, Any | None]] | None
prompt_versions: List[PromptVersionLink] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersion(*, id: str | None = None, prompt_id: str | None = None, commit: str | None = None, version_number: str | None = None, template: str, metadata: Dict[str, Any | None] | None = None, type: Literal['mustache', 'jinja2', 'python'] | Any | None = None, version_type: Literal['prompt_version', 'mask'] | Any | None = None, environment: str | None = None, environments: List[str] | None = None, change_description: str | None = None, tags: List[str] | None = None, variables: List[str] | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

version unique identifier, generated if absent

prompt_id: str | None
commit: str | None

version short unique identifier, generated if absent. it must be 8 characters long

version_number: str | None

sequential version number in the format v<N>; null for masks

template: str
metadata: Dict[str, Any | None] | None
type: Literal['mustache', 'jinja2', 'python'] | Any | None
version_type: Literal['prompt_version', 'mask'] | Any | None

version type discriminator; defaults to prompt_version

environment: str | None

use ‘environments’ instead

Type:

Deprecated

environments: List[str] | None
change_description: str | None
tags: List[str] | None
variables: List[str] | None
template_structure: Literal['text', 'chat'] | Any | None
created_at: datetime | None
created_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersionDetail(*, id: str | None = None, prompt_id: str | None = None, commit: str | None = None, version_number: str | None = None, template: str, metadata: Dict[str, Any | None] | None = None, type: Literal['mustache', 'jinja2', 'python'] | Any | None = None, version_type: Literal['prompt_version', 'mask'] | Any | None = None, environment: str | None = None, environments: List[str] | None = None, change_description: str | None = None, tags: List[str] | None = None, variables: List[str] | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

version unique identifier, generated if absent

prompt_id: str | None
commit: str | None

version short unique identifier, generated if absent. it must be 8 characters long

version_number: str | None

sequential version number in the format v<N>; null for masks

template: str
metadata: Dict[str, Any | None] | None
type: Literal['mustache', 'jinja2', 'python'] | Any | None
version_type: Literal['prompt_version', 'mask'] | Any | None

version type discriminator; defaults to prompt_version

environment: str | None

use ‘environments’ instead

Type:

Deprecated

environments: List[str] | None
change_description: str | None
tags: List[str] | None
variables: List[str] | None
template_structure: Literal['text', 'chat'] | Any | None
created_at: datetime | None
created_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Bases: UniversalBaseModel

id: str
commit: str | None
version_number: str | None

sequential version number in the format v<N>; null for masks

prompt_id: str | None
prompt_name: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersionLinkPublic(*, prompt_version_id: str | None = None, commit: str | None = None, prompt_id: str | None = None, prompt_name: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

prompt_version_id: str | None
commit: str | None
prompt_id: str | None
prompt_name: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersionLinkWrite(*, id: str, **extra_data: Any)

Bases: UniversalBaseModel

id: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersionPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[PromptVersionPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29247b5670>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[PromptVersionPublic] | None
sortable_by: FieldMetadata object at 0x7f29247b5670>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersionPublic(*, id: str | None = None, prompt_id: str | None = None, commit: str | None = None, version_number: str | None = None, template: str, metadata: Dict[str, Any | None] | None = None, type: Literal['mustache', 'jinja2', 'python'] | Any | None = None, version_type: Literal['prompt_version', 'mask'] | Any | None = None, environment: str | None = None, environments: List[str] | None = None, change_description: str | None = None, tags: List[str] | None = None, template_structure: Literal['text', 'chat'] | Any | None = None, created_at: datetime | None = None, created_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None

version unique identifier, generated if absent

prompt_id: str | None
commit: str | None

version short unique identifier, generated if absent. it must be 8 characters long

version_number: str | None

sequential version number in the format v<N>; null for masks

template: str
metadata: Dict[str, Any | None] | None
type: Literal['mustache', 'jinja2', 'python'] | Any | None
version_type: Literal['prompt_version', 'mask'] | Any | None

version type discriminator; defaults to prompt_version

environment: str | None

use ‘environments’ instead

Type:

Deprecated

environments: List[str] | None
change_description: str | None
tags: List[str] | None
template_structure: Literal['text', 'chat'] | Any | None
created_at: datetime | None
created_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.PromptVersionUpdate(*, tags: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Update to apply to prompt versions. Note: Prompt versions are immutable by design. Only organizational properties (such as tags etc.) can be updated. Core properties like template, metadata etc. cannot be modified after creation.

tags: List[str] | None

Tags to set or merge with existing tags. Follows PATCH semantics: - If merge_tags is true, these tags will be added to existing tags. - If merge_tags is false, these tags will replace all existing tags. - null: preserve existing tags (no change). - empty set: clear all tags when merge_tags is false.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProviderApiKey(*, id: str | None = None, provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any, api_key: str | None = None, name: str | None = None, provider_name: str | None = None, headers: Dict[str, str] | None = None, configuration: Dict[str, str] | None = None, base_url: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, read_only: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any
api_key: str | None
name: str | None
provider_name: str | None

Provider name - required for custom LLM and Bedrock providers to uniquely identify them (e.g., ‘ollama’, ‘vllm’, ‘Bedrock us-east-1’). Must not be blank for custom and Bedrock providers. Should not be set for standard providers (OpenAI, Anthropic, etc.). This requirement is conditional and validation is enforced programmatically.

headers: Dict[str, str] | None
configuration: Dict[str, str] | None
base_url: str | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
read_only: bool | None

If true, this provider is system-managed and cannot be edited or deleted

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProviderApiKeyPagePublic(*, size: int | None = None, total: int | None = None, content: List[ProviderApiKeyPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29247b7110>]=None, **extra_data: Any)

Bases: UniversalBaseModel

size: int | None
total: int | None
content: List[ProviderApiKeyPublic] | None
sortable_by: FieldMetadata object at 0x7f29247b7110>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ProviderApiKeyPublic(*, id: str | None = None, provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any, api_key: str | None = None, name: str | None = None, provider_name: str | None = None, headers: Dict[str, str] | None = None, configuration: Dict[str, str] | None = None, base_url: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, read_only: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
provider: Literal['openai', 'anthropic', 'gemini', 'openrouter', 'vertex-ai', 'bedrock', 'ollama', 'custom-llm', 'opik-free'] | Any
api_key: str | None
name: str | None
provider_name: str | None

Provider name - required for custom LLM and Bedrock providers to uniquely identify them (e.g., ‘ollama’, ‘vllm’, ‘Bedrock us-east-1’). Must not be blank for custom and Bedrock providers. Should not be set for standard providers (OpenAI, Anthropic, etc.). This requirement is conditional and validation is enforced programmatically.

headers: Dict[str, str] | None
configuration: Dict[str, str] | None
base_url: str | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
read_only: bool | None

If true, this provider is system-managed and cannot be edited or deleted

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.RecentActivityItemPublic(*, type: Literal['trace_daily', 'experiment', 'dataset_version', 'test_suite_version', 'alert_event', 'optimization', 'prompt_version'] | Any | None = None, id: str | None = None, name: str | None = None, resource_id: str | None = None, created_by: str | None = None, created_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: Literal['trace_daily', 'experiment', 'dataset_version', 'test_suite_version', 'alert_event', 'optimization', 'prompt_version'] | Any | None
id: str | None
name: str | None
resource_id: str | None
created_by: str | None
created_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.RecentActivityPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[RecentActivityItemPublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[RecentActivityItemPublic] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ReportFailure(*, id: str | None = None, type: Literal['agent_insights'] | Any, project_id: str, reason: str, detail: str | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
type: Literal['agent_insights'] | Any
project_id: str
reason: str
detail: str | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ReportFailurePage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[ReportFailure] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[ReportFailure] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ReportPreference(*, project_id: str | None = None, enabled: bool | None = None, schedule_time: str | None = None, custom_prompt: str | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_id: str | None
enabled: bool | None
schedule_time: str | None
custom_prompt: str | None
created_at: datetime | None
last_updated_at: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ReportedIssue(*, id: str | None = None, name: str, description: str | None = None, cause: str | None = None, suggested_fix: str | None = None, traces_query: str | None = None, severity: Literal['critical', 'high', 'medium', 'low'] | Any, count: int, total_count: int, users_impacted: int, total_users: int, metadata: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str
description: str | None
cause: str | None
suggested_fix: str | None
traces_query: str | None
severity: Literal['critical', 'high', 'medium', 'low'] | Any
count: int
total_count: int
users_impacted: int
total_users: int
metadata: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ResponseFormat(*, type: Literal['text', 'json_object', 'json_schema'] | Any | None = None, json_schema: JsonSchema | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: Literal['text', 'json_object', 'json_schema'] | Any | None
json_schema: JsonSchema | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Result(*, name: str | None = None, current: float | None = None, previous: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
current: float | None
previous: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ResultsNumberPublic(*, name: str | None = None, data: List[DataPointNumberPublic] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
data: List[DataPointNumberPublic] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.RetentionRulePagePublic(*, content: List[RetentionRulePublic] | None = None, page: int | None = None, size: int | None = None, total: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

content: List[RetentionRulePublic] | None
page: int | None
size: int | None
total: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.RetentionRulePublic(*, id: str | None = None, workspace_id: str | None = None, project_id: str | None = None, level: Literal['organization', 'workspace', 'project'] | Any | None = None, retention: Literal['short_14d', 'base_60d', 'extended_400d', 'unlimited'] | Any, apply_to_past: bool | None = None, enabled: bool | None = None, created_by: str | None = None, created_at: datetime | None = None, last_updated_by: str | None = None, last_updated_at: datetime | None = None, catch_up_cursor: str | None = None, catch_up_done: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
workspace_id: str | None
project_id: str | None
level: Literal['organization', 'workspace', 'project'] | Any | None

Computed from projectId and organizationLevel

retention: Literal['short_14d', 'base_60d', 'extended_400d', 'unlimited'] | Any
apply_to_past: bool | None
enabled: bool | None
created_by: str | None
created_at: datetime | None
last_updated_by: str | None
last_updated_at: datetime | None
catch_up_cursor: str | None

Current position of historical data cleanup

catch_up_done: bool | None

Whether historical catch-up is complete

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ScoreName(*, name: str | None = None, type: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
type: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ScoreNamePublic(*, name: str | None = None, type: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

name: str | None
type: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ServiceTogglesConfig(*, python_evaluator_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924818b00>], trace_thread_python_evaluator_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4080>], span_llm_as_judge_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4200>], span_user_defined_metric_python_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4470>], guardrails_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4380>], opik_ai_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a44d0>], alerts_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4590>], welcome_wizard_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4620>], export_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a46b0>], cost_intelligence_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4740>], dataset_versioning_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a47d0>], dataset_export_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4860>], demo_data_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a48f0>], openai_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4980>], anthropic_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4a10>], gemini_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4aa0>], openrouter_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4b30>], vertexai_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4bc0>], bedrock_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4c50>], customllm_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4ce0>], ollama_provider_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4d70>], ollie_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4e00>], project_homepage_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4e90>], agentic_tools_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4f20>], online_scoring_tracing_enabled: ~typing.Annotated[bool, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a4fb0>], default_page_size: ~typing.Annotated[int | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a5040>] = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

python_evaluator_enabled: FieldMetadata object at 0x7f2924818b00>]
trace_thread_python_evaluator_enabled: FieldMetadata object at 0x7f29246a4080>]
span_llm_as_judge_enabled: FieldMetadata object at 0x7f29246a4200>]
span_user_defined_metric_python_enabled: FieldMetadata object at 0x7f29246a4470>]
guardrails_enabled: FieldMetadata object at 0x7f29246a4380>]
opik_ai_enabled: FieldMetadata object at 0x7f29246a44d0>]
alerts_enabled: FieldMetadata object at 0x7f29246a4590>]
welcome_wizard_enabled: FieldMetadata object at 0x7f29246a4620>]
export_enabled: FieldMetadata object at 0x7f29246a46b0>]
cost_intelligence_enabled: FieldMetadata object at 0x7f29246a4740>]
dataset_versioning_enabled: FieldMetadata object at 0x7f29246a47d0>]
dataset_export_enabled: FieldMetadata object at 0x7f29246a4860>]
demo_data_enabled: FieldMetadata object at 0x7f29246a48f0>]
openai_provider_enabled: FieldMetadata object at 0x7f29246a4980>]
anthropic_provider_enabled: FieldMetadata object at 0x7f29246a4a10>]
gemini_provider_enabled: FieldMetadata object at 0x7f29246a4aa0>]
openrouter_provider_enabled: FieldMetadata object at 0x7f29246a4b30>]
vertexai_provider_enabled: FieldMetadata object at 0x7f29246a4bc0>]
bedrock_provider_enabled: FieldMetadata object at 0x7f29246a4c50>]
customllm_provider_enabled: FieldMetadata object at 0x7f29246a4ce0>]
ollama_provider_enabled: FieldMetadata object at 0x7f29246a4d70>]
ollie_enabled: FieldMetadata object at 0x7f29246a4e00>]
project_homepage_enabled: FieldMetadata object at 0x7f29246a4e90>]
agentic_tools_enabled: FieldMetadata object at 0x7f29246a4f20>]
online_scoring_tracing_enabled: FieldMetadata object at 0x7f29246a4fb0>]
default_page_size: FieldMetadata object at 0x7f29246a5040>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanBatch(*, spans: List[Span], **extra_data: Any)

Bases: UniversalBaseModel

spans: List[Span]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanEnrichmentOptions(*, include_tags: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29247b7170>]=None, include_feedback_scores: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a5220>]=None, include_comments: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a5ac0>]=None, include_usage: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a52b0>]=None, include_metadata: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29246a59a0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

Options for enriching span data

include_tags: FieldMetadata object at 0x7f29247b7170>]
include_feedback_scores: FieldMetadata object at 0x7f29246a5220>]
include_comments: FieldMetadata object at 0x7f29246a5ac0>]
include_usage: FieldMetadata object at 0x7f29246a52b0>]
include_metadata: FieldMetadata object at 0x7f29246a59a0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanExperimentItemBulkWriteView(*, id: str | None = None, parent_span_id: str | None = None, name: str | None = None, type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, usage: Dict[str, int] | None = None, error_info: ErrorInfoExperimentItemBulkWriteView | None = None, last_updated_at: datetime | None = None, total_estimated_cost: float | None = None, total_estimated_cost_version: str | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
parent_span_id: str | None
name: str | None
type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None
start_time: datetime
end_time: datetime | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
model: str | None
provider: str | None
tags: List[str] | None
usage: Dict[str, int] | None
error_info: ErrorInfoExperimentItemBulkWriteView | None
last_updated_at: datetime | None
total_estimated_cost: float | None
total_estimated_cost_version: str | None
ttft: float | None

Time to first token in milliseconds

source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanFilterPublic(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanFilterWrite(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanLlmAsJudgeCode(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters.LlmAsJudgeModelParameters, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message.LlmAsJudgeMessage], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema.LlmAsJudgeOutputSchema], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2925172f30>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParameters
messages: List[LlmAsJudgeMessage]
variables: Dict[str, str]
schema_: FieldMetadata object at 0x7f2925172f30>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanLlmAsJudgeCodePublic(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_public.LlmAsJudgeModelParametersPublic, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_public.LlmAsJudgeMessagePublic], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_public.LlmAsJudgeOutputSchemaPublic], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2925229af0>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParametersPublic
messages: List[LlmAsJudgeMessagePublic]
variables: Dict[str, str]
schema_: FieldMetadata object at 0x7f2925229af0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanLlmAsJudgeCodeWrite(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_write.LlmAsJudgeModelParametersWrite, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_write.LlmAsJudgeMessageWrite], variables: ~typing.Dict[str, str], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_write.LlmAsJudgeOutputSchemaWrite], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2925007d70>], **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParametersWrite
messages: List[LlmAsJudgeMessageWrite]
variables: Dict[str, str]
schema_: FieldMetadata object at 0x7f2925007d70>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanPagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[SpanPublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29248dbe60>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[SpanPublic] | None
sortable_by: FieldMetadata object at 0x7f29248dbe60>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanUpdate(*, project_name: str | None = None, project_id: str | None = None, trace_id: str, parent_span_id: str | None = None, name: str | None = None, type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None = None, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, usage: Dict[str, int] | None = None, total_estimated_cost: float | None = None, error_info: ErrorInfo | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_name: str | None

If null and project_id not specified, Default Project is assumed

project_id: str | None

If null and project_name not specified, Default Project is assumed

trace_id: str
parent_span_id: str | None
name: str | None
type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None
end_time: datetime | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
model: str | None
provider: str | None
tags: List[str] | None

Tags

tags_to_add: List[str] | None

Tags to add

tags_to_remove: List[str] | None

Tags to remove

usage: Dict[str, int] | None
total_estimated_cost: float | None
error_info: ErrorInfo | None
ttft: float | None
source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanUserDefinedMetricPythonCode(*, metric: str, arguments: Dict[str, str], **extra_data: Any)

Bases: UniversalBaseModel

metric: str
arguments: Dict[str, str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanUserDefinedMetricPythonCodePublic(*, metric: str, arguments: Dict[str, str], **extra_data: Any)

Bases: UniversalBaseModel

metric: str
arguments: Dict[str, str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanUserDefinedMetricPythonCodeWrite(*, metric: str, arguments: Dict[str, str], **extra_data: Any)

Bases: UniversalBaseModel

metric: str
arguments: Dict[str, str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpanWrite(*, id: str | None = None, project_name: str | None = None, trace_id: str | None = None, parent_span_id: str | None = None, name: str | None = None, type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, usage: Dict[str, int] | None = None, error_info: ErrorInfoWrite | None = None, last_updated_at: datetime | None = None, total_estimated_cost: float | None = None, total_estimated_cost_version: str | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_name: str | None

If null, the default project is used

trace_id: str | None
parent_span_id: str | None
name: str | None
type: Literal['general', 'tool', 'llm', 'guardrail'] | Any | None
start_time: datetime
end_time: datetime | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
model: str | None
provider: str | None
tags: List[str] | None
usage: Dict[str, int] | None
error_info: ErrorInfoWrite | None
last_updated_at: datetime | None
total_estimated_cost: float | None
total_estimated_cost_version: str | None
ttft: float | None

Time to first token in milliseconds

source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.SpansCountResponse(*, workspaces_spans_count: List[WorkspaceSpansCount] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspaces_spans_count: List[WorkspaceSpansCount] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StartMultipartUploadResponse(*, upload_id: str, pre_sign_urls: List[str], **extra_data: Any)

Bases: UniversalBaseModel

upload_id: str
pre_sign_urls: List[str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StreamOptions(*, include_usage: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

include_usage: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioEvaluation(*, metrics: List[StudioMetric], **extra_data: Any)

Bases: UniversalBaseModel

metrics: List[StudioMetric]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioEvaluationPublic(*, metrics: List[StudioMetricPublic], **extra_data: Any)

Bases: UniversalBaseModel

metrics: List[StudioMetricPublic]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioEvaluationWrite(*, metrics: List[StudioMetricWrite], **extra_data: Any)

Bases: UniversalBaseModel

metrics: List[StudioMetricWrite]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioLlmModel(*, model: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

model: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioLlmModelPublic(*, model: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

model: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioLlmModelWrite(*, model: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

model: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioMessage(*, role: str, content: str, **extra_data: Any)

Bases: UniversalBaseModel

role: str
content: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioMessagePublic(*, role: str, content: str, **extra_data: Any)

Bases: UniversalBaseModel

role: str
content: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioMessageWrite(*, role: str, content: str, **extra_data: Any)

Bases: UniversalBaseModel

role: str
content: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioMetric(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioMetricPublic(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioMetricWrite(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioOptimizer(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioOptimizerPublic(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioOptimizerWrite(*, type: str, parameters: Dict[str, Any | None] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: str
parameters: Dict[str, Any | None] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioPrompt(*, messages: List[StudioMessage], **extra_data: Any)

Bases: UniversalBaseModel

messages: List[StudioMessage]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioPromptPublic(*, messages: List[StudioMessagePublic], **extra_data: Any)

Bases: UniversalBaseModel

messages: List[StudioMessagePublic]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.StudioPromptWrite(*, messages: List[StudioMessageWrite], **extra_data: Any)

Bases: UniversalBaseModel

messages: List[StudioMessageWrite]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TokenResponse(*, access_token: str | None = None, refresh_token: str | None = None, token_type: str | None = None, expires_in: int | None = None, workspace_id: str | None = None, workspace_name: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

access_token: str | None
refresh_token: str | None
token_type: str | None
expires_in: int | None
workspace_id: str | None
workspace_name: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TokenUsageNames(*, names: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

names: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Tool(*, type: Literal['function'] | Any | None = None, function: Function | None = None, **extra_data: Any)

Bases: UniversalBaseModel

type: Literal['function'] | Any | None
function: Function | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ToolCall(*, id: str | None = None, index: int | None = None, type: Literal['function'] | Any | None = None, function: FunctionCall | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
index: int | None
type: Literal['function'] | Any | None
function: FunctionCall | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceBatch(*, traces: List[Trace], **extra_data: Any)

Bases: UniversalBaseModel

traces: List[Trace]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceCountResponse(*, workspaces_traces_count: List[WorkspaceTraceCount] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspaces_traces_count: List[WorkspaceTraceCount] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceEnrichmentOptions(*, include_spans: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f292462b980>]=None, include_tags: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924704440>]=None, include_feedback_scores: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924704770>]=None, include_comments: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924704500>]=None, include_usage: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924704740>]=None, include_metadata: Annotated[bool | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29247047d0>]=None, **extra_data: Any)

Bases: UniversalBaseModel

Options for enriching trace data

include_spans: FieldMetadata object at 0x7f292462b980>]
include_tags: FieldMetadata object at 0x7f2924704440>]
include_feedback_scores: FieldMetadata object at 0x7f2924704770>]
include_comments: FieldMetadata object at 0x7f2924704500>]
include_usage: FieldMetadata object at 0x7f2924704740>]
include_metadata: FieldMetadata object at 0x7f29247047d0>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceExperimentItemBulkWriteView(*, id: str | None = None, project_name: str | None = None, name: str | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, error_info: ErrorInfoExperimentItemBulkWriteView | None = None, last_updated_at: datetime | None = None, ttft: float | None = None, thread_id: str | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

Please provide either none, only one of evaluate_task_result or trace, but never both

id: str | None
project_name: str | None

If null, the default project is used

name: str | None
start_time: datetime
end_time: datetime | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
tags: List[str] | None
error_info: ErrorInfoExperimentItemBulkWriteView | None
last_updated_at: datetime | None
ttft: float | None

Time to first token in milliseconds

thread_id: str | None
source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceFilterPublic(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceFilterWrite(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TracePagePublic(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[TracePublic] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29247b4890>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[TracePublic] | None
sortable_by: FieldMetadata object at 0x7f29247b4890>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThread(*, id: str | None = None, project_id: str | None = None, thread_model_id: str | None = None, start_time: datetime | None = None, end_time: datetime | None = None, duration: float | None = None, first_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, last_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, feedback_scores: List[FeedbackScore] | None = None, status: Literal['active', 'inactive'] | Any | None = None, number_of_messages: int | None = None, total_estimated_cost: float | None = None, usage: Dict[str, int] | None = None, comments: List[Comment] | None = None, tags: List[str] | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, created_by: str | None = None, created_at: datetime | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_id: str | None
thread_model_id: str | None
start_time: datetime | None
end_time: datetime | None
duration: float | None
first_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
last_message: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
feedback_scores: List[FeedbackScore] | None
status: Literal['active', 'inactive'] | Any | None
number_of_messages: int | None
total_estimated_cost: float | None
usage: Dict[str, int] | None
comments: List[Comment] | None
tags: List[str] | None
last_updated_at: datetime | None
last_updated_by: str | None
created_by: str | None
created_at: datetime | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadFilter(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadFilterPublic(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadFilterWrite(*, field: str | None = None, operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None = None, key: str | None = None, value: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

field: str | None
operator: Literal['contains', 'not_contains', 'starts_with', 'ends_with', '=', '!=', '>', '>=', '<', '<=', 'is_empty', 'is_not_empty', 'in', 'not_in'] | Any | None
key: str | None
value: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadIdentifier(*, project_name: str | None = None, project_id: str | None = None, thread_id: str, truncate: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_name: str | None
project_id: str | None
thread_id: str
truncate: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadLlmAsJudgeCode(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters.LlmAsJudgeModelParameters, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message.LlmAsJudgeMessage], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema.LlmAsJudgeOutputSchema], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29251703b0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParameters
messages: List[LlmAsJudgeMessage]
schema_: FieldMetadata object at 0x7f29251703b0>]
max_cost_usd: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadLlmAsJudgeCodePublic(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_public.LlmAsJudgeModelParametersPublic, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_public.LlmAsJudgeMessagePublic], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_public.LlmAsJudgeOutputSchemaPublic], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924f2b3e0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParametersPublic
messages: List[LlmAsJudgeMessagePublic]
schema_: FieldMetadata object at 0x7f2924f2b3e0>]
max_cost_usd: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadLlmAsJudgeCodeWrite(*, model: ~opik.rest_api.types.llm_as_judge_model_parameters_write.LlmAsJudgeModelParametersWrite, messages: ~typing.List[~opik.rest_api.types.llm_as_judge_message_write.LlmAsJudgeMessageWrite], schema_: ~typing.Annotated[~typing.List[~opik.rest_api.types.llm_as_judge_output_schema_write.LlmAsJudgeOutputSchemaWrite], <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924e9cce0>], max_cost_usd: float | None = None, **extra_data: ~typing.Any)

Bases: UniversalBaseModel

model: LlmAsJudgeModelParametersWrite
messages: List[LlmAsJudgeMessageWrite]
schema_: FieldMetadata object at 0x7f2924e9cce0>]
max_cost_usd: float | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadPage(*, page: int | None = None, size: int | None = None, total: int | None = None, content: List[TraceThread] | None = None, sortable_by: List[str] | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924629700>]=None, **extra_data: Any)

Bases: UniversalBaseModel

page: int | None
size: int | None
total: int | None
content: List[TraceThread] | None
sortable_by: FieldMetadata object at 0x7f2924629700>]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadUpdate(*, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

tags: List[str] | None
tags_to_add: List[str] | None
tags_to_remove: List[str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadUserDefinedMetricPythonCode(*, metric: str, **extra_data: Any)

Bases: UniversalBaseModel

metric: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadUserDefinedMetricPythonCodePublic(*, metric: str, **extra_data: Any)

Bases: UniversalBaseModel

metric: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceThreadUserDefinedMetricPythonCodeWrite(*, metric: str, **extra_data: Any)

Bases: UniversalBaseModel

metric: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceUpdate(*, project_name: str | None = None, project_id: str | None = None, name: str | None = None, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, tags_to_add: List[str] | None = None, tags_to_remove: List[str] | None = None, error_info: ErrorInfo | None = None, thread_id: str | None = None, ttft: float | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_name: str | None

If null and project_id not specified, Default Project is assumed

project_id: str | None

If null and project_name not specified, Default Project is assumed

name: str | None
end_time: datetime | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
tags: List[str] | None

Tags

tags_to_add: List[str] | None

Tags to add

tags_to_remove: List[str] | None

Tags to remove

error_info: ErrorInfo | None
thread_id: str | None
ttft: float | None
source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.TraceWrite(*, id: str | None = None, project_name: str | None = None, name: str | None = None, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None = None, tags: List[str] | None = None, error_info: ErrorInfoWrite | None = None, last_updated_at: datetime | None = None, ttft: float | None = None, thread_id: str | None = None, source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None = None, environment: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_name: str | None

If null, the default project is used

name: str | None
start_time: datetime
end_time: datetime | None
input: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
output: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
metadata: Dict[str, Any | None] | List[Dict[str, Any | None]] | str | None
tags: List[str] | None
error_info: ErrorInfoWrite | None
last_updated_at: datetime | None
ttft: float | None

Time to first token in milliseconds

thread_id: str | None
source: Literal['sdk', 'experiment', 'playground', 'optimization', 'evaluator'] | Any | None
environment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Usage(*, total_tokens: int | None = None, prompt_tokens: int | None = None, prompt_tokens_details: PromptTokensDetails | None = None, completion_tokens: int | None = None, completion_tokens_details: CompletionTokensDetails | None = None, **extra_data: Any)

Bases: UniversalBaseModel

total_tokens: int | None
prompt_tokens: int | None
prompt_tokens_details: PromptTokensDetails | None
completion_tokens: int | None
completion_tokens_details: CompletionTokensDetails | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.UsageByWorkspaceProjectUserResponse(*, breakdown: List[WorkspaceProjectUserCount] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

breakdown: List[WorkspaceProjectUserCount] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.UserDefinedMetricPythonCode(*, metric: str, arguments: Dict[str, str], **extra_data: Any)

Bases: UniversalBaseModel

metric: str
arguments: Dict[str, str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.UserDefinedMetricPythonCodePublic(*, metric: str, arguments: Dict[str, str], **extra_data: Any)

Bases: UniversalBaseModel

metric: str
arguments: Dict[str, str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.UserDefinedMetricPythonCodeWrite(*, metric: str, arguments: Dict[str, str], **extra_data: Any)

Bases: UniversalBaseModel

metric: str
arguments: Dict[str, str]
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ValidatedToken(*, user_name: str | None = None, workspace_id: str | None = None, workspace_name: str | None = None, resource: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

user_name: str | None
workspace_id: str | None
workspace_name: str | None
resource: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ValueEntry(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: float | None
reason: str | None
category_name: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any | None
last_updated_at: datetime | None
span_type: str | None
span_id: str | None
source_queue_id: str | None
author: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ValueEntryCompare(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: float | None
reason: str | None
category_name: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any | None
last_updated_at: datetime | None
span_type: str | None
span_id: str | None
source_queue_id: str | None
author: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ValueEntryExperimentItemBulkWriteView(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: float | None
reason: str | None
category_name: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any | None
last_updated_at: datetime | None
span_type: str | None
span_id: str | None
source_queue_id: str | None
author: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.ValueEntryPublic(*, value: float | None = None, reason: str | None = None, category_name: str | None = None, source: Literal['ui', 'sdk', 'online_scoring'] | Any | None = None, last_updated_at: datetime | None = None, span_type: str | None = None, span_id: str | None = None, source_queue_id: str | None = None, author: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

value: float | None
reason: str | None
category_name: str | None
source: Literal['ui', 'sdk', 'online_scoring'] | Any | None
last_updated_at: datetime | None
span_type: str | None
span_id: str | None
source_queue_id: str | None
author: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.VideoUrl(*, url: str, **extra_data: Any)

Bases: UniversalBaseModel

url: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.VideoUrlPublic(*, url: str, **extra_data: Any)

Bases: UniversalBaseModel

url: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.VideoUrlWrite(*, url: str, **extra_data: Any)

Bases: UniversalBaseModel

url: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.Webhook(*, id: str | None = None, name: str | None = None, url: str, secret_token: str | None = None, headers: Dict[str, str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
url: str
secret_token: str | None
headers: Dict[str, str] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WebhookExamples(*, response_examples: Dict[str, Dict[str, Any | None]] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

response_examples: Dict[str, Dict[str, Any | None]] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WebhookPublic(*, id: str | None = None, name: str | None = None, url: str, secret_token: str | None = None, headers: Dict[str, str] | None = None, created_at: datetime | None = None, created_by: str | None = None, last_updated_at: datetime | None = None, last_updated_by: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
url: str
secret_token: str | None
headers: Dict[str, str] | None
created_at: datetime | None
created_by: str | None
last_updated_at: datetime | None
last_updated_by: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WebhookTestResult(*, status: Literal['success', 'failure'] | Any | None = None, status_code: int | None = None, request_body: str | None = None, error_message: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

status: Literal['success', 'failure'] | Any | None
status_code: int | None
request_body: str | None
error_message: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WebhookWrite(*, id: str | None = None, name: str | None = None, url: str, secret_token: str | None = None, headers: Dict[str, str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
url: str
secret_token: str | None
headers: Dict[str, str] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WelcomeWizardTracking(*, completed: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

completed: bool | None

Whether the welcome wizard has been completed

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceConfiguration(*, timeout_to_mark_thread_as_inactive: str | None = None, truncation_on_tables: bool | None = None, color_map: Dict[str, str] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

timeout_to_mark_thread_as_inactive: str | None

Duration in ISO-8601 format (e.g., PT30M for 30 minutes, PT2H for 2 hours, P1D for 1 day). Minimum precision supported is seconds, please use a duration with seconds precision or higher. Also, the max duration allowed is 7 days.

truncation_on_tables: bool | None

true (truncation enabled).

Type:

Enable or disable data truncation in table views. When disabled, the frontend will limit pagination to prevent performance issues. Default

color_map: Dict[str, str] | None

Workspace-level color map. Maps label names to hex color values (e.g. #FF0000). Max 10000 entries.

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceInfo(*, id: str | None = None, name: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
name: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceMetricRequest(*, project_ids: List[str] | None = None, name: str | None = None, interval_start: datetime, interval_end: datetime, start_before_end: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_ids: List[str] | None
name: str | None
interval_start: datetime
interval_end: datetime
start_before_end: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceMetricResponse(*, results: List[Result] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

results: List[Result] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceMetricsSummaryRequest(*, project_ids: List[str] | None = None, interval_start: datetime, interval_end: datetime, start_before_end: bool | None = None, **extra_data: Any)

Bases: UniversalBaseModel

project_ids: List[str] | None
interval_start: datetime
interval_end: datetime
start_before_end: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceMetricsSummaryResponse(*, results: List[Result] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

results: List[Result] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceNameHolder(*, workspace_name: str | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspace_name: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceProjectUserCount(*, workspace_id: str | None = None, project_id: str | None = None, user: str | None = None, count: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspace_id: str | None
project_id: str | None
user: str | None
count: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceSpansCount(*, workspace: str | None = None, span_count: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspace: str | None
span_count: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceTraceCount(*, workspace: str | None = None, trace_count: int | None = None, **extra_data: Any)

Bases: UniversalBaseModel

workspace: str | None
trace_count: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class opik.rest_api.types.WorkspaceUserPermissions(*, user_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f29248da720>]=None, workspace_name: Annotated[str | None, <opik.rest_api.core.serialization.FieldMetadata object at 0x7f2924706e40>]=None, permissions: List[Permission] | None = None, **extra_data: Any)

Bases: UniversalBaseModel

user_name: FieldMetadata object at 0x7f29248da720>]
workspace_name: FieldMetadata object at 0x7f2924706e40>]
permissions: List[Permission] | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].