Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Get experiment by id

GET/v1/private/experiments/{id}Get experiment by id

Get experiment by id

Parameters

idstring · uuidpathrequired

Responses

200Experiment resourceapplication/json
objectExperiment_Public
assertion_scoresarray of object

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

Show child attributes
Show array items

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

namestringrequired

minLength 1

valuenumberrequired
commentsarray of object
Show child attributes
Show array items
created_atstring · date-time
created_bystring
idstring · uuid
last_updated_atstring · date-time
last_updated_bystring
source_queue_idstring · uuid
textstringrequired

minLength 1

created_atstring · date-time
created_bystring
dataset_idstring · uuid
dataset_item_countinteger · int64
dataset_namenull | stringrequired

minLength 1

dataset_version_idstring · uuid

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_summaryobject

Summary of the latest dataset version

Show child attributes
change_descriptionstring

Description of changes in this version

idstring · uuid

Unique identifier of the version

tagsarray of string

Tags associated with this version

uniqueItems true

Show child attributes

uniqueItems true

version_hashstring

Hash of the version content

version_namestring

Sequential version name formatted as 'v1', 'v2', etc.

durationobject
Show child attributes
p50number
p90number
p99number
evaluation_methodstring

one of "dataset", "evaluation_suite"

experiment_scoresarray of object
Show child attributes
Show array items
namestringrequired

minLength 1

valuenumberrequired
feedback_scoresarray of object
Show child attributes
Show array items
namestringrequired

minLength 1

valuenumberrequired
idstring · uuid
last_updated_atstring · date-time
last_updated_bystring
metadataobject
Show child attributes
anyOf · 3 options
Option 1object
Option 2array of object
Option 3string
namestring
optimization_idstring · uuid
pass_ratenumber

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

passed_countinteger · int64

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

project_idstring · uuid

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

project_namestring

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

pattern (?s)^\s*(\S.*\S|\S)\s*$

prompt_versionobject
prompt_versionsarray of object
Show child attributes
statusstring

one of "running", "completed", "cancelled"

tagsarray of string

maxItems 50 · minItems 0 · uniqueItems true

Show child attributes

maxItems 50 · minItems 0 · uniqueItems true

total_countinteger · int64

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

total_estimated_costnumber
total_estimated_cost_avgnumber
trace_countinteger · int64
typestring

one of "regular", "trial", "mini-batch", "mutation"

usageobject
Example response
{
  "assertion_scores": [
    {
      "name": "string",
      "value": 0
    }
  ],
  "comments": [
    {
      "created_at": "2026-06-09T00:00:00Z",
      "created_by": "string",
      "id": "00000000-0000-0000-0000-000000000000",
      "last_updated_at": "2026-06-09T00:00:00Z",
      "last_updated_by": "string",
      "source_queue_id": "00000000-0000-0000-0000-000000000000",
      "text": "string"
    }
  ],
  "created_at": "2026-06-09T00:00:00Z",
  "created_by": "string",
  "dataset_id": "00000000-0000-0000-0000-000000000000",
  "dataset_item_count": 0,
  "dataset_name": "string",
  "dataset_version_id": "00000000-0000-0000-0000-000000000000",
  "dataset_version_summary": {
    "change_description": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "tags": [
      "string"
    ],
    "version_hash": "string",
    "version_name": "string"
  },
  "duration": {
    "p50": 0,
    "p90": 0,
    "p99": 0
  },
  "evaluation_method": "dataset",
  "experiment_scores": [
    {
      "name": "string",
      "value": 0
    }
  ],
  "feedback_scores": [
    {
      "name": "string",
      "value": 0
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "last_updated_at": "2026-06-09T00:00:00Z",
  "last_updated_by": "string",
  "metadata": [
    {}
  ],
  "name": "string",
  "optimization_id": "00000000-0000-0000-0000-000000000000",
  "pass_rate": 0,
  "passed_count": 0,
  "project_id": "00000000-0000-0000-0000-000000000000",
  "project_name": "string",
  "prompt_version": {
    "commit": "string",
    "prompt_id": "00000000-0000-0000-0000-000000000000",
    "prompt_name": "string",
    "prompt_version_id": "00000000-0000-0000-0000-000000000000"
  },
  "prompt_versions": [
    {
      "commit": "string",
      "prompt_id": "00000000-0000-0000-0000-000000000000",
      "prompt_name": "string",
      "prompt_version_id": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "status": "cancelled",
  "tags": [
    "string"
  ],
  "total_count": 0,
  "total_estimated_cost": 0,
  "total_estimated_cost_avg": 0,
  "trace_count": 0,
  "type": "mini-batch",
  "usage": {
    "additionalProp1": 0
  }
}
404Not foundapplication/json
objectErrorMessage_Public
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu