Models Hub
API ReferenceToken Management

Create token

Create a new API token.

Edit this page
POST
/api/token/

Authorization

AuthorizationBearer <token>

Authenticate using an 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
  }
}