> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://humanloop.com/docs/v5/api/evaluations/get-stats/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/_mcp/server. # Get Evaluation Stats GET https://api.humanloop.com/v5/evaluations/{id}/stats Get Evaluation Stats. Retrieve aggregate stats for the specified Evaluation. This includes the number of generated Logs for each Run and the corresponding Evaluator statistics (such as the mean and percentiles). Reference: https://humanloop.com/docs/api/evaluations/get-stats ## Authentication - `X-API-KEY` header (required) — API Key authentication via header ## Request ### Path parameters - `id` (string, required) — Unique identifier for Evaluation. ## Response ### 200 Successful Response - `run_stats` (list of RunStatsResponse, required) — Stats for each Run in the Evaluation. - `status` (enum, required) — The current status of the Evaluation. - Allowed values: `pending`, `running`, `completed`, `cancelled` - `progress` (string, optional) — A summary string report of the Evaluation's progress you can print to the command line;helpful when integrating Evaluations with CI/CD. - `report` (string, optional) — A summary string report of the Evaluation you can print to command line;helpful when integrating Evaluations with CI/CD. ## Errors ### 422 Get Stats Evaluations ID Stats Get Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### RunStatsResponse Stats for a Run in the Evaluation. - `run_id` (string, required) — Unique identifier for the Run. - `num_logs` (integer, required) — The total number of existing Logs in this Run. - `evaluator_stats` (list of RunStatsResponseEvaluatorStatsItem, required) — Stats for each Evaluator Version applied to this Run. - `status` (enum, required) — The current status of the Run. - Allowed values: `pending`, `running`, `completed`, `cancelled` - `version_id` (string, optional) — Unique identifier for the evaluated Version. - `batch_id` (string, optional) — Unique identifier for the batch of Logs to include in the Evaluation. ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### RunStatsResponseEvaluatorStatsItem ### ValidationErrorLocItem ### NumericEvaluatorStatsResponse Base attributes for stats for an Evaluator Version-Evaluated Version pair in the Evaluation. - `evaluator_version_id` (string, required) — Unique identifier for the Evaluator Version. - `total_logs` (integer, required) — The total number of Logs generated by this Evaluator Version on the Evaluated Version's Logs. This includes Nulls and Errors. - `num_judgments` (integer, required) — The total number of Evaluator judgments for this Evaluator Version. This excludes Nulls and Errors. - `num_nulls` (integer, required) — The total number of null judgments (i.e. abstentions) for this Evaluator Version. - `num_errors` (integer, required) — The total number of errored Evaluators for this Evaluator Version. - `percentiles` (map from string to double, required) - `mean` (double, optional) - `sum` (double, optional) - `std` (double, optional) ### BooleanEvaluatorStatsResponse Base attributes for stats for an Evaluator Version-Evaluated Version pair in the Evaluation. - `evaluator_version_id` (string, required) — Unique identifier for the Evaluator Version. - `total_logs` (integer, required) — The total number of Logs generated by this Evaluator Version on the Evaluated Version's Logs. This includes Nulls and Errors. - `num_judgments` (integer, required) — The total number of Evaluator judgments for this Evaluator Version. This excludes Nulls and Errors. - `num_nulls` (integer, required) — The total number of null judgments (i.e. abstentions) for this Evaluator Version. - `num_errors` (integer, required) — The total number of errored Evaluators for this Evaluator Version. - `num_true` (integer, required) — The total number of `True` judgments for this Evaluator Version. - `num_false` (integer, required) — The total number of `False` judgments for this Evaluator Version. ### SelectEvaluatorStatsResponse Also used for 'multi_select' Evaluator versions - `evaluator_version_id` (string, required) — Unique identifier for the Evaluator Version. - `total_logs` (integer, required) — The total number of Logs generated by this Evaluator Version on the Evaluated Version's Logs. This includes Nulls and Errors. - `num_judgments` (integer, required) — The total number of Evaluator judgments for this Evaluator Version. This excludes Nulls and Errors. - `num_nulls` (integer, required) — The total number of null judgments (i.e. abstentions) for this Evaluator Version. - `num_errors` (integer, required) — The total number of errored Evaluators for this Evaluator Version. - `num_judgments_per_option` (map from string to integer, required) — The total number of Evaluator judgments for this Evaluator Version. This is a mapping of the option name to the number of judgments for that option. ### TextEvaluatorStatsResponse Base attributes for stats for an Evaluator Version-Evaluated Version pair in the Evaluation. - `evaluator_version_id` (string, required) — Unique identifier for the Evaluator Version. - `total_logs` (integer, required) — The total number of Logs generated by this Evaluator Version on the Evaluated Version's Logs. This includes Nulls and Errors. - `num_judgments` (integer, required) — The total number of Evaluator judgments for this Evaluator Version. This excludes Nulls and Errors. - `num_nulls` (integer, required) — The total number of null judgments (i.e. abstentions) for this Evaluator Version. - `num_errors` (integer, required) — The total number of errored Evaluators for this Evaluator Version. ## Examples **Response** ```json { "run_stats": [ { "run_id": "run_id", "num_logs": 1, "evaluator_stats": [ { "evaluator_version_id": "evaluator_version_id", "total_logs": 1, "num_judgments": 1, "num_nulls": 1, "num_errors": 1, "mean": 0, "sum": 0, "std": 1, "percentiles": { "0": -2.5, "25": -0.6745, "50": 0, "75": 0.6745, "90": 1.5, "95": 1.8, "99": 2, "100": 2.5, "99.9": 2.2 } } ], "status": "pending", "version_id": "version_id", "batch_id": "batch_id" } ], "status": "pending", "progress": "progress", "report": "report" } ``` **SDK Code** ```python import requests url = "https://api.humanloop.com/v5/evaluations/id/stats" headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```typescript import { HumanloopClient } from "humanloop"; const client = new HumanloopClient({ apiKey: "YOUR_API_KEY" }); await client.evaluations.getStats("id"); ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.humanloop.com/v5/evaluations/id/stats" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.humanloop.com/v5/evaluations/id/stats") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.humanloop.com/v5/evaluations/id/stats") .header("X-API-KEY", "") .asString(); ``` ```php request('GET', 'https://api.humanloop.com/v5/evaluations/id/stats', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.humanloop.com/v5/evaluations/id/stats"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.humanloop.com/v5/evaluations/id/stats")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```