Skip to main content

Analytics

Analytics endpoints provide usage metrics, cost tracking, and trend analysis for agents across your organization.
All API requests require a valid JWT token in the Authorization: Bearer <token> header. The API Gateway decodes the JWT and forwards auth context (user-id, organization-id, user-email, x-platform-role, x-org-role) as headers to downstream services.

Overview Metrics

Get high-level usage metrics with trend comparisons against the previous period.

Query Parameters

string
required
Organization UUID.
string
required
Start of the reporting period (ISO 8601 date string).
string
required
End of the reporting period (ISO 8601 date string).
string
Filter to a specific agent UUID.
string
Filter to a specific model ID.

Response (200)

Returns current period metrics with trend indicators compared to the equivalent previous period:
object
object
Message count with trend.
object
Token usage with trend.
object
Cost in USD with trend.
object
Response time in ms with trend.

Daily Breakdown

Get day-by-day usage breakdown for charting.

Query Parameters

Same as Overview Metrics.

Response (200)

Returns an array of daily data points with conversation counts, message counts, token usage, and cost for each day.

Model Usage

Get usage breakdown by AI model, showing which models are used most.

Query Parameters

Same as Overview Metrics.

Response (200)

Returns per-model aggregates including message count, token usage, and cost.

Agent Usage

Get usage breakdown by agent.

Query Parameters

Same as Overview Metrics.

Response (200)

Returns per-agent aggregates including conversation count, message count, and cost.

Realtime Metrics

Get recent activity metrics for live dashboards.

Query Parameters

string
required
Organization UUID.
string
ISO 8601 timestamp. Only return activity after this time. Defaults to last 15 minutes.

Response (200)

Returns recent conversation and message counts, active users, and current response times.