获取账号信息
GET
https://api.apizt.com/api/user/self获取当前鉴权账号的基本信息、账号分组、剩余额度和累计使用情况。
请求参数
Header 参数
Authorizationheaderstring必需Bearer 后填写个人设置中的系统访问令牌,不使用模型 API Key。
new-api-userheaderstring必需当前用户 ID,须与系统访问令牌所属账号一致。
返回响应
application/json
data object
display_name string显示名称
email string邮箱
group string用户组 / 分组
id integer资源或任务 ID
phone string手机号
quota integer额度
request_count integer请求次数
role integer消息角色,如 system / user / assistant / model
status integer状态
used_quota integer已用额度
username string用户名
message string提示信息
success boolean是否成功
application/json
error* object
message* string错误说明(末尾常附带 request id)
type* string错误类型;网关本地错误一般为 new_api_error
调用时需携带系统访问令牌和当前账号 ID,填写方式见 Header 参数。
响应为结构示例,实际错误文本以返回的 message 或 error.message 为准。
quota 是账号余额;查询单枚模型 API Key 的额度与使用情况请使用获取令牌使用情况。