github ranxi2001/sub2api v2.8.3
Sub2API 2.8.3

latest releases: v2.21.1, v2.21.0, v2.20.5...
one month ago

AI API Gateway Platform - 将 AI 订阅配额分发和管理

本版为账号计费增加独立的“分组计费倍率”。需要让 API Key 账号加入优惠分组、同时按指定价格向用户计费的部署,可以在账号级别覆盖分组倍率,而不改变原有账号成本统计口径。

账号分组计费倍率

  • 所有账号新增“分组计费倍率”,默认 1x,可在账号创建、编辑和批量编辑中单独调整。
  • 用户/API Key 实际扣费倍率为:分组生效倍率 × 账号分组计费倍率。
  • 例如分组倍率为 0.2x,账号分组计费倍率设为 5x,最终用户扣费恢复为 1x。
  • 原有“账号计费倍率”保持原语义,只影响账号成本统计,不参与用户/API Key 扣费。
  • 管理员导入导出、批量创建和账号列表返回均保留该字段,便于迁移和批量维护。

兼容与边界

  • 新增数据库迁移 241_add_account_group_rate_multiplier.sql;旧账号升级后默认按 1x 运行。
  • 负数倍率会被拒绝;0x 可用于将该账号的用户扣费设为零。
  • 账号级倍率与用户在分组上的个性化倍率分别参与计费解析,不能将账号成本倍率当作用户扣费倍率使用。
  • 本版本基于 owner fork 的 production,PR #26 及其他未合并功能不在本次范围内。

完整版本对比


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/ranxi2001/sub2api:2.8.3

One-line install (Linux):

curl -fsSL https://raw.githubusercontent.com/ranxi2001/sub2api/v2.8.3/deploy/install.sh | sudo bash -s -- install -v v2.8.3

Manual download:
Download the appropriate archive for your platform from the assets below.

📚 Documentation

Don't miss a new sub2api release

NewReleases is sending notifications on new releases.