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

# 組織レベルのACU limit

> Devin 組織の月次ACU予算を設定し、APIからlimitを管理し、使用量が各組織にどのように割り当てられるかを確認できます。

組織レベルのlimitは、cloud Devin セッション、Devin Review、Devin Desktop、Windsurf JetBrains、Devin CLI を通じた組織全体の月次ACU消費量にlimitを設けるものです。

Enterprise 内の各組織にそれぞれ独自のlimitを設定できるため、管理者はチームやプロジェクト単位で予算を配分できます。limitは [Settings > Organizations](https://app.devin.ai/settings/organizations) ([Enterprise billing](/ja/admin/billing/enterprise#setting-organization-acu-limits) を参照) または以下のAPIから管理します。

limitは、現在の**月次請求期間**における合計消費量に適用されます。たとえば、limitが5,000 ACUで、すでに3,000 ACUを消費している場合、その組織の残りは2,000 ACUです。limitを変更しても使用量はリセットされません。

組織レベルのlimitと[ユーザーレベルのlimit](/ja/admin/billing/user-acu-limits)は、それぞれ独立して適用されます。ユーザーのlimitと該当する組織のlimitのいずれかに達すると、新しい作業はブロックされます。

<div id="billing-organization-attribution">
  ## 請求先組織の帰属
</div>

使用量は、請求先となる組織のlimitに計上されます。

* **cloud Devin セッション** は、セッションが実行される組織に計上されます。
* **Devin Review** は、そのレビューの請求先組織に計上されます。
* **Devin Desktop、Windsurf JetBrains、Devin CLI** は、ユーザーの請求先組織に計上されます。

管理者は、**Settings > Members** またはAPIを通じて、ユーザーの請求先組織を割り当てられます。明示的な割り当てがない場合は、直接メンバーシップまたはIdentity Providerのグループ割り当てを通じてユーザーがアクセスできる最初の組織に決定されます。

ユーザーの請求先組織によって、適用される[ローカルエージェントのコントロール](/ja/enterprise/local/controls)も決まります。

APIを通じて請求先組織を割り当てるには、[ユーザー設定エンドポイント](/ja/admin/billing/legacy-user-acu-limits#user-endpoints)を利用します。その`billing_org_id`フィールドは引き続きサポートされています。

```bash theme={null}
curl -X PATCH "https://api.devin.ai/v3beta1/enterprise/users/user_abc123/consumption/acu-limits" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"local_agent": {"billing_org_id": "org-xyz789"}}'
```

<div id="organization-endpoints">
  ## 組織エンドポイント
</div>

ベースURLには `https://api.devin.ai` を利用してください。認証と権限については、[ACU limit](/ja/admin/billing/acu-limits#manage-limits-with-the-v3-api) を参照してください。

<Note>
  これらのエンドポイントはベータ版 (`/v3beta1`) であり、公開されているOpenAPI仕様には含まれていません。
</Note>

<div id="get-an-organizations-limits">
  ### 組織のlimitを取得する
</div>

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

HTTP `200` を返し、組織の limit が `cycle_acu_limit` に含まれます:

```json theme={null}
{
  "cycle_acu_limit": 5000
}
```

組織の limit が設定されていない場合、`cycle_acu_limit` は省略されます。

<Note>
  レスポンスには、非推奨な `cloud_agent` および `local_agent` フィールドが含まれる場合もあります。新しい統合では `cycle_acu_limit` を利用してください。
</Note>

<div id="update-an-organizations-limits">
  ### 組織のlimitを更新する
</div>

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

**リクエストボディ — limitを設定**

```json theme={null}
{
  "cycle_acu_limit": 5000
}
```

**リクエストボディ — limitを解除**

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

| `cycle_acu_limit` | 効果                            |
| ----------------- | ----------------------------- |
| 正の整数              | 各月次請求期間における組織全体の ACU 予算を設定します |
| `0`               | 組織の新規使用量をブロックします              |
| `null`            | 組織のlimitを解除します                |
| 省略                | limitを変更しません                  |

成功時、エンドポイントは HTTP `204 No Content` を返します。`cycle_acu_limit` と非推奨のエージェントブロックのいずれかを同一のリクエストに含めないでください。

<div id="delete-an-organizations-limits">
  ### 組織のlimitを削除する
</div>

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

組織のACU limitを解除します。これは `cycle_acu_limit` に `null` を設定することと同じです。このエンドポイントは、成功時に HTTP `204 No Content` を返します。

組織のlimitを解除しても、[ユーザーレベルの上限](/ja/admin/billing/user-acu-limits)とEnterpriseの請求条件は引き続き適用されます。

<div id="errors">
  ### エラー
</div>

| ステータス | 意味                                                                            |
| ----- | ----------------------------------------------------------------------------- |
| `400` | `PATCH` リクエストで `cycle_acu_limit` と `cloud_agent` または `local_agent` を同時に指定している |
| `403` | トークンに必要な権限がありません                                                              |
| `404` | 対象の組織が Enterprise 内に見つかりません                                                   |
| `409` | この組織では `cycle_acu_limit` を利用できません。アカウントチームにお問い合わせください                         |
| `422` | リクエストの値が無効です。`cycle_acu_limit` は 0 以上の整数または `null` である必要があります                 |

<div id="example-set-an-organization-budget">
  ## 例: 組織の予算を設定する
</div>

組織に5,000 ACUのlimitを設定します。

```bash theme={null}
curl -X PATCH "https://api.devin.ai/v3beta1/enterprise/organizations/org-xyz789/consumption/acu-limits" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"cycle_acu_limit": 5000}'
```

<div id="frequently-asked-questions">
  ## よくある質問
</div>

<AccordionGroup>
  <Accordion title="組織がlimitに達するとどうなりますか？">
    その組織に課金される新規の作業は、管理者がlimitを引き上げるか解除するか、次の月次請求期間で使用量がリセットされるまでブロックされます。
  </Accordion>

  <Accordion title="limitの変更はどれくらいで反映されますか？">
    各製品に変更が反映されるまで、約5分お待ちください。limitの変更は Enterprise の監査ログに記録されます。
  </Accordion>
</AccordionGroup>
