Skip to main content
Model Activity returns the statistics shown under Activity → Models & Routing in the Dari dashboard as JSON.

Authorization

Sign in with dari auth login, or set DARI_API_KEY to a Management key. The authorizing user must have the owner or admin role in the organization.
  • A per-user CLI key authorizes as the user it was created for. A manually created Management key authorizes as its creator.
  • Routing keys cannot read activity data.

Filter Activity

--from is inclusive and --to is exclusive. Both are required RFC3339 timestamps with a timezone offset, and the range cannot exceed 366 days.
Repeated flags combine with OR inside their dimension, and a row matches either the user set or the API-key set. The other dimensions combine with AND. For transitions, the identity filters (router, API key, user) constrain each conversation before adjacent requests are compared. Model, provider, and status apply to the destination request afterward, so filtering never invents transitions.

Call The API

The CLI wraps this Platform API endpoint. Pass the same filters as the query parameters router_id, api_key_id, user_id, model, provider, and status:
Management keys must use the current route; the server derives the organization from the key. Dashboard clients authenticated with a user session can replace current with an explicit organization ID.

Example Response

Summary

A model step is one persisted downstream model inference; a tool-result continuation is a new step. An observed conversation is a distinct combination of router, API key, attributed user, and a nonempty conversation identifier.

Models

One row per exact model and provider pair.

Transitions

One row per exact route change, ordered by volume. Requests are ordered by receipt time and then request ID; retries and provider attempts within one routing request do not become separate transitions.

Semantics And Limits

  • Money values are decimal strings with no fixed precision; parse them numerically before comparing or sorting. Spend is computed from Dari’s configured model catalog rates.
  • Unknown pricing is never reported as free usage: both money fields are null when no step has known pricing. Check the priced and unpriced step counts before comparing partially priced rows.
  • Rates are numbers from 0 to 1 and return 0 when the denominator is zero.
  • The response is not paginated. Transitions are limited to the highest-volume pairs; transitions_truncated is true when those rows omit switches that summary counts still include.
  • The endpoint reads persisted Chat Completions routing telemetry and never returns prompts, responses, tool arguments, or credentials. Rows without a conversation identifier count toward model totals but not conversation or transition statistics.
  • Telemetry is reported separately from the client response, so very recent or failed telemetry deliveries may not appear immediately.

Errors

The CLI validates timestamps, range order, and status values before sending a request, so it reports those mistakes locally.