events

Get event metrics

Changed on

Aggregate what the events carry beyond their count, per time bucket and over the whole window.

Ingestion volume (files, chunks, tokens, bytes, timings), searches by kind (semantic, reranked, rewritten, agentic, grep) with latency percentiles and agentic token usage, and chat completions with their prompt, cached, and completion tokens, hosted tool calls, and turn durations. Embedding and reranking requests come with their tokens, reranked documents, and latency percentiles. Buckets with no events are omitted; the totals' percentiles span every event in the window.

post/v1/events/metrics

Request

  • Base URL
    https://api.mixedbread.com
  • URL
    https://api.mixedbread.com/v1/events/metrics
  • Auth
    HTTP bearer

Query parameters

limitinteger

Maximum number of items to return per page (1-100)

Example:10
afterstring nullable

Cursor for forward pagination - get items after this position. Use last_cursor from previous response.

Example:eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ==
beforestring nullable

Cursor for backward pagination - get items before this position. Use first_cursor from previous response.

Example:eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ==
include_totalboolean

Whether to include total count in response (expensive operation)

string
OR
string uuid
group_by'store' nullable

Split every bucket and total per store, carrying its store_id, for one page of the busiest stores by queries then files; the other stores share rows with a null store_id, and events with no store are left out.

include_previousboolean

Also aggregate the window of the same length that ends at start_time.

Request body

start_timestring date-time

Start time of the histogram

end_timestring date-time

End time of the histogram

bucket_secondsinteger

Number of seconds in each bucket

Response

Usage aggregates of the organization's events per time bucket

object'event_metrics'

The object type of the response

Example response

{
  "pagination": {
    "has_more": true,
    "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ==",
    "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMFQyMzo1OTo1OS4wMDBaIiwiaWQiOiJ4eXo3ODkifQ==",
    "total": 42
  }
}

Changes

    • info

      added the new optional query request parameter after

    • info

      added the new optional query request parameter before

    • info

      added the new optional query request parameter include_total

    • info

      added the new optional query request parameter limit

    • info

      added the optional property to the response with the status

    • info

      added the new optional query request parameter include_previous

    • info

      added the optional property /// to the 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

      added the required property to the response with the status