Agent Control
Get AI Config metrics
Retrieve usage metrics for an AI Config by config key.
Authorization
ApiKey read, writeAuthorization<token>
In: header
Scope: read, write
Path Parameters
projectKey*string
configKey*string
Query Parameters
from*integer
The starting time, as milliseconds since epoch (inclusive).
to*integer
The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after from.
env*string
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 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?from=0&to=0&env=string"{ "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}