Skip to content

Batch Update Tokens

PUT
/api/token/batch
  • Batch update the configuration of multiple API tokens
  • Can update groups, quotas, expiration time, model restrictions, etc.
  • Requires system token authentication

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
object

List of token IDs to update

[Optional] Groups, separated by comma, priority by order

[Optional] Expiration time

[Optional] Quota, 50w equals $1

[Optional] true for unlimited quota, false means remain_quota is effective

[Optional] Model restriction list, separated by comma

[Optional] Enable model restrictions

[Optional] Whitelist, separated by newline

[Optional] Image proxy mode, only origin and proxy available

[Optional] Custom image proxy URL, only effective when mj_image_mode is proxy

List of fields to update in batch

Responses

Success

application/json
object

Number of rows updated

Whether execution was successful

Execution message

Playground

Authorization
Headers
Body

Samples