---
title: "Set developer key usage limits as an admin"
method: PUT
path: "/v2/admin/developer-keys/limits"
tags: ["AdminApi"]
---

# Set developer key usage limits as an admin

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

## Request body

- object
  - `key_id` string, required — 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.

## Response `200`

The set usage limits function returns a JSON representation of the modified API key.

- ApiKey — The API key.
  - `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.
    - `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.

## Other responses

- `400` — Bad request. Please check error message and your parameters.
- `403` — Authorization failed. Please supply a valid `DeepL-Auth-Key` via the `Authorization` header.
- `404` — The requested resource could not be found.
- `500` — Internal error.

---

[API](https://skmtc.dev/deepl/apis/deepl-api-documentation.md) · [All operations](https://skmtc.dev/deepl/apis/deepl-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deepl/deepl-api-documentation/revisions/3c422fcc9c54/schema)
