Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Workflows Metrics Endpoints

Get performance metrics for workflows.

Get Workflow Metrics

GET /v1/workflows/{workflow_name}/metrics

Get comprehensive metrics for a specific workflow.

Args: workflow_name: The name of the workflow type to get metrics for start_time: Optional start time filter (ISO 8601 format) end_time: Optional end time filter (ISO 8601 format)

Returns: WorkflowMetrics: Dictionary containing metrics:

  • execution_count: Total number of executions
  • success_count: Number of successful executions
  • error_count: Number of failed/terminated executions
  • average_latency_ms: Average execution duration in milliseconds
  • retry_rate: Proportion of workflows with retries
  • latency_over_time: Time-series data of execution durations

Example: GET /v1/workflows/MyWorkflow/metrics GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00

GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00
&end_time=2025-12-31T23:59

200

Successful Response

average_latency_ms
*ScalarMetric

Scalar metric with a single value.

error_count
*ScalarMetric

Scalar metric with a single value.

execution_count
*ScalarMetric

Scalar metric with a single value.

latency_over_time
*TimeSeriesMetric

Time-series metric with timestamp-value pairs.

retry_rate
*ScalarMetric

Scalar metric with a single value.

success_count
*ScalarMetric

Scalar metric with a single value.

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/workflows/{workflow_name}/metrics \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "average_latency_ms": {
    "value": 87
  },
  "error_count": {
    "value": 14
  },
  "execution_count": {
    "value": 56
  },
  "latency_over_time": {
    "value": [
      [
        91
      ]
    ]
  },
  "retry_rate": {
    "value": 32
  },
  "success_count": {
    "value": 78
  }
}