跳转到主要内容
GET
https://aihubmix.com
/
api
/
user
/
self
获取当前用户信息与余额
curl --request GET \
  --url https://aihubmix.com/api/user/self \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "username": "your_name",
    "display_name": "your_name",
    "role": 1,
    "status": 1,
    "email": "you@example.com",
    "quota": 29071257,
    "used_quota": 286403484,
    "request_count": 614422,
    "group": "default",
    "aff_code": "XXXX",
    "notify": true,
    "quota_remind_threshold": 10000000,
    "notify_email": "you@example.com",
    "ext": ""
  },
  "message": "",
  "success": true
}
用于查询当前登录用户的基本信息与余额额度。

请求参数

请求头(headers)

请求身份认证。接口使用 AIHubMix Manage Key 进行身份认证。
请求内容类型。此参数必须设置为 application/json。

响应参数

data
object
用户信息对象,包含基本资料、余额额度与提醒设置。
username
string
用户名。
display_name
string
用户展示名。
role
integer
用户角色标识(数值越大权限越高,如管理员)。
status
integer
账户状态(1 为正常)。
email
string
邮箱。
quota
integer
账户余额,实际金额(美元)为: quota / 500000。
used_quota
integer
已使用额度,实际金额(美元)为: used_quota / 500000。
request_count
integer
累计请求次数。
group
string
账户分组。
aff_code
string
邀请码。
notify
boolean
是否接受低余额提醒。
quota_remind_threshold
integer
余额低于 quota_remind_threshold / 500000 时接收邮件提醒。
notify_email
string
接收提醒的邮箱地址。
ext
string
扩展字段(预留,通常为空字符串)。
message
string
请求失败的详细信息。请求成功时不会返回此参数。
success
boolean
是否成功
{
  "data": {
    "username": "your_name",
    "display_name": "your_name",
    "role": 1,
    "status": 1,
    "email": "you@example.com",
    "quota": 29071257,
    "used_quota": 286403484,
    "request_count": 614422,
    "group": "default",
    "aff_code": "XXXX",
    "notify": true,
    "quota_remind_threshold": 10000000,
    "notify_email": "you@example.com",
    "ext": ""
  },
  "message": "",
  "success": true
}

更新时间:2026-06-26