Skip to main content
POST
/
v2
/
projects
/
{project_id}
/
recompute-metrics
Recompute Metrics
curl --request POST \
  --url https://api.galileo.ai/v2/projects/{project_id}/recompute-metrics \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "scorer_ids": [
    "<string>"
  ],
  "starting_token": 0,
  "limit": 100,
  "previous_last_row_id": "<string>",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "filters": [
    {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  ],
  "filter_tree": {
    "filter": {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  },
  "sort": {
    "column_id": "created_at",
    "ascending": false,
    "sort_type": "column"
  },
  "truncate_fields": false
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json

Request to recompute metrics for a genai project run (log stream or experiment). This request is used to trigger recomputation of metrics based on the provided filters and scorer IDs.

scorer_ids
string<uuid4>[]
required

List of scorer IDs for which metrics should be recomputed.

starting_token
integer
default:0
limit
integer
default:100
previous_last_row_id
string<uuid4> | null
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

filters
(LogRecordsIDFilter · object | LogRecordsDateFilter · object | LogRecordsNumberFilter · object | LogRecordsBooleanFilter · object | LogRecordsCollectionFilter · object | LogRecordsTextFilter · object)[]
filter_tree
FilterLeaf[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter, LogRecordsNumberFilter, LogRecordsBooleanFilter, LogRecordsCollectionFilter, LogRecordsTextFilter], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] · object
sort
LogRecordsSortClause · object
truncate_fields
boolean
default:false

Response

Successful Response