openai-hk 相关API
这边提供一些 openai-hk.com 相关的api
1.使用 apikey 登录
- 登录网址 https://www.openai-hk.com/m/aisk
- 使用 apikey 登录后;可以充值、查询自己的日志等
2.开账号
- 需要告知我们您服务端的IP,白名单认证
- 开的账号 获得
apikey可以用于登录、查询日志、调用等
返回
json
{
"data": {
"apikey":"hk-xxxx"
},
"error": 0,
"error_des": ""
}{
"data": {
"apikey":"hk-xxxx"
},
"error": 0,
"error_des": ""
}3.获取使用日志
shell
curl --request POST \
--url https://www.openai-hk.com/openai/sk/log \
--header 'Authorization: Bearer hk-你的key' \
--header 'content-type: application/json' \
--data '{
"start":0
,"limit":30
}'curl --request POST \
--url https://www.openai-hk.com/openai/sk/log \
--header 'Authorization: Bearer hk-你的key' \
--header 'content-type: application/json' \
--data '{
"start":0
,"limit":30
}'请求
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| start | number | 是 | 开始游标.必须大于等于0 |
| limit | number | 是 | 取几条 0<limit<=300 |
返回
json
{
"data": {
"logs": [
{
"id": "6438975",
"user_id": "9",
"ctime": "1703405714",
"prompt_tokens": "59",
"completion_tokens": "11",
"fen": "3",
"model": "gpt-3.5-turbo",
"yufen": "141434",
"reqid": "vS0cNCTLSlXej4w1",
"ip": "43.154.119.189",
"note": ""
},
]
},
"error": 0,
"error_des": ""
}{
"data": {
"logs": [
{
"id": "6438975",
"user_id": "9",
"ctime": "1703405714",
"prompt_tokens": "59",
"completion_tokens": "11",
"fen": "3",
"model": "gpt-3.5-turbo",
"yufen": "141434",
"reqid": "vS0cNCTLSlXej4w1",
"ip": "43.154.119.189",
"note": ""
},
]
},
"error": 0,
"error_des": ""
}日志字段说明
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | string | 是 | 名称 |
| user_id | string | 是 | 用户id |
| ctime | string | 是 | 创建时间 |
| prompt_tokens | string | 是 | 提示(提问)的token |
| completion_tokens | string | 是 | 补齐(回答)的token |
| fen | string | 是 | 消耗积分 |
| model | string | 是 | 模型 |
| yufen | string | 是 | 积分余额 |
| reqid | string | 是 | 请求唯一ID |
| ip | string | 是 | 请求ip |
| note | string | 是 | 备注 |
OpenAi-HK