Skip to main content
Retrieve processing-unit consumption for a custom date range or dashboard metrics for a rolling window.

Get usage

Required query parameters:
  • period_start — Start of the window, inclusive (YYYY-MM-DD).
  • period_end — End of the window, inclusive (YYYY-MM-DD). Must not be before period_start.
Optional query parameters:
  • group_by (default day) — Aggregation key: day, kind, or workspace.
  • workspace_id — Restrict aggregation to one workspace. Omit to include all jobs for the API key.
Response:
Response fields:
  • period_start / period_end — The requested window dates.
  • group_by — The aggregation key used.
  • buckets — One bucket per group key within the period:
    • key — Calendar date (when group_by=day), job kind (when group_by=kind), or workspace ID (when group_by=workspace).
    • units — Processing units for this bucket.
    • jobs — Number of completed jobs.
    • pages — Pages processed (document formats) or non-empty cells (spreadsheets).
    • bytes_ingested — Source bytes ingested (workspace ingestion jobs only).
  • units_total — Sum of all bucket units for the period.

Get usage overview

Return dashboard-ready document throughput, active job counts, average processing time, and a zero-filled daily series. The window ends today in UTC, and prior-period fields use the immediately preceding window of equal length. Query parameters:
  • window (optional, default "7d") — Rolling window: "7d", "30d", or "90d".
Response:
Response fields:
  • documents_processed / documents_processed_prior — Succeeded document-operation jobs in the selected and preceding windows.
  • active_jobs / queued_jobs — Current point-in-time counts across all job kinds.
  • avg_processing_seconds / avg_processing_seconds_prior — Average completed document-processing time; null when a window has no completed document jobs.
  • series — One entry for every UTC calendar day in the window, including zero-document days.

Grouping examples

By day (default — see daily consumption):
Each bucket key is a date string ("2026-08-01", "2026-08-02", …). By kind (see which operations cost most):
Each bucket key is a job kind string ("parse", "ingestion", …). By workspace (see per-project consumption):
Each bucket key is a workspace UUID.

Errors

  • invalid_request (422) — period_end is before period_start.