Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Get optimization by id

GET/v1/private/optimizations/{id}Get optimization by id

Get optimization by id

Parameters

idstring · uuidpathrequired

Responses

200Optimization resourceapplication/json
objectOptimization_Public
baseline_costnumber
baseline_durationnumber
baseline_objective_scorenumber
best_costnumber
best_durationnumber
best_objective_scorenumber
created_atstring · date-time
created_bystring
dataset_idstring · uuid
dataset_namestringrequired

minLength 1

error_infoobject
Show child attributes
exception_typestringrequired

minLength 1

messagestring
tracebackstringrequired

minLength 1

experiment_scoresarray of object
Show child attributes
Show array items
namestringrequired

minLength 1

valuenumberrequired
feedback_scoresarray of object
Show child attributes
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
num_trialsinteger · int64
objective_namestringrequired

minLength 1

project_idstring · uuid

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

statusstringrequired

one of "running", "completed", "cancelled", "initialized", "error"

studio_configobject
Show child attributes
dataset_namestringrequired

minLength 1

evaluationobjectrequired
Show child attributes
metricsarray of objectrequired

minItems 1

Show child attributes

minItems 1

Show array items
parametersobject
typestringrequired

minLength 1

llm_modelobjectrequired
Show child attributes
modelstringrequired

minLength 1

parametersobject
optimizerobjectrequired
Show child attributes
parametersobject
typestringrequired

minLength 1

promptobjectrequired
Show child attributes
messagesarray of objectrequired

minItems 1

Show child attributes

minItems 1

Show array items
contentstringrequired

minLength 1

rolestringrequired

minLength 1

total_optimization_costnumber
Example response
{
  "baseline_cost": 0,
  "baseline_duration": 0,
  "baseline_objective_score": 0,
  "best_cost": 0,
  "best_duration": 0,
  "best_objective_score": 0,
  "created_at": "2026-06-09T00:00:00Z",
  "created_by": "string",
  "dataset_id": "00000000-0000-0000-0000-000000000000",
  "dataset_name": "string",
  "error_info": {
    "exception_type": "string",
    "message": "string",
    "traceback": "string"
  },
  "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",
  "num_trials": 0,
  "objective_name": "string",
  "project_id": "00000000-0000-0000-0000-000000000000",
  "status": "cancelled",
  "studio_config": {
    "dataset_name": "string",
    "evaluation": {
      "metrics": [
        {
          "parameters": {},
          "type": "string"
        }
      ]
    },
    "llm_model": {
      "model": "string",
      "parameters": {}
    },
    "optimizer": {
      "parameters": {},
      "type": "string"
    },
    "prompt": {
      "messages": [
        {
          "content": "string",
          "role": "string"
        }
      ]
    }
  },
  "total_optimization_cost": 0
}
404Not foundapplication/json
objectErrorMessage_Public
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu