Skip to main content
POST
/
v1
/
metrics
/
run_metric
Run a metric evaluation (deprecated)
curl --request POST \
  --url https://api.dp1.us.honeyhive.ai/v1/metrics/run_metric \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric": {
    "name": "<string>",
    "type": "LLM",
    "criteria": "<string>",
    "description": "",
    "return_type": "float",
    "enabled_in_prod": false,
    "needs_ground_truth": false,
    "sampling_percentage": 10,
    "model_provider": "<string>",
    "model_name": "<string>",
    "scale": 123,
    "threshold": {
      "min": 123,
      "max": 123,
      "pass_when": true,
      "passing_categories": [
        "<string>"
      ]
    },
    "categories": [
      {
        "category": "<string>",
        "score": 123
      }
    ],
    "child_metrics": [
      {
        "name": "<string>",
        "weight": 123,
        "id": "<string>",
        "scale": 123
      }
    ],
    "filters": {
      "filterArray": []
    }
  },
  "event": {
    "event_type": "<string>",
    "event_name": "<string>",
    "inputs": {},
    "outputs": {},
    "workspace_id": "<string>",
    "feedback": {
      "ground_truth": "<unknown>"
    }
  }
}
'
{
  "success": true,
  "loading": true,
  "result": true,
  "explanation": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for POST /metrics/run_metric (deprecated — use POST /metrics/run)

metric
object
required
event
object
required

Response

200 - application/json

Metric execution result

Response for POST /metrics/run

success
boolean
required
loading
boolean
required
result
required
explanation
string | null
required