Skip to main content
GET
https://aihubmix.com
/
api
/
user
/
self
Retrieve Current User Information and Balance
curl --request GET \
  --url https://aihubmix.com/api/user/self \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": 123,
    "username": "<string>",
    "password": "<string>",
    "display_name": "<string>",
    "role": 123,
    "status": 123,
    "email": "<string>",
    "github_id": "<string>",
    "google_id": "<string>",
    "wechat_id": "<string>",
    "lark_id": "<string>",
    "oidc_id": "<string>",
    "clerk_id": "<string>",
    "migrated_at": "<string>",
    "verification_code": "<string>",
    "access_token": "<string>",
    "quota": 123,
    "used_quota": 123,
    "group": "<string>",
    "aff_code": "<string>",
    "inviter_id": 123,
    "created_at": 123,
    "notify": true,
    "quota_remind_threshold": 123,
    "notify_email": true
  },
  "message": "<string>",
  "success": true
}
This endpoint is used to query the basic information and balance of the currently logged-in user.

Request Parameters

Request Headers (headers)

Authentication for the request. This API uses the AIHubMix Manage Key for authentication.
Content type of the request. This parameter must be set to application/json.

Response Parameters

data
object
User information object (typically includes username, display_name, quota, etc.).
id
integer
User ID.
username
string
Username.
password
string
Password.
display_name
string
User display name.
role
integer
Administrator identifier.
status
integer
Account status.
email
string
Email.
github_id
string
GitHub ID.
google_id
string
Google ID.
wechat_id
string
WeChat ID.
lark_id
string
Lark ID.
oidc_id
string
OpenID Connect ID.
clerk_id
string
Clerk ID.
migrated_at
string
Account authentication timestamp.
verification_code
string
Verification code.
access_token
string
Key for system administration.
quota
integer
Account balance is: quota / 500000.
used_quota
integer
Used quota is: used_quota / 500000.
group
string
Account group.
aff_code
string
Invitation code.
inviter_id
integer
Inviter ID.
created_at
integer
Account creation time, stored as UNIX timestamp.
notify
boolean
Whether to receive low balance alerts.
quota_remind_threshold
integer
Receive email alerts when balance falls below quota_remind_threshold / 500000.
notify_email
boolean
Receive alert emails.
message
string
Detailed information on request failure. This parameter will not be returned if the request is successful.
success
boolean
Indicates success.