SaaS
Documentation

Getting Started

  • Introduction
  • Quick Start

Core Features

  • Device Management
  • Scene Configuration
  • AI Analysis
  • LLM / VLM
  • Alert System

API Reference

  • API Overview
  • API Keys
  • Devices
  • Scenes
  • Alerts
  • Analysis Control
  • Data Query
  • LLM / VLM API
  • Billing Dashboard
  • Usage API
  • Admin Quota
  • Webhook
  • SSE Streaming

References

  • Metric Paths
  • Error Codes
  • Changelog

Billing Dashboard API

v0.10.0+ 計費儀表板與配額交易端點(4-feature 模型)

端點總覽

方法路徑說明
GET/api/v1/billing/monthly-quota查詢當月配額狀態(UserQuotaDto)
GET/api/v1/billing/quota查詢配額限額與用量(Legacy)
GET/api/v1/billing/summary查詢帳期用量摘要
GET/api/v1/billing/summary/by-device查詢各設備用量明細
GET/api/v1/billing/usage查詢用量事件歷史(分頁)
GET/api/v1/billing/dashboard/trend用量趨勢圖
GET/api/v1/billing/dashboard/comparison同期對比
GET/api/v1/billing/dashboard/forecast用量預測
GET/api/v1/billing/transactions配額交易紀錄(Ledger)

共用模型:4-feature

{
  "analysisSeconds": 3600,
  "alertCount": 150,
  "attributeCount": 80,
  "vlmTokens": 12000
}
欄位說明
analysisSeconds分析處理秒數
alertCount告警觸發次數
attributeCount屬性偵測次數
vlmTokensVLM token 使用量

重要規則

  • billingPeriod 使用 YYYY-MM,格式不符會回傳 400。
  • month 粒度趨勢圖效能最佳(直接讀月表)。
  • 指定 deviceId 的 month 粒度會使用設備層級配額表。

常用查詢

1) 當月配額狀態

GET /api/v1/billing/monthly-quota

回傳完整 UserQuotaDto,含分析秒數與 alert/attribute/vlm 餘額。

2) 帳期摘要

GET /api/v1/billing/summary?billingPeriod=2026-02

回傳當期 4-feature 用量與 usageByType 分佈。

3) 趨勢圖

GET /api/v1/billing/dashboard/trend?granularity=day&startDate=...&endDate=...

可搭配 deviceId 做單設備趨勢。

4) 配額交易明細

GET /api/v1/billing/transactions?page=1&limit=20

支援 featureType / type / source / 日期範圍篩選。

交易來源 (source)

Source說明
system_initial新用戶初始配額
admin_manual管理員手動加值
admin_adjustment管理員覆寫調整
consumption正常消耗
usage_rollback失敗回沖
payment付款購買(預留)

相關頁面

  • Usage API
  • Admin 配額管理
  • 錯誤碼參考
SaaS

AI-powered intelligent video analytics platform, empowering your surveillance system.

Product

  • Features
  • Pricing
  • Changelog

Resources

  • Documentation
  • API Reference
  • Examples

Company

  • About Us
  • Contact Us
  • Privacy Policy

© 2026 Luminys. All rights reserved.

Terms of ServicePrivacy Policy