Amux AI

查询余额与额度

最近更新:2026年10月29日

查询账户可用余额,以及 API 密钥和所属工作区的消费限额。

查询账户可用余额,以及当前 API 密钥和所属工作区的消费限额。该接口不计费。

GEThttps://gateway.amux.ai/v1/credits

鉴权

header
Authorizationstring必填

Bearer <你的 Amux AI 密钥> 控制台创建的 Amux 密钥。忘了可以回控制台的密钥页再看一次。

响应

200response

余额与额度。

401response

密钥缺失或无效。

字段可见性

各字段仅在当前密钥有权查看时返回,否则省略。

字段返回条件
balance个人工作区的密钥,或组织管理员的密钥
keyQuota当前密钥设置了消费限额
quota组织管理员的密钥,且工作区设置了消费限额

账户余额与工作区额度属于整个组织,不向组织普通成员的密钥返回。

金额与周期

  • 金额为美元十进制字符串,例如 "48.25"。计算时请按十进制处理,避免浮点误差。
  • balance 为可用余额,已扣除进行中任务的预扣金额及已过期的赠送额度。
  • keyQuota 与 quota 按 total(累计)、day、week、month 四个周期给出。未设置上限的周期,limit 与 remaining 为 null。

可用额度

可用额度指当前密钥实际可消费的金额,取以下各项的最小值,且不小于 0:

  • 账户可用余额;
  • 密钥消费限额的剩余金额;
  • 工作区消费限额的剩余金额。

各项仅在当前密钥有权查看时参与计算,规则见上文「字段可见性」;均不可见时,可用额度视为不受限。成员消费限额不参与计算,但在调用时仍然生效。

中转兼容接口返回的余额均为可用额度。

cURL
curl https://gateway.amux.ai/v1/credits \
  -H "Authorization: Bearer $AMUX_API_KEY"
{
  "balance": "48.25",
  "keyQuota": {
    "total": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    },
    "day": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    },
    "week": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    },
    "month": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    }
  },
  "quota": {
    "total": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    },
    "day": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    },
    "week": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    },
    "month": {
      "limit": "100",
      "used": "12.5",
      "remaining": "87.5",
      "resetsAt": "2026-11-01T00:00:00.000Z"
    }
  }
}