Skip to main content
GET
/
api
/
v2
/
projects
/
{projectKey}
/
ai-configs
/
{configKey}
/
metrics
Get AI Config metrics
curl --request GET \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics \
  --header 'Authorization: <api-key>'
{
  "judgeRelevance": 0.14894159,
  "inputCost": 7.386281948385884,
  "outputCost": 1.2315135367772556,
  "generationSuccessCount": 5,
  "inputTokens": 0,
  "generationErrorCount": 2,
  "thumbsDown": 9,
  "judgeToxicity": 0.6846853,
  "totalTokens": 1,
  "judgeAccuracy": 0.10246457,
  "generationCount": 5,
  "timeToFirstTokenMs": 2,
  "outputTokens": 6,
  "thumbsUp": 7,
  "durationMs": 3,
  "satisfactionRating": 0.4145608
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

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

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string
required
configKey
string
required

Query Parameters

from
integer
required

The starting time, as milliseconds since epoch (inclusive).

to
integer
required

The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after from.

env
string
required

An environment key. Only metrics from this environment will be included.

Response

Metrics computed

inputTokens
integer
outputTokens
integer
totalTokens
integer
generationCount
integer
deprecated

Number of attempted generations

generationSuccessCount
integer

Number of successful generations

generationErrorCount
integer

Number of generations with errors

thumbsUp
integer
thumbsDown
integer
durationMs
integer
timeToFirstTokenMs
integer
satisfactionRating
number<float>

A value between 0 and 1 representing satisfaction rating

Required range: 0 <= x <= 1
inputCost
number<double>

Cost of input tokens in USD

outputCost
number<double>

Cost of output tokens in USD

judgeAccuracy
number<float>

Average accuracy judge score (0.0-1.0)

Required range: 0 <= x <= 1
judgeRelevance
number<float>

Average relevance judge score (0.0-1.0)

Required range: 0 <= x <= 1
judgeToxicity
number<float>

Average toxicity judge score (0.0-1.0)

Required range: 0 <= x <= 1