Analytics
Analytics - Usage

Get Usage Summary

Changed on

Get usage summary for billing.

Aggregates the organization's usage_records — the SAME billing source of truth that feeds daily_burn_rate and monthly invoicing, so this endpoint and the burn meter always agree.

Returns per-operation credit totals for the window with USD derived at the canonical $0.001/credit rate (CREDIT_RATE_USD):

  • usage: one row per operation_type — {operation_type, credits, cost_usd} — biggest spend first. Refund records are negative and net automatically.
  • total_credits / total_cost: window totals across operations.
  • multi_vector_tokens: tokens of multi-vectors stored by writes, as carried by the mvs_write usage records in the window (recorded), plus tokens written since the last record (pending).

Scoped to the ORGANIZATION (matching the billing meter). Records are only partially namespace-attributed (async engine work carries no namespace), so filtering by namespace would silently under-report; namespace_id is echoed for request context only.

Time Range:

  • If both start_date and end_date are provided, uses that range
  • If neither provided, defaults to last 30 days
  • If only one provided, defaults to now as the other bound

Example:

GET /v1/analytics/usage/summary
GET /v1/analytics/usage/summary?start_date=2025-01-01T00:00:00Z&end_date=2025-01-31T23:59:59Z
get/v1/analytics/usage/summary

Request

  • Base URL: https://api.mixpeek.com
  • URL: https://api.mixpeek.com/v1/analytics/usage/summary
  • Auth: HTTP bearer and API key in header X-Namespace

Query parameters

start_datestring date-time nullable

Start date (UTC)

end_datestring date-time nullable

End date (UTC)

Response

Successful Response

object required

Changes

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      the endpoint scheme security BearerAuth AND NamespaceHeader was added to the API