Alibaba Cloud Model Studios
Full billing visibility for Alibaba Cloud's Model Studios (DashScope). Surfaces the billing period, balance, daily/monthly spend, request and token usage, and per-model quotas.
At a glance
- Provider ID —
alibaba_cloud - Detection —
ALIBABA_CLOUD_API_KEY(DashScope key) - Auth — API key
- Type — API platform (full billing data)
- Tracks:
- Account availability
- Billing period dates
- Balance, credit, spend limit (USD)
- Daily and monthly spend
- Tokens used
- Requests used
- RPM and TPM
- Per-model usage with
used / limitgauges
Setup
Auto-detection
Set ALIBABA_CLOUD_API_KEY to your DashScope API key.
Manual configuration
{
"accounts": [
{
"id": "alibaba_cloud",
"provider": "alibaba_cloud",
"api_key_env": "ALIBABA_CLOUD_API_KEY",
"base_url": "https://dashscope.aliyuncs.com/api/v1"
}
]
}
Data sources & how each metric is computed
OpenUsage sends one GET https://dashscope.aliyuncs.com/api/v1/quotas per poll cycle (default every 30 seconds in daemon mode). All other metrics are derived from the single response. Auth: Authorization: Bearer $ALIBABA_CLOUD_API_KEY.
The response shape is { "code": "Success", "data": { … } }. A non-Success code is treated as an error.
rpm / tpm — account-wide rate limits
- Source:
data.rate_limit.rpmanddata.rate_limit.tpm. - Transform: each integer is stored as a metric
Limit. These are caps; live counters are not exposed at the account level.
credit_balance — available credit
- Source:
data.credits. - Transform: stored as
Limitofcredit_balance(USD).
available_balance
- Source:
data.available. - Transform: stored as
Limitofavailable_balance(USD).
spend_limit — hard cap
- Source:
data.spend_limit. - Transform: stored as
Limitofspend_limit(USD).
daily_spend / monthly_spend
- Source:
data.daily_spendanddata.monthly_spend. - Transform: stored as
Used. Window is1dand30drespectively.
tokens_used / requests_used
- Source:
data.tokens_used,data.requests_used. - Transform: copied verbatim into
Used(unitstokens,requests).
Billing period
- Source:
data.billing_period.startanddata.billing_period.end. - Transform: stored as
Attributes["billing_cycle_start"]andAttributes["billing_cycle_end"].
Per-model rows
- Source:
data.models[]array. Each row carries a model name withusedandlimitvalues. - Transform: each model produces two metrics —
model_<name>_usage_pct(percentage) andmodel_<name>_used(rawused / limitgauge inunits).
Auth status
- Source: HTTP status code first.
401/403→auth(Invalid or expired API key);429→limited; non-200 →error. After that, a non-Successcodein the body promotes the snapshot toerror.
What's NOT tracked
- Day-by-day breakdown. The endpoint returns totals; no time series is produced.
- Per-model spend. The per-model rows expose rate-limit usage but not dollar cost.
How fresh is the data?
- Polled every 30 s by default. DashScope's
/quotasis a near-real-time aggregate.
API endpoints used
GET /api/v1/quotas
Caveats
- Billing is reported in USD even though the underlying account may be CNY-funded; reconcile against your Alibaba Cloud invoice.
- Per-model quotas vary by region and account tier; the dashboard shows whatever the API returns.
- The billing period is the calendar month.
Troubleshooting
- Account unavailable — verify the DashScope service is enabled for your Alibaba Cloud account.
- Empty per-model rows — your key may have no model permissions; check DashScope's console.
- Spend over limit — Alibaba enforces hard limits at the account level; raise the limit in the console.