---
title: "Update Token"
method: PUT
path: "/api/token/"
tags: ["Token"]
---

# Update Token

`PUT /api/token/`

## Request

- Base URL: `https://api.unorouter.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.unorouter.com/api/token/`
- Auth: one of:
  - API key in header `Authorization` and API key in header `New-Api-User`
  - API key in header `New-Api-User` and API key in cookie `session`

## Query parameters

- `status_only` string

## Request body

- UpdateTokenRequest: UpdateTokenRequest schema
  - `allow_ips` string, nullable, required
  - `allow_user_quota_query` boolean, nullable, required
  - `auto_groups` string[], nullable, required
  - `cross_group_retry` boolean, nullable, required
  - `default_reasoning_effort` string, nullable, required
  - `expired_time` integer, required
  - `group` string, required
  - `group_mapping` string, nullable, required
  - `id` integer, required
  - `max_input_price` number, double, nullable, required
  - `max_output_price` number, double, nullable, required
  - `model_limits` string, required
  - `model_limits_enabled` boolean, required
  - `name` string, required
  - `prompt_cache` string, nullable, required
  - `remain_quota` integer, required
  - `status` integer, required
  - `unlimited_quota` boolean, required

## Response `200`

OK

- ResponseControllerTokenResponse: Response_controller.TokenResponse schema
  - `data` TokenResponse, required
    - `accessed_time` integer, required
    - `allow_ips` string, nullable, required
    - `allow_user_quota_query` boolean, required
    - `auto_groups` string[], nullable, required
    - `created_time` integer, required
    - `cross_group_retry` boolean, required
    - `default_reasoning_effort` string, required
    - `expired_time` integer, required
    - `group` string, required
    - `group_mapping` string, required
    - `id` integer, required
    - `key` string, required
    - `max_input_price` number, double, required
    - `max_output_price` number, double, required
    - `model_limits` string, required
    - `model_limits_enabled` boolean, required
    - `name` string, required
    - `prompt_cache` string, required
    - `remain_quota` integer, required
    - `status` integer, required
    - `unlimited_quota` boolean, required
    - `used_quota` integer, required
    - `user_id` integer, required
  - `message` string, required
  - `success` boolean, required

## Changes

- **2026-11-28** `862a0e26e376`: 2 breaking, 4 info
  - added the new required request property `max_input_price`
  - added the new required request property `max_output_price`
  - added the required property `data/max_input_price` to the response with the `200` status (media type: application/json)
  - added the required property `data/max_input_price` to the response with the `200` status (media type: application/xml)
  - …2 more
- **2026-10-28** `67366f1fcc53`: 1 breaking, 2 info
  - added the new required request property `prompt_cache`
  - added the required property `data/prompt_cache` to the response with the `200` status (media type: application/json)
  - added the required property `data/prompt_cache` to the response with the `200` status (media type: application/xml)
- **2026-10-19** `2b7368f45936`: 1 breaking, 2 info
  - added the new required request property `default_reasoning_effort`
  - added the required property `data/default_reasoning_effort` to the response with the `200` status (media type: application/json)
  - added the required property `data/default_reasoning_effort` to the response with the `200` status (media type: application/xml)
- …earlier changes not shown

[Operation history](https://skmtc.dev/unorouter/apis/new-api/changes/api/token/put.md)

---

[API](https://skmtc.dev/unorouter/apis/new-api.md) - [All operations](https://skmtc.dev/unorouter/apis/new-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unorouter/apis/new-api/revisions/1b50ada14f59?raw)
