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

# 旧版用户 ACU 限额端点

> 已弃用的用户级和默认用户限额端点，现已由层级取代

<Warning>
  **已弃用。**这些端点早于[层级](/zh/admin/billing/user-acu-limits)推出，且名称容易引起误解：尽管字段名为 `local_agent`，其管理的限额**不再仅适用于 Local Agent**，而是用户在云端 Devin 会话和 Local Agent 产品中的账户级 ACU 限额。请改用[用量政策端点](/zh/admin/billing/user-acu-limits#tier-endpoints)。
</Warning>

迁移指南：

* 在[用户端点](#user-endpoints)中设置 `cycle_acu_limit`，等同于通过[用户覆盖端点](/zh/admin/billing/user-acu-limits#user-override-endpoint)设置**永久覆盖设置**。
* [默认用户限额端点](#default-user-limit-endpoints)现在会读取和写入**默认层级**的 `cycle_acu_limit`，不再有独立的默认用户限额。
* 用户端点中的 `billing_org_id` 字段**未被弃用**：它仍用于指定组织级 Local Agent 限额的[计费组织归属](/zh/admin/billing/org-acu-limits#billing-organization-attribution)。

有关本页所有端点共用的身份验证、权限和 `PATCH` 语义，请参阅 [ACU 限额](/zh/admin/billing/acu-limits)。

<div id="user-endpoints">
  ## 用户端点
</div>

<div id="get-a-users-acu-settings">
  ### 获取用户的 ACU 设置
</div>

```http theme={null}
GET /v3beta1/enterprise/users/{user_id}/consumption/acu-limits
```

**响应正文**

```json theme={null}
{
  "local_agent": {
    "cycle_acu_limit": 1000,
    "billing_org_id": "org-xyz789"
  }
}
```

当用户既未设置显式限额覆盖，也未设置计费组织归属时，将省略 `local_agent` 块。未设置的字段也会从该块中省略。

此响应仅包含用户的永久覆盖设置，不包含其有效限额。要确定有效限额，请使用[层级用户端点](/zh/admin/billing/user-acu-limits#tier-user-endpoints)。

<div id="update-a-users-acu-settings">
  ### 更新用户的 ACU 设置
</div>

```http theme={null}
PATCH /v3beta1/enterprise/users/{user_id}/consumption/acu-limits
```

在此设置 `cycle_acu_limit` 会创建永久覆盖设置，而不会更改用户的层级分配。

**请求正文 — 设置永久覆盖和计费组织**

```json theme={null}
{
  "local_agent": {
    "cycle_acu_limit": 1000,
    "billing_org_id": "org-xyz789"
  }
}
```

**请求正文 — 仅清除计费组织关联**

```json theme={null}
{
  "local_agent": {
    "billing_org_id": null
  }
}
```

**请求正文 — 清空所有用户设置**

```json theme={null}
{
  "local_agent": null
}
```

成功时，该端点返回 HTTP `204`。

<div id="delete-a-users-acu-settings">
  ### 删除用户的 ACU 设置
</div>

此操作会清除该用户的永久限额覆盖设置和计费组织归属。

```http theme={null}
DELETE /v3beta1/enterprise/users/{user_id}/consumption/acu-limits
```

操作成功时，端点返回 HTTP `204`。

<div id="default-user-limit-endpoints">
  ## 默认用户限额端点
</div>

<div id="get-the-default-user-limit">
  ### 获取默认用户限额
</div>

```http theme={null}
GET /v3beta1/enterprise/users/consumption/acu-limits
```

**响应正文**

```json theme={null}
{
  "local_agent": {
    "cycle_acu_limit": 500
  }
}
```

如果默认层级未设置限额，则会省略 `local_agent` 块。

<div id="update-the-default-user-limit">
  ### 更新默认用户限额
</div>

```http theme={null}
PATCH /v3beta1/enterprise/users/consumption/acu-limits
```

**请求正文 — 设置默认层级的限额**

```json theme={null}
{
  "local_agent": {
    "cycle_acu_limit": 500
  }
}
```

**请求正文 — 清除默认层级的限额**

将 `local_agent` 设为 `null`：

```json theme={null}
{
  "local_agent": null
}
```

操作成功时，该端点返回 HTTP `204`。

<div id="delete-the-default-user-limit">
  ### 删除默认用户限额
</div>

清除默认层级的限额。

```http theme={null}
DELETE /v3beta1/enterprise/users/consumption/acu-limits
```

操作成功时，端点返回 HTTP `204`。
