Spend dashboards
Performance monitoring
Evaluator quality
Guardrail enforcement
Endpoint
POSThttps://api.orq.ai/v2/reporting
- All requests require a
Bearertoken. See API Keys for how to generate one. - The workspace and project scope are derived from the API key itself.
See the API Reference
POST /v2/reporting.Quickstart
Request
groupBy in TypeScript, group_by in Python).Response
Every successful response follows the same envelope. Thedata array contains time-ordered buckets. Each bucket carries:
- a
dimensionsmap: thegroup_byvalues for that row (see Dimensions) - a
metricsmap: shape depends on the metric requested
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.
Metric catalog
- Usage
- Evaluator
- Guardrail
| Metric | Description |
|---|---|
genai.requests | Number of LLM requests |
genai.tokens | Total tokens (input + output) |
genai.cost | Total cost in USD |
genai.errors | Number of failed requests |
genai.latency.p50 | Median request latency (ms) |
genai.latency.p95 | 95th percentile latency (ms) |
genai.latency.p99 | 99th percentile latency (ms) |
genai.usage | Bundle of request, token, and cost fields |
genai.latency.p*) carry a +/-1-2% error band typical of
t-digest estimation at high cardinality.Dimensions
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
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) |
Examples by use case
Spend: cost by day (bundle)
Spend: cost by day (bundle)
Spend: cost by model per hour
Spend: cost by model per hour
Spend: BYOK vs Orq.ai-managed credentials
Spend: BYOK vs Orq.ai-managed credentials
dimensions.credential_type as "orq_managed" or "customer_byok".Attribution: cost by Agent
Attribution: cost by Agent
Attribution: tokens by tag, filtered by project
Attribution: tokens by tag, filtered by project
Attribution: cost by Tool with model filter
Attribution: cost by Tool with model filter
Latency: p95 by model
Latency: p95 by model
metrics["genai.latency.p95"] is reported in milliseconds.Latency: p50, p95, p99 in parallel
Latency: p50, p95, p99 in parallel
Errors: count by provider
Errors: count by provider
Errors: error rate by model (client-side ratio)
Errors: error rate by model (client-side ratio)
Evaluator: pass rate by Evaluator and version
Evaluator: pass rate by Evaluator and version
Evaluator: average score
Evaluator: average score
Evaluator: runs by result label
Evaluator: runs by result label
Guardrail: block rate by Evaluator and stage
Guardrail: block rate by Evaluator and stage
Guardrail: triggers by Policy and stage
Guardrail: triggers by Policy and stage
Guardrail: filter by origin
Guardrail: filter by origin
Multi-tenant: cost per project per day
Multi-tenant: cost per project per day
Multi-tenant: usage per API key
Multi-tenant: usage per API key
Identity: cost per end-user Identity
Identity: cost per end-user Identity
Identity: requests filtered to a single end-user
Identity: requests filtered to a single end-user
Time zone: day buckets in America/New_York
Time zone: day buckets in America/New_York
High resolution: requests per minute, last hour
High resolution: requests per minute, last hour
Cross-dimension: cost by credential type and model
Cross-dimension: cost by credential type and model
Errors
Errors come back as JSON envelopes with a numericcode, a human-readable message, and an empty details array.
| HTTP | Code | Reason |
|---|---|---|
| 400 | 3 | 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. |
Limits
| Limit | Value |
|---|---|
| Query window | Workspace retention period, capped at 90 days |
group_by | 5 columns |
filters | 20 entries |
filter.values | 100 values per filter |
limit | 5000 bucket rows (default 1000) |
| Per-query timeout | 30 seconds |