---
title: "Set or restore a user's monthly included AI limit"
method: PUT
path: "/admin/hosted-ai/users/{userId}/limit"
---

# Set or restore a user's monthly included AI limit

`PUT /admin/hosted-ai/users/{userId}/limit`

## Request

- Base URL: `https://api.caveman.so/api/v1`
- URL: `https://api.caveman.so/api/v1/admin/hosted-ai/users/{userId}/limit`
- Auth: HTTP bearer

PUT /api/v1/admin/hosted-ai/users/{userId}/limit on the Caveman Cloud control plane. Operator plane: requires the platform admin token (Authorization: Bearer or x-cave-admin-token) from the private admin network. No customer credential reaches it. Not exposed to autonomous agents: Private platform operator token changes Caveman-funded allowances across organisations; tenant agents cannot grant platform credit.

## Request body

- object
  - `limit_micros` integer, nullable, required: Monthly USD list-price allowance in millionths of a dollar.

## Response `204`

Allowance override recorded, or plan default restored.

## Other responses

- `400`: Invalid user or allowance.
- `401`: Platform operator authentication required.
- `403`: Request must originate from the private operator network.
- `429`: Operator request rate limit reached.
- `503`: Allowance accounting unavailable.
- `2XX`: Successful response. Exact status depends on synchronous or durable delivery outcome.
- `4XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `5XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.

---

[API](https://skmtc.dev/caveman/apis/caveman-cloud-api.md) - [All operations](https://skmtc.dev/caveman/apis/caveman-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caveman/apis/caveman-cloud-api/revisions/508312d01cfc?raw)
