def get_endpoint_metrics(
    endpoint: str,
    start_time: Optional[Union[datetime.datetime, str]] = None,
    end_time: Optional[Union[datetime.datetime, str]] = None,
    api_key: Optional[str] = None,
) -> List[Metrics]:

source code

Retrieve the set of cost and speed metrics for the specified endpoint.

Arguments:

  • endpoint - The endpoint to retrieve the metrics for, in model@provider format
  • start_time - Window start time. Only returns the latest benchmark if unspecified.
  • end_time - Window end time. Assumed to be the current time if this is unspecified
  • api_key - If specified, unify API key to be used. Defaults to the value in the

Returns:

The set of metrics for the specified endpoint.