Skip to main content

Reporting

Query Reports

Returns time-series analytics for AI usage, cost, latency, evaluator results, and guardrail outcomes. Select a metric and time range, break results down by supported dimensions, apply filters, and optionally include totals for the full range.
from orq_ai_sdk import Orq
from orq_ai_sdk.utils import parse_datetime
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.reporting.query(metric="genai.evaluator.score.avg", from_=parse_datetime("2026-03-06T12:20:53.904Z"), to=parse_datetime("2026-12-14T22:21:09.964Z"))

    # Handle response
    print(res)