Skip to main content
The Telemetry API answers usage, cost, latency, trace, and log questions from one endpoint. Every request names a source, a time range, and one or more compute entries, and every source answers with the same row shape.
The Telemetry API is the recommended query surface for new integrations: one envelope covers usage metrics, trace aggregates, and logs. The Reporting API and the trace aggregate endpoints remain supported for existing callers. For usage and cost questions, prefer this endpoint.

Usage and cost

Group genai metrics by model, provider, project, agent, or tool.

Trace aggregates

Count traces and spans, and take latency percentiles or token and cost totals.

Log volume

Count log records and error records, grouped by severity or service.

Discover the surface

List the metrics, operations, and dimensions the caller can reach.

Endpoint

POST https://my.orq.ai/v3/telemetry/query
  • All requests require a Bearer token. See API Keys for how to generate one.
  • The workspace and project scope come from the API key.

Query telemetry

Full schema for 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:
Envelope
  • metrics keys are the requested metric and operation joined by a colon, for example trace_count:count or genai.cost:sum.
  • timestamp is present on bucketed rows only.
  • totals appears only when the request sets include_totals: true, and carries no timestamp and an empty group.
  • meta.effective_grain reports the bucket actually applied, including widths interval_seconds or auto resolved to. meta.currency is USD only when every compute entry is genai.cost, and empty on every other query.
  • meta.warnings explains a value the source ignored, for example a time_zone sent to a source that buckets in UTC.

Sources and metrics

TELEMETRY_SOURCE_TRACES covers raw trace aggregates and the genai usage metrics. The two cannot be mixed in one request. 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:
Each metric entry carries its label, unit, operations, default operation, query modes, result kinds, and the dimensions it can group by, including whether each dimension is groupable and which filter operators it accepts. Facet values list the distinct values a field takes in the workspace, so a filter can be built from real data. Only the traces source is supported: the metrics and logs sources answer 501.

Examples by use case

genai.cost sums what the window recorded, group_by splits it per model, and include_totals adds the window total:
Count only the failing traces. status takes ok, error, or unset:
A scalar top list: no grain, one row per tool, ordered by the metric:
The logs source groups by the OpenTelemetry fields it stores, and severity_text carries values such as INFO, WARN, or ERROR:
The same shape answers the entity questions: swap 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.

Errors

A rejected query returns a JSON envelope with a numeric code, a human-readable message, and a details array (the 401 and 403 responses carry code and message only):
Every successful query response includes meta.request_id. Include it in support tickets for fast log correlation.
Budget rejections carry an 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.

Limits