1. APIkey
OpenAI-Hub接口文档
  • 对接说明
  • APIkey
    • 获取 API Key 列表
      GET
    • 搜索 API Key
      GET
    • 获取 API Key 详情
      GET
    • 获取 API Key 明文
      POST
    • 新建 API Key
      POST
    • 修改 API Key
      PUT
    • 删除 API Key
      DELETE
    • 批量删除 API Key
      POST
    • 批量获取 API Key 明文
      POST
  • 消费日志
    • 获取消费日志
    • 获取消费统计
AI模型接口图片异步提交后台管理接口
AI模型接口图片异步提交后台管理接口
  1. APIkey

获取 API Key 列表

GET
/api/token/
分页获取当前用户的 API Key(令牌)列表,返回的 key 已脱敏。

鉴权#

在「个人设置 → 系统访问令牌」生成访问令牌,调用时同时携带:
Authorization: <访问令牌>(不带 Bearer 前缀)
New-Api-User: <用户 ID>
本目录下所有接口共用此鉴权方式,不再单独说明。

请求参数

Query 参数

Header 参数

返回响应

🟢200成功
application/json
Bodyapplication/json

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api.openai-hub.com/api/token/' \
--header 'Authorization: Bearer sk-0ABIEXVjh9****Qckjy' \
--header 'New-Api-User: 1'
响应示例响应示例
{
    "success": true,
    "message": "string",
    "data": {
        "page": 0,
        "page_size": 0,
        "total": 0,
        "items": [
            {
                "id": 0,
                "user_id": 0,
                "key": "string",
                "status": 0,
                "name": "string",
                "created_time": 0,
                "accessed_time": 0,
                "expired_time": 0,
                "remain_quota": 0,
                "unlimited_quota": true,
                "used_quota": 0,
                "model_limits_enabled": true,
                "model_limits": "string",
                "allow_ips": "string",
                "group": "string",
                "cross_group_retry": true
            }
        ]
    }
}
上一页
对接说明
下一页
搜索 API Key
Built with