> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set User Extra Usage Limit

> Set a member's extra usage limit, or restore the plan and group default

List active human members, change a plan, and set the extra usage limit. Amounts are euros.

The calls use the workspace API key's `BILLING_API` scope. Writes run as the key's service account owner. This API does not invite or deactivate members. Use the [User Management API](https://docs.langdock.com/en/developer/user-management-api/user-management-overview.md) for that.

> [!NOTE]
>
> Call these routes when `GET /billing/v1/mode` returns `ai-models-included`. Dedicated deployments always return `bring-your-own-keys`, including when Langdock manages the model keys. The other mode returns `409` with `code` `BILLING_MODE_MISMATCH`.

## Base URL

```
https://api.langdock.com/billing/v1/ai-models-included/users/{userId}/extra-usage-limit
```

## Prerequisites

* **API key** with the `BILLING_API` scope
* The key owner is a service account that has not been deleted and has an active Admin membership
* `USER_MANAGEMENT_API` on the same key when you need `email`, `name`, or an email filter

## Set an extra usage limit

`PUT /users/{userId}/extra-usage-limit` takes the limit directly. There is no wrapper field.

```json theme={null}
{ "type": "limited", "amount": 80 }
```

`{ "type": "inherit" }` restores the plan and group defaults. `{ "type": "unlimited" }` removes the personal cap. A limited amount may be zero. This value does not accept `none`.

An explicit limit overrides the plan and every group. With `inherit`, the higher plan or group limit applies. See [Get Included User](https://docs.langdock.com/en/developer/billing-api/get-included-user.md) for how `effective.source` is chosen. Turning extra usage off, or the workspace extra usage cap, still applies on top of an unlimited personal limit.

If the effective limit was limited and the new effective limit is higher or unlimited, the member's pending usage request is closed. The same limit or a lower one leaves the request open. Without `usageRequestId`, the limit is saved even if closing the request fails.

Pass `usageRequestId` as a query parameter to answer that request in the same write. The limit is kept only when the request belongs to this member, is still pending, and the effective limit rises as described above. Otherwise nothing is written. A missing request, or one that is not this member's, returns `404` with `code` `NOT_FOUND`. A request that is no longer pending returns `409` with `code` `USAGE_REQUEST_NOT_PENDING`. A change that does not raise the allowance returns `409` with `code` `USAGE_REQUEST_NOT_ANSWERED`. The request stays pending.

The response is the member object with `extraUsagePeriodSpend` set to `null`.

> [!NOTE]
>
> Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on [API Key Best Practices](https://docs.langdock.com/en/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.