Evaluation runs

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

POST
POST

Create environments evaluation runs

Create a new evaluation run.

This endpoint validates the request and enqueues a Temporal workflow to asynchronously execute the evaluation.

Required API key scopes

evaluation:write

Request parameters

  • evaluation_id
    string
  • target_event_id
    string
  • timestamp
    string
  • event
    string
    Default: $ai_generation
  • distinct_id
    stringnull

Example request

POST /api/environments/:environment_id/evaluation_runs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/evaluation_runs/\
-d evaluation_id="string",\
-d target_event_id="string",\
-d timestamp="string"

Example response

Status 200

Create evaluation runs

Create a new evaluation run.

This endpoint validates the request and enqueues a Temporal workflow to asynchronously execute the evaluation.

Required API key scopes

evaluation:write

Request parameters

  • evaluation_id
    string
  • target_event_id
    string
  • timestamp
    string
  • event
    string
    Default: $ai_generation
  • distinct_id
    stringnull

Example request

POST /api/projects/:project_id/evaluation_runs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/evaluation_runs/\
-d evaluation_id="string",\
-d target_event_id="string",\
-d timestamp="string"

Example response

Status 200

Community questions

Questions about this page? or post a community question.