Skip to main content
GET
Get AI Config metrics

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string
required

The project key

configKey
string
required

The AI Config key

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.

contextKind
string

A context kind. Only metrics from events that include a context of this kind are included. Required if contextKey is provided.

contextKey
string

A context key. Only metrics from events whose context of the contextKind kind has this key are included. Requires contextKind.

Response

Metrics computed

inputTokens
integer

Number of input tokens

outputTokens
integer

Number of output tokens

totalTokens
integer

Total number of tokens

generationCount
integer
deprecated

Number of attempted generations

generationSuccessCount
integer

Number of successful generations

generationErrorCount
integer

Number of generations with errors

thumbsUp
integer

Number of positive feedback ratings

thumbsDown
integer

Number of negative feedback ratings

durationMs
integer

Total generation duration, in milliseconds

timeToFirstTokenMs
integer

Time to the first token, in milliseconds

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