GET /openapi/memorylake/admin/v1/billing/credit-balance
所需权限:
credits:viewcurl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/billing/credit-balance' \
-H 'Authorization: Bearer sk_xxxxxx'
响应
object
显示 Credit Balance 对象
显示 Credit Balance 对象
integer
以 tokens 计的团队余额:
one_time 加上未过期的订阅额度。每部分各自向下取整,因此两者之和最多可比此值少 1 个 token。此处不应用成员自身的用量上限(参见 GET /usage)。string
standard 表示用量会扣减余额;metering_only 表示用量仅记录、不扣费array
boolean
true 表示用量不从余额中扣除(
billing_mode 为 metering_only){
"success": true,
"message": "Operation completed successfully",
"data": {
"available_tokens": 1200000,
"billing_mode": "standard",
"breakdown": [
{
"source": "subscription",
"tokens": 1200000,
"expires_at": 1760000000
}
],
"unlimited": false
}
}
错误
出错时返回success: false、message 和 error_code。全部错误码见错误码。
| 状态码 | 含义 |
|---|---|
401 | API Key 缺失、无效、已停用或已过期 |
403 | 该 Key 无权执行此操作 |
429 | 请求过多,请按 Retry-After 等待后重试 |
500 | 服务端错误 |