ModelSell 文档
管理接口令牌管理

创建令牌

创建新的 API 令牌。

POST
/api/token/

创建新的 API 令牌。

Authorization

AuthorizationBearer <token>

使用 Authorization Bearer API Key 进行鉴权。

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/token/" \  -H "Content-Type: application/json" \  -d '{    "name": "default",    "remain_quota": 500000,    "expired_time": -1  }'
{
  "success": true,
  "message": "string",
  "data": {
    "id": 0,
    "name": "string",
    "key": "string",
    "status": 0,
    "remain_quota": 0,
    "used_quota": 0,
    "expired_time": 0,
    "created_time": 0
  }
}