Get usage timeseries
Changed onBuckets model usage over time for one metric, optionally broken down by configured model or agent profile. Covers every project the caller can read in the organization; project_ids and agent_profile_ids narrow that scope. Buckets are calendar days, weeks (starting Monday), or months in timezone.
Request
- Base URL: https://api.omnara.com/v1
- URL: https://api.omnara.com/v1/orgs/{orgID}/usage/timeseries
- Auth: one of:
- HTTP bearer
- API key in cookie __Host-omnara_session
Query parameters
Only tally model calls started at or after this instant. Omit to start from the earliest recorded call.
Only tally model calls started before this instant. Must be later than since when both are given. Omit to include calls up to now.
IANA time zone that decides where each bucket starts.
Bucket width. Omit to pick one from the window length: days up to 92 days, weeks up to 730 days, months beyond. Hourly buckets are used only when requested. The window may span at most 400 buckets.
sum_tokens is input plus output tokens. sum_cost is provider-reported cost in USD. count_model_calls counts model calls that recorded usage.
Value plotted in each bucket. Defaults to sum_tokens.
Break the metric down into one series per group. Omit for a single series.
With group_by, how many groups get their own series, ranked by the metric. The rest are folded into one other series.
Only count usage from these projects.
Only count usage from top-level agents launched from these agent profiles.
With agent_profile_ids, also count usage from subagents spawned by those agents.
Response
Usage timeseries.
Changes
- info
endpoint added
- info