Get AI Config metrics by variation
Retrieve usage metrics for an AI Config by config key, with results split by variation.
Authorization
ApiKey read, writeIn: header
Scope: read, write
Path Parameters
Query Parameters
The starting time, as milliseconds since epoch (inclusive).
The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after from.
An environment key. Only metrics from this environment will be included.
A context kind. Only metrics from events that include a context of this kind are included. Required if contextKey is provided.
A context key. Only metrics from events whose context of the contextKind kind has this key are included. Requires contextKind.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/projects/string/ai-configs/string/metrics-by-variation?from=0&to=0&env=string"[ { "metrics": { "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 }, "variationKey": "variationKey" }]Get AI Config metrics GET
Retrieve usage metrics for an AI Config by config key.
Add AI models to the restricted list POST
Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/agent-control/list-model-configs) endpoint.