Launch Week 02 wrapped — explore all five launches

Get Collection

GEThttps://api.confident-ai.com/v1/metric-collections/{metricCollectionId}

Retrieves a single metric collection by its metricCollectionId, with the metrics and settings inside it.

GET/v1/metric-collections/{metricCollectionId}
curl -X GET "https://api.confident-ai.com/v1/metric-collections/{metricCollectionId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "metricCollection": {
      "id": "COLLECTION-ID",
      "name": "Collection Name",
      "multiTurn": false,
      "sampleRate": 1,
      "inputTransformerId": null,
      "outputTransformerId": null,
      "metricsSettings": [
        {
          "metric": {
            "name": "Answer Relevancy"
          },
          "activated": true,
          "threshold": 0.8,
          "includeReason": true,
          "strictMode": false,
          "sampleRate": 1,
          "evaluationModelProvider": null,
          "evaluationModelName": null
        }
      ]
    }
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • metricCollectionIdstringRequired

    The id of the metric collection you want to retrieve.

Response

The requested metric collection.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The metric collection. Create and update also return its id alongside it.

    Show 1 propertyHide 1 property
    • metricCollectionobject

      A metric collection and the metrics configured inside it.

      Show 7 propertiesHide 7 properties
      • idstring

        This is the id of the metric collection.

      • namestring

        This is the name of the metric collection, which should be supplied to the evals API to run evaluations remotely.

      • multiTurnboolean

        This is true if the metric collection is a multi-turn collection, which only contains multi-turn metrics for multi-turn evaluations.

      • sampleRatenumber

        The share of eligible entities the collection is run against.

      • inputTransformerIdstring

        The transformer that reshapes the payload before evaluation, if one is set.

      • outputTransformerIdstring

        The transformer that reshapes the result after evaluation, if one is set.

      • metricsSettingslist of objects

        The settings for each metric in the collection, which can also be configured on Confident AI's metric collection page.

        Show 8 propertiesHide 8 properties
        • metricobject

          This is a metric object, which contains the metric name.

          Show 1 propertyHide 1 property
          • namestring

            This is the name of the metric.

        • activatedboolean

          This is true if the metric is activated. Only activated metrics are used for evaluations. Non-activated metrics are skipped.

        • thresholdnumber

          This is the threshold for the metric, which determines if the metric passes or fails depending on if the metric score is above or below the threshold.

        • includeReasonboolean

          This is true if the reason for the metric score is generated during evaluations.

        • strictModeboolean

          This is true if the metric is in strict mode. Metrics in strict mode output a binary score of 0 or 1, indicating pass or fail, as opposed to a continuous score from 0 to 1.

        • sampleRatenumber

          This is the probability of the metric being ran for evaluation.

        • evaluationModelProviderenum

          The provider of the model this metric is evaluated with, if it overrides the project default.

          Show 18 enum valuesHide 18 enum values
          • OPEN_AI
          • CUSTOM
          • CONFIDENT_AI
          • BEDROCK
          • ANTHROPIC
          • GEMINI
          • X_AI
          • DEEPSEEK
          • MOONSHOT_AI
          • VERTEX_AI
          • AZURE
          • MISTRAL
          • PERPLEXITY
          • OPEN_ROUTER
          • PORTKEY
          • LITE_LLM
          • TRUE_FOUNDRY
          • HUGGING_FACE
        • evaluationModelNamestring

          The model this metric is evaluated with, if it overrides the project default.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI