Console API
GET
/api/quota/balance用量與餘額
| Field | Type | Description |
|---|---|---|
| org_id | string · required | 組織 id。 |
| workspace_id | string | 加上工作區範圍。 |
| project_id | string | 須同時帶 workspace_id;回傳專案即時餘額。 |
| Field | Type | Description |
|---|---|---|
| org_id | string · required | 組織 id。 |
| period | string | `YYYY-MM`(UTC),預設當月。 |
| workspace_id / project_id | string | 縮小範圍。 |
要輪詢哪一個?
做自動切換模型或預算告警,請輪詢 /api/quota/balance(三個 id 都帶)——它是唯一每筆請求都會更新的值。billing/summary 的彙總在數分鐘內落帳,適合報表,不適合即時決策。