Get AI config metrics

GET
/api/v2/projects/:projectKey/ai-configs/:configKey/metrics

Retrieve usage metrics for an AI config by config key.

Path parameters

projectKeystringRequired
configKeystringRequired

Headers

LD-API-Version"beta"Required

Version of the endpoint.

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

inputTokensintegerOptional
outputTokensintegerOptional
totalTokensintegerOptional
generationSuccessCountintegerOptional

Number of successful generations

generationErrorCountintegerOptional

Number of generations with errors

thumbsUpintegerOptional
thumbsDownintegerOptional
durationMsintegerOptional
timeToFirstTokenMsintegerOptional
generationCountintegerOptionalDeprecated

Number of attempted generations

Errors

Built with