Get Subscription Detail
GET https://zenmux.ai/api/v1/management/subscription/detail获取当前账号的订阅详情,包括套餐信息、Flow 汇率、账号状态及各时间窗口的用量配额。
鉴权
Authorization Header
http
Authorization: Bearer <ZENMUX_MANAGEMENT_API_KEY>- 参数名:
Authorization - 格式:
Bearer <API_KEY> - 说明:Management API Key,在 ZenMux 控制台 创建
⚠️ 仅支持 Management API Key
本接口仅接受 Management API Key 鉴权,不支持普通 API Key。
限流
每个接口独立计数,每分钟最大请求数由平台统一配置。超出限制时返回 422 错误。
返回值
data.plan object
当前套餐信息:
tierstring— 套餐等级,如"free"/"pro"/"max"/"ultra"amount_usdnumber— 套餐月费(美元)intervalstring— 计费周期,固定为"month"expires_atstring— 当前订阅周期到期时间(ISO 8601)
data.currency string
货币单位,固定为 "usd"。
data.base_usd_per_flow number
当前套餐的平台基准汇率(美元/Flow)。
data.effective_usd_per_flow number
账号实际有效汇率(美元/Flow)。正常情况下与基准汇率相同,存在异常时可能更高。
data.account_status string
账号当前状态,枚举值:
| 值 | 说明 |
|---|---|
healthy | 正常 |
monitored | 监控中,用量异常但仍可正常使用 |
abusive | 滥用,已触发限制 |
suspended | 已暂停 |
banned | 已封禁 |
data.quota_5_hour object
5 小时滚动窗口配额(高频保护机制):
usage_percentagenumber— 当前周期已用百分比(0–1),精确到 4 位小数resets_atstring | null— 当前窗口重置时间(ISO 8601);窗口未开始时为nullmax_flowsnumber— 窗口内最大可用 Flow 数used_flowsnumber— 已使用 Flow 数remaining_flowsnumber— 剩余可用 Flow 数used_value_usdnumber— 已使用对应的美元价值max_value_usdnumber— 窗口总额度对应的美元价值
data.quota_7_day object
7 天滚动窗口配额,字段结构与 quota_5_hour 相同。
data.quota_monthly object
当月订阅周期总配额(仅含上限,无实时用量):
max_flowsnumber— 当月最大可用 Flow 数max_value_usdnumber— 当月总额度对应的美元价值
💡 配额说明
quota_5_hour和quota_7_day均为滚动窗口,每次请求后实时更新quota_monthly为固定的订阅周期上限,不含实时用量数据- 三个维度同时生效,任一维度超限均会限制请求
cURL
curl https://zenmux.ai/api/v1/management/subscription/detail \
-H "Authorization: Bearer $ZENMUX_MANAGEMENT_API_KEY"python
import requests
response = requests.get(
"https://zenmux.ai/api/v1/management/subscription/detail",
headers={"Authorization": f"Bearer {ZENMUX_MANAGEMENT_API_KEY}"}
)
print(response.json())javascript
const response = await fetch("https://zenmux.ai/api/v1/management/subscription/detail", {
headers: { Authorization: `Bearer ${ZENMUX_MANAGEMENT_API_KEY}` },
});
const data = await response.json();响应示例
json
{
"success": true,
"data": {
"plan": {
"tier": "ultra",
"amount_usd": 200,
"interval": "month",
"expires_at": "2026-04-12T08:26:56.000Z"
},
"currency": "usd",
"base_usd_per_flow": 0.03283,
"effective_usd_per_flow": 0.03283,
"account_status": "healthy",
"quota_5_hour": {
"usage_percentage": 0.0715,
"resets_at": "2026-03-24T08:35:09.000Z",
"max_flows": 800,
"used_flows": 57.2,
"remaining_flows": 742.8,
"used_value_usd": 1.88,
"max_value_usd": 26.27
},
"quota_7_day": {
"usage_percentage": 0.0673,
"resets_at": "2026-03-26T02:15:05.000Z",
"max_flows": 6182,
"used_flows": 416.11,
"remaining_flows": 5765.89,
"used_value_usd": 13.66,
"max_value_usd": 202.99
},
"quota_monthly": {
"max_flows": 34560,
"max_value_usd": 1134.33
}
}
}