POST
/
rest
/
track-score
curl --request POST \
  --url https://api.promptlayer.com/rest/track-score \
  --header 'Content-Type: application/json' \
  --data '{
  "request_id": "<string>",
  "score": 123,
  "name": "<string>",
  "api_key": "<string>"
}'

Track score allows you to associate a score 0-100 with each request.

Example Code

import requests
request_response = requests.post(
  "https://api.promptlayer.com/rest/track-score",
  json={
      "request_id": "<PL_REQUEST_ID>",
      "score": "<NUMBER>",
      "name": "<SCORE_NAME>", # optional
      "api_key": "pl_<YOUR API KEY>",
  },
)

Request Parameters

request_id
string

The request_id from track-request

score
integer

The score you would like to give to this request (0 - 100)

name
string

A name for this request score.

api_key
string

Your PromptLayer API Key