- 前言(必读)
- OpenAI官方SDK使用教程
- 批量请求示例
- 聊天模型(Chat)
- 内容审查
- 向量嵌入
- 图片处理
- 绘画模型(Painting)
- 视频模型(Video)
- 音频模型(Audio)
- 音乐创作(suno)
- 文档处理
- 3D模型
- 网络爬虫
- 更多接口开发中...
- 查询令牌用量GET
- 查询令牌限额GET
- 查询账户信息GET
查询账户信息
GET
/api/user/self
包括:剩余额度、已用额度、总请求次数等等
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
X-Api-User
integer
可选
Authorization
string
可选
示例值:
bearer 123456xxx
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.gpt.ge/api/user/self' \
--header 'X-Api-User;' \
--header 'Authorization: bearer 123456xxx'
返回响应
🟢200成功
application/json
Body
data
object
必需
id
integer
必需
username
string
必需
password
string
必需
display_name
string
必需
role
integer
必需
status
integer
必需
email
string
必需
github_id
string
必需
wechat_id
string
必需
oidc_id
string
必需
google_id
string
必需
verification_code
string
必需
access_token
null
必需
quota
integer
剩余额度
used_quota
integer
已用额度
request_count
integer
总请求次数
group
string
用户分组
can_use_self_group
boolean
必需
aff_code
string
Aff邀请ID
inviter_id
integer
必需
aff_count
integer
邀请次数
aff_quota
integer
邀请奖励额度
aff_history_quota
integer
历史邀请奖励额度
created_at
integer
必需
last_login_at
integer
必需
last_login_ip
string
必需
deleted_at
null
必需
group_ratio
integer
必需
topup_ratio
integer
必需
message
string
必需
success
boolean
必需
示例
{
"data": {
"id": 1,
"username": "xx@qq.com",
"password": "",
"display_name": "xx",
"role": 10,
"status": 1,
"email": "xx@qq.com",
"github_id": "xxxooo",
"wechat_id": "",
"oidc_id": "",
"google_id": "10283048099857931806",
"verification_code": "",
"access_token": null,
"quota": 1867213653,
"used_quota": 597081489,
"request_count": 3427970,
"group": "default",
"can_use_self_group": false,
"aff_code": "xXxx",
"inviter_id": 0,
"aff_count": 2,
"aff_quota": 0,
"aff_history_quota": 500000,
"created_at": 0,
"last_login_at": 1746636191,
"last_login_ip": "138.116.11.42",
"deleted_at": null,
"group_ratio": 1,
"topup_ratio": 1
},
"message": "",
"success": true
}
修改于 2025-05-30 07:58:48