Query AI metrics
POST
jwtheader
AuthorizationBearer <JWT>application/json- body
filter*last?stringMatch
^-?\d+[dhm]$from?stringAn ISO 8601 date time string
Match
^(?:\d+(?:\.\d+?)?|(?:\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z))$Format
date-timeto?stringAn ISO 8601 date time string
Match
^(?:\d+(?:\.\d+?)?|(?:\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z))$Format
date-timerollup?groupBy?stringValue in
"provider-model""route""agent""node""finish-reason"limit*integerRange
0 < value <= 10000Default
100offset?integerRange
0 <= value <= 1000000output*stringDefault
"table"Value in
"table""timeseries""summary""group""tool-calls-table""tool-calls-timeseries""fallback-chains""fallback-table""route-health"application/json- response
[key: string]?unknowncurl -X POST 'https://observability.your-tenant-id.my.contextual.io/api/v1/metrics/ai' \ -H 'Content-Type: application/json' \ -d '{ "filter": { "service": "string" }, "limit": 100, "output": "table"}'Example Response
{ "property1": null, "property2": null}