> For the complete documentation index, see [llms.txt](https://doc.bodinat.de/doc/deepl/llms.txt)

# Set developer key usage limits as an admin

> PUT /v2/admin/developer-keys/limits



## Servers
- DeepL API Pro: https://api.deepl.com (DeepL API Pro)
- DeepL API Free: https://api-free.deepl.com (DeepL API Free)


## Authentication methods
- Auth header


## Parameters



### Body: application/json (object)

- **key_id** (string)
  API key ID. Consists of two valid GUIDs separated by a colon.

- **characters** (number)
  Restricts the number of total characters (across text translation, document translation, and text improvement) that can be consumed by an API key in a one-month usage period.
  Setting the limit to `0` means the API key will not be able to consume characters.
  Setting the limit to `null` disables the limit, effectively allowing unlimited usage.

- **speech_to_text_milliseconds** (number)
  Restricts the number of milliseconds of speech-to-text that can be consumed by an API key in a one-month usage period.
  Setting the limit to `0` means the API key will not be able to consume speech-to-text milliseconds.
  Setting the limit to `null` disables the limit, effectively allowing unlimited usage.



## Responses
### 200
The set usage limits function returns a JSON representation of the modified API key.
#### Headers

- **X-Trace-ID** ()


#### Body: application/json (object)
- **key_id** (string)
  API key ID. Consists of two valid GUIDs separated by a colon.

- **label** (string)
  API key label. The default value is `DeepL API Key`.

- **creation_time** (string)
  Timestamp when the key was created (ISO 8601 format)

- **deactivated_time** (string)
  Timestamp when the key was deactivated (ISO 8601 format). The default value is `null`.

- **is_deactivated** (boolean)
  Flag indicating whether the API key is deactivated. The default value is `false`.

- **usage_limits** (object)
  Usage limits for the API key.


### 400
Bad request. Please check error message and your parameters.
#### Headers

- **X-Trace-ID** ()


### 403
Authorization failed. Please supply a valid `DeepL-Auth-Key` via the `Authorization` header.
#### Headers

- **X-Trace-ID** ()


### 404
The requested resource could not be found.
#### Headers

- **X-Trace-ID** ()


### 500
Internal error.
#### Headers

- **X-Trace-ID** ()



[Powered by Bump.sh](https://bump.sh)
