Get AI Config metrics

Retrieve usage metrics for an AI Config by config key.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired
configKeystringRequired

Query parameters

fromintegerRequired

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

tointegerRequired

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

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

Response

Metrics computed
inputTokensinteger
outputTokensinteger
totalTokensinteger
generationSuccessCountinteger
Number of successful generations
generationErrorCountinteger
Number of generations with errors
thumbsUpinteger
thumbsDowninteger
durationMsinteger
timeToFirstTokenMsinteger
satisfactionRatingdouble
A value between 0 and 1 representing satisfaction rating
inputCostdouble
Cost of input tokens in USD
outputCostdouble
Cost of output tokens in USD
judgeAccuracydouble

Average accuracy judge score (0.0-1.0)

judgeRelevancedouble

Average relevance judge score (0.0-1.0)

judgeToxicitydouble

Average toxicity judge score (0.0-1.0)

generationCountintegerDeprecated
Number of attempted generations

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error