source, a time range, and one or more compute entries, and every source answers with the same row shape.
Usage and cost
Trace aggregates
Log volume
Discover the surface
Endpoint
POSThttps://my.orq.ai/v3/telemetry/query
- All requests require a
Bearertoken. See API Keys for how to generate one. - The workspace and project scope come from the API key.
Query telemetry
POST /v3/telemetry/query.List capabilities
GET /v3/telemetry/capabilities.List facet values
POST /v3/telemetry/facet-values.Quickstart
Count requests per model over the last day:Request
auto resolves the bucket width from the requested range, and the ladder depends on the source:
Response
Every source answers with the same envelope:metricskeys are the requested metric and operation joined by a colon, for exampletrace_count:countorgenai.cost:sum.timestampis present on bucketed rows only.totalsappears only when the request setsinclude_totals: true, and carries no timestamp and an emptygroup.meta.effective_grainreports the bucket actually applied, including widthsinterval_secondsorautoresolved to.meta.currencyisUSDonly when everycomputeentry isgenai.cost, and empty on every other query.meta.warningsexplains a value the source ignored, for example atime_zonesent to a source that buckets in UTC.
Sources and metrics
TELEMETRY_SOURCE_TRACES covers raw trace aggregates, the genai usage metrics and span metrics. The three cannot be mixed in one request.
Span metrics (gen_ai.* and orq.gen_ai.*) are computed per LLM request span. They honor time_zone and accept several computes on a grouped scalar query, sorted by the first one.
TELEMETRY_SOURCE_METRICS covers the custom metrics registered in the workspace. TELEMETRY_SOURCE_LOGS covers log records only.
genai.usage is a bundle: request it with op: "bundle", and it answers every field in one row under genai.usage:<field> keys. Its fields are not queryable metrics on their own, and the compute cannot be mixed with any other in one request.
Discover what is available
Capabilities list what a key can reach, so a client never hard-codes the vocabulary:501.
Examples by use case
Spend: cost by model
Spend: cost by model
genai.cost sums what the window recorded, group_by splits it per model, and include_totals adds the window total:Errors: failing traces by Agent
Errors: failing traces by Agent
status takes ok, error, or unset:Latency: p95 by Tool
Latency: p95 by Tool
Logs: volume by severity
Logs: volume by severity
severity_text carries values such as INFO, WARN, or ERROR: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
group.credential_type as "orq_managed" or "customer_byok".Entity dimension: cost by Agent
Entity dimension: cost by Agent
Entity dimension: cost by Tool with model filter
Entity dimension: cost by Tool with model filter
Latency: p95 by model
Latency: p95 by model
genai.latency.p95:p95 key 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
group_by for provider, product, base_model, project_id, tool_name, or agent_name on traces, service_name or host_name on logs, and agent, tool, or project on the genai usage metrics. The ttft, evaluator, and guardrail metrics accept no entity dimension beyond project. Dynamic dimensions are addressable by prefix: attributes.* and metadata.* on traces, attribute.*, resource.*, and scope.* on logs.
Trace status values
Each surface names the same two outcomes differently.unset is a trace that finished without an error status, and the Traces view counts it as successful.
Errors
A rejected query returns a JSON envelope with a numericcode, a human-readable message, and a details array (the 401 and 403 responses carry code and message only):
ErrorInfo detail naming the resource that ran out (range_days, buckets, rows, series, or metric_values) and its limit; on every source except genai metrics, a bucket overflow also reports the amount required.