Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
Use the Orq.ai Reporting API for programmatic access to AI usage, cost, latency, token, evaluator, and guardrail analytics, broken down by any dimension.
Query AI usage, cost, latency, Evaluator outcomes, and guardrail metrics programmatically. The Reporting API returns time-series data sliced by model, provider, project, identity, and more in a single JSON request.
Spend dashboards
Track cost by model, provider, project, or credential type. Build per-customer billing breakdowns.
Performance monitoring
Monitor p50, p95, and p99 latency over time across models and providers.
Evaluator quality
Quantify pass rate, average score, and result distribution per Evaluator and version.
Guardrail enforcement
Measure block rate, triggers, and outcomes by Policy and stage.
All requests require a Bearer token. See API Keys for how to generate one.
The workspace and project scope are derived from the API key itself.
Trace events flow into reporting in near real time, with a small ingestion delay measured in seconds. Queries against very recent windows may not yet include the latest events.
See the API Reference
Interactive playground and full schema for POST /v2/reporting.
Every successful response follows the same envelope.The data array contains time-ordered buckets. Each bucket carries:
a dimensions map: the group_by values for that row (see Dimensions)
a metrics map: shape depends on the metric requested
Scalar metrics return a single named value per bucket. Bundle metrics (such as genai.usage) return a full set of related fields in one call.totals is present only when include_totals: true is set in the request; otherwise the field is omitted. Metric values are rounded to 10 decimal places server-side.
Quantile metrics (genai.latency.p*) carry a +/-1-2% error band typical of
t-digest estimation at high cardinality.
Metric
Description
genai.evaluator.runs
Total Evaluator runs
genai.evaluator.pass_rate
Passed / total (ratio in [0, 1])
genai.evaluator.score.avg
Average Evaluator score
Metric
Description
genai.guardrail.runs
Total guardrail checks
genai.guardrail.block_rate
Blocked / total (ratio in [0, 1])
genai.guardrail.triggered
Count of blocked checks
Evaluator and guardrail metrics read from the same source: every Evaluator
run is recorded as a guardrail check regardless of the Evaluator
implementation type. Pick the metric that matches the question being asked.
The API picks the right index for the query automatically. Asking for an entity dimension (agent, tool, tag, and so on) on a usage metric routes the query through entity attribution; everything else stays on the core usage path.
billing_billable is available as a filter field for usage metrics, but not
as a group_by dimension. To break down Orq.ai-managed versus customer-owned credentials, use credential_type instead. The values orq_managed and customer_byok are derived at query time from the workspace billing setup, not stored on each event.
Usage dimensions
Entity dimensions
Evaluator and guardrail dimensions
Pair these with genai.requests, genai.tokens, genai.cost, genai.errors, genai.latency.*, or genai.usage.
Dimension
Notes
project
Workspace project the request is attributed to
identity
End-user identifier from Identities
provider
For example, openai, anthropic
model
For example, gpt-4o-mini
product
Which Orq.ai product surface served the request
api_key
API key used to authenticate the request
status_code
High-level status (OK, ERROR)
http_status_code
HTTP status from the upstream model
credential_type
orq_managed (Orq.ai-managed keys) or customer_byok (customer BYOK keys)
Add an entity dimension to any usage metric to break it down by a product entity. The API routes the query to attribution storage automatically.
Entity
Description
agent
Agent that issued the request
tool
Tool invoked during the request
deployment
Deployment ID
evaluator
Evaluator that ran on the trace
policy
Policy that matched the request
tag
Tags attached to the request
prompt
Prompt template
dataset
Dataset used in an experiment
conversation
Conversation grouping
thread
Thread grouping
memory_store
Memory Store
knowledge
Knowledge base
sheet
Sheet ID
Two conflicting entity dimensions in the same request (for example, ["agent", "tool"]) return 400. Issue one request per entity dimension.
Advanced attribution queries can group by raw dimension, but must include a
dimension_type filter such as { "field": "dimension_type", "op": "eq", "values": ["agent"] }. Prefer the entity aliases above for most dashboards.
Pair these with genai.evaluator.* and genai.guardrail.* metrics.
Dimension
Notes
project
Workspace project the request is attributed to
identity
End-user identifier from Identities
api_key
API key used to authenticate the request
policy
Policy that matched the request
evaluator
Evaluator that produced the result
evaluator_name
Human-readable Evaluator name
evaluator_type
llm_eval, python_eval, function_eval, and so on
evaluator_version
Compare versions over time
result_type
boolean, number, categorical, string
result_label
Bounded result bucket (pass, fail, error, or category name)
evaluation_stage
input or output (aliases: guardrail_stage, evaluator_stage)
Unknown metric, dimension not allowed, range outside workspace retention, range over 90 days, from >= to, grain outside retention, or invalid filter operator.
401
16
Missing or invalid bearer token.
403
7
API key does not have access to the requested project.
500
13
Unexpected backend failure. Forward meta.request_id to support.
Every successful response includes meta.request_id. Include it in support
tickets for fast log correlation.