Skip to main content
PUT
/
v2
/
projects
/
{project_id}
/
experiments
/
{experiment_id}
Update Experiment
curl --request PUT \
  --url https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id} \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "task_type": 16,
  "experiment_group_id": "<string>",
  "experiment_group_name": "<string>"
}
'
import requests

url = "https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id}"

payload = {
"name": "<string>",
"task_type": 16,
"experiment_group_id": "<string>",
"experiment_group_name": "<string>"
}
headers = {
"Galileo-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'Galileo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
task_type: 16,
experiment_group_id: '<string>',
experiment_group_name: '<string>'
})
};

fetch('https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'task_type' => 16,
'experiment_group_id' => '<string>',
'experiment_group_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Galileo-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"task_type\": 16,\n \"experiment_group_id\": \"<string>\",\n \"experiment_group_name\": \"<string>\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Galileo-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id}")
.header("Galileo-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"task_type\": 16,\n \"experiment_group_id\": \"<string>\",\n \"experiment_group_name\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.galileo.ai/v2/projects/{project_id}/experiments/{experiment_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Galileo-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"task_type\": 16,\n \"experiment_group_id\": \"<string>\",\n \"experiment_group_name\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "project_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "",
  "created_by": "<string>",
  "created_by_user": {
    "id": "<string>",
    "email": "<string>",
    "first_name": "<string>",
    "last_name": "<string>"
  },
  "num_spans": 123,
  "num_traces": 123,
  "num_sessions": 123,
  "dataset": {
    "dataset_id": "<string>",
    "version_index": 123,
    "name": "<string>"
  },
  "aggregate_metrics": {},
  "structured_aggregate_metrics": {},
  "aggregate_feedback": {},
  "rating_aggregates": {},
  "ranking_score": 123,
  "rank": 123,
  "winner": true,
  "playground_id": "<string>",
  "playground": {
    "playground_id": "<string>",
    "name": "<string>"
  },
  "prompt_run_settings": {
    "logprobs": true,
    "top_logprobs": 5,
    "echo": false,
    "n": 1,
    "reasoning_effort": "medium",
    "verbosity": "medium",
    "deployment_name": "<string>",
    "model_alias": "gpt-5.1",
    "temperature": 123,
    "max_tokens": 4096,
    "stop_sequences": [
      "<string>"
    ],
    "top_p": 1,
    "top_k": 40,
    "frequency_penalty": 0,
    "presence_penalty": 0,
    "tools": "<string>",
    "tool_choice": "<string>",
    "response_format": {}
  },
  "prompt_model": "<string>",
  "prompt": {
    "prompt_template_id": "<string>",
    "version_index": 123,
    "name": "<string>",
    "content": "<string>"
  },
  "tags": {},
  "status": {
    "log_generation": {
      "progress_percent": 0
    }
  },
  "experiment_group_id": "<string>",
  "experiment_group_name": "<string>",
  "experiment_group_is_system": true
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

experiment_id
string<uuid4>
required
project_id
string<uuid4>
required

Body

application/json
name
string
required
Minimum string length: 1
task_type
default:16
experiment_group_id
string<uuid4> | null
experiment_group_name
string | null
Required string length: 1 - 255

Response

Successful Response

id
string<uuid4>
required

Galileo ID of the experiment

project_id
string<uuid4>
required

Galileo ID of the project associated with this experiment

task_type
enum<integer>
required

Valid task types for modeling.

We store these as ints instead of strings because we will be looking this up in the database frequently.

Available options:
7,
9,
12,
13,
15,
16,
17,
18
created_at
string<date-time>

Timestamp of the experiment's creation

updated_at
string<date-time> | null

Timestamp of the trace or span's last update

name
string
default:""

Name of the experiment

created_by
string<uuid4> | null
created_by_user
UserInfo · object | null

A user's basic information, used for display purposes.

num_spans
integer | null
num_traces
integer | null
num_sessions
integer | null
dataset
ExperimentDataset · object | null
aggregate_metrics
Aggregate Metrics · object
structured_aggregate_metrics
Structured Aggregate Metrics · object | null

Structured aggregate metrics with full statistical aggregates (avg, min, max, sum, count). Keys are scorer UUIDs for scorer-backed metrics (matching available_columns column IDs after stripping the 'metrics/' prefix) and raw strings for system metrics (e.g. 'duration_ns', 'cost'). Present only when use_clickhouse_run_aggregates flag is enabled.

aggregate_feedback
Aggregate Feedback · object
deprecated

Aggregate feedback information related to the experiment (traces only)

rating_aggregates
Rating Aggregates · object

Annotation aggregates keyed by template ID and root type

ranking_score
number | null
rank
integer | null
winner
boolean | null
playground_id
string<uuid4> | null
playground
ExperimentPlayground · object | null
prompt_run_settings
PromptRunSettings · object | null

Prompt run settings.

prompt_model
string | null
prompt
ExperimentPrompt · object | null
tags
Tags · object
status
ExperimentStatus · object
experiment_group_id
string<uuid4> | null
experiment_group_name
string | null
experiment_group_is_system
boolean | null