修改令牌

PUT /api/token/

MethodPUT
Path/api/token/
Typehttp
Status1
Module2102810
Folder53539301

概览

MethodPUT
Path/api/token/
Typehttp
Status1
Module2102810
Folder53539301

参数

{
  "header": [
    {
      "name": "content-type",
      "required": true,
      "description": "",
      "id": "7H2Rqn6XK7",
      "type": "string",
      "enable": true,
      "sampleValue": "application/json"
    },
    {
      "name": "new-api-user",
      "required": true,
      "description": "",
      "id": "xSB5yARUyW",
      "type": "string",
      "enable": true,
      "sampleValue": "1"
    },
    {
      "required": false,
      "description": "系统令牌",
      "type": "string",
      "id": "4OUJB2UZ7F",
      "enable": true,
      "name": "Authorization",
      "sampleValue": ""
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "令牌名字"
      },
      "remain_quota": {
        "type": "integer",
        "description": "50w为1刀"
      },
      "expired_time": {
        "type": "integer",
        "description": "到期时间戳  单位秒 没有到期限制设置为-1"
      },
      "unlimited_quota": {
        "type": "boolean",
        "description": "无限额度设置"
      },
      "model_limits_enabled": {
        "type": "boolean",
        "description": "可用模型限制设置"
      },
      "model_limits": {
        "type": "string",
        "description": "可用模型列表:  模型名字按,号分割"
      },
      "allow_ips": {
        "type": "string",
        "description": "白名单IP列表:  按\\n号分割"
      },
      "group": {
        "type": "string",
        "description": "支持分组  按,号分割"
      }
    },
    "required": [
      "name",
      "remain_quota",
      "expired_time",
      "unlimited_quota",
      "model_limits_enabled",
      "model_limits",
      "allow_ips",
      "group"
    ],
    "x-apifox-orders": [
      "name",
      "remain_quota",
      "expired_time",
      "unlimited_quota",
      "model_limits_enabled",
      "model_limits",
      "allow_ips",
      "group"
    ]
  },
  "mediaType": "",
  "examples": [
    {
      "value": "{\r\n  \"id\": 194804,\r\n  \"remain_quota\": 250000000000,\r\n  \"expired_time\": -1,\r\n  \"unlimited_quota\": false,\r\n  \"model_limits_enabled\": false,\r\n  \"model_limits\": \"\",\r\n  \"group\": \"\",\r\n  \"mj_image_mode\": \"default\",\r\n  \"mj_custom_proxy\": \"\",\r\n  \"selected_groups\": [],\r\n  \"name\": \"令牌22名字\",\r\n  \"allow_ips\": \"\"\r\n}",
      "mediaType": "application/json",
      "description": ""
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 778962245,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": [],
    "oasExtensions": ""
  }
]