Table of Contents

API : AI usage : Timeseries

Introduction

This request returns AI usage over time as chart data (labels + one dataset per service), bucketed per day, week, month or year in the Europe/Copenhagen timezone. Weeks are ISO weeks (Monday start, labels like 2026-W33).

Scoping is identical to the summary endpoint.

Request

URL https://api.telecomx.dk/ai/usage/timeseries
Method GET
Access level MANAGER (scoped)
Query from Start of period, ISO date.
to End of period, ISO date.
bucket [optional] day (default), week, month or year.
measure [optional] requests (default), units or cost. cost (DKK) is ADMIN/RESELLER_ADMIN only. units means characters for TTS, audio minutes for STT and tokens for LLM.
customer [optional] Only usage for this customer id.
reseller [optional] Only usage under this reseller id.
service [optional] TTS, STT or LLM - limits the datasets to one service.
context [optional] See the section page for values.

Query examples

https://api.telecomx.dk/ai/usage/timeseries?from=2026-01-01&to=2026-08-12&bucket=month&measure=requests
https://api.telecomx.dk/ai/usage/timeseries?from=2026-08-01&to=2026-08-12&bucket=day&measure=cost

Response

Property Type Description
labels Array Bucket labels, e.g. 2026-08-12, 2026-W33, 2026-08 or 2026. Dense - buckets without data are included with zero values.
datasets Array One entry per service.
datasets[].service String TTS, STT or LLM.
datasets[].lineColor String Chart line color, e.g. rgb(66, 133, 244).
datasets[].fillColor String Chart fill color with alpha.
datasets[].data Array One number per label (the chosen measure).

Errors

Error code Message Description
400 validation Invalid or missing query parameters
403 access_denied Insufficient access level, or measure=cost requested below RESELLER_ADMIN
500 internal_error <Unspecified>