查询低余额提醒

GET/v1/billing/alert

返回当前认证账户的低余额提醒设置。

认证

Authorization Bearer

Authorization 请求头中携带 API Key(sk-...)。

响应

codeinteger

响应状态码。

dataobject

低余额提醒设置。

data.coupon_availablenumber

Coupon / Credit 可用余额。

data.total_spendablenumber

当前可支付余额。

data.enabledboolean

是否启用低余额邮件提醒。

data.last_notified_atstring | null

最近一次提醒时间。

data.last_recovered_atstring | null

余额恢复到阈值以上的最近时间。

data.thresholdnumber

提醒阈值(USD)。

data.wallet_availablenumber

钱包可用余额。

错误处理

  • 401 / 未认证:缺少或无效的 Authorization
  • 企业子账号不能直接使用钱包提醒接口。

请求

Shell
1curl -sS "https://api.token360.ai/v1/billing/alert" \
2  -H "Authorization: Bearer sk-your-api-key"

响应

JSON
1{
2  "code": 200,
3  "data": {
4    "coupon_available": 0e-10,
5    "total_spendable": 125.5,
6    "enabled": false,
7    "last_notified_at": null,
8    "last_recovered_at": null,
9    "threshold": 50.0,
10    "wallet_available": 125.5
11  },
12  "msg": "success",
13  "service_code": null,
14  "trace_id": "trace_example_123"
15}
此页面对您有帮助吗?