For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • GETCancel Studio optimizations
        • GETFind optimizations
        • POSTCreate optimization
        • PUTUpsert optimization
        • POSTDelete optimizations by id
        • GETGet optimization by id
        • PUTUpdate optimization by id
        • GETGet Studio optimization logs
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferenceOptimizations

Get optimization by id

GET
/v1/private/optimizations/:id
GET
/api/v1/private/optimizations/:id
$curl http://localhost:5173/api/v1/private/optimizations/id
1{
2 "dataset_name": "string",
3 "objective_name": "string",
4 "status": "running",
5 "id": "string",
6 "name": "string",
7 "project_id": "string",
8 "metadata": {},
9 "studio_config": {
10 "dataset_name": "string",
11 "prompt": {
12 "messages": [
13 {
14 "role": "string",
15 "content": "string"
16 }
17 ]
18 },
19 "llm_model": {
20 "model": "string",
21 "parameters": {}
22 },
23 "evaluation": {
24 "metrics": [
25 {
26 "type": "string",
27 "parameters": {}
28 }
29 ]
30 },
31 "optimizer": {
32 "type": "string",
33 "parameters": {}
34 }
35 },
36 "dataset_id": "string",
37 "num_trials": 1,
38 "feedback_scores": [
39 {
40 "name": "string",
41 "value": 1.1
42 }
43 ],
44 "experiment_scores": [
45 {
46 "name": "string",
47 "value": 1.1
48 }
49 ],
50 "created_at": "2024-01-15T09:30:00Z",
51 "created_by": "string",
52 "last_updated_at": "2024-01-15T09:30:00Z",
53 "last_updated_by": "string",
54 "baseline_objective_score": 1.1,
55 "best_objective_score": 1.1,
56 "baseline_duration": 1.1,
57 "best_duration": 1.1,
58 "baseline_cost": 1.1,
59 "best_cost": 1.1,
60 "total_optimization_cost": 1.1
61}
Get optimization by id
Was this page helpful?
Previous

Update optimization by id

Next
Built with

Path parameters

idstringRequiredformat: "uuid"

Response

Optimization resource
dataset_namestring>=1 character
objective_namestring>=1 character
statusenum
Allowed values:
idstringformat: "uuid"
namestring
project_idstringformat: "uuid"

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

metadatamap from strings to any or list of objects or string
studio_configobject
dataset_idstringRead-onlyformat: "uuid"
num_trialslongRead-only
feedback_scoreslist of objectsRead-only
experiment_scoreslist of objectsRead-only
created_atdatetimeRead-only
created_bystringRead-only
last_updated_atdatetime
last_updated_bystringRead-only
baseline_objective_scoredoubleRead-only
best_objective_scoredoubleRead-only
baseline_durationdoubleRead-only
best_durationdoubleRead-only
baseline_costdoubleRead-only
best_costdoubleRead-only
total_optimization_costdoubleRead-only

Errors

404
Not Found Error