# Billing Folders

{% hint style="info" %}
Billing Folders は **premium** Enterprise plans で利用できる機能です。ご利用中の workspace で Billing Folders を有効にするには、 [Roboflow の営業チーム](https://roboflow.com/sales) またはアカウント担当者までご連絡ください。利用可能な plans の詳細については、 [料金ページ](https://roboflow.com/pricing).
{% endhint %}

をご覧ください。有効にすると、すべての usage（例: training、inference、image storage、labeling など）は、使用中の project を含む folder に自動的に割り当てられます。これにより、組織はチーム、部門、またはクライアント全体で、きめ細かなコストの可視化と支出管理を行えます。

### Usage Attribution の仕組み

Billing Folders が有効な場合、workspace 内の各 folder にはそれぞれ独自の API key が割り当てられます。folder 内の projects で発生した請求対象の usage は、その folder の API key に対して追跡されます。つまり、usage reports と dashboard で、各 folder がどれだけ消費しているかを正確に確認できます。

{% hint style="info" %}
usage の割り当ては自動です。usage を folder に手動で割り当てる必要はありません。project から親 folder に引き継がれます。
{% endhint %}

#### Image Storage の割り当て

image storage は、その image を参照している project(s) を含む folder に割り当てられます。

同じ folder 内の複数の projects（または同じ親を持つ subfolders 内）で image が共有されている場合、storage は、その image を使用しているすべての projects を含む最も深い folder に割り当てられます:

```
Workspace
├── Folder A
│   ├── Project 1  ← image.jpg
│   └── Project 2  ← image.jpg (shared)
└── Folder B
    └── Project 3

image.jpg の storage は Folder A に割り当てられます（それを参照するすべての projects を含む最も深い folder）
```

異なる root folders にある projects 間で image が共有され、共通の親 folder がない場合、storage は workspace レベルで割り当てられます:

```
Workspace
├── Folder A
│   └── Project 1  ← image.jpg
└── Folder B
    └── Project 2  ← image.jpg (shared)

image.jpg の storage は Workspace に割り当てられます（両方の projects を含む単一の folder がないため）
```

### Usage の表示

workspace の credit usage page で folder ごとの内訳を含む usage を確認でき、割り当てフィルターを **Folders**に切り替えられます。 [billing folder に usage を絞り込む方法](/roboflow/roboflow-jp/billing/credits/view-credit-usage.md#attribution-filter-track-workspace-usage-for-a-given-folder-or-api-key) または [usage の一般的な表示方法](/roboflow/roboflow-jp/billing/credits/view-credit-usage.md)

### Folder Usage の一時停止と再開

Workspace administrators は、folder 内のすべての請求対象 usage を一時的に停止できます。これは、コストの管理や誤って発生する usage の防止に役立ちます。

#### Folder の一時停止

folder を停止するには、 **Folder Settings** modal を開き、 **Pause Folder Usage**.

<figure><img src="/files/185c610462111272cebfb09a184d6b09ddb61ac6" alt=""><figcaption></figcaption></figure>

<div><figure><img src="/files/6a01c3aefbe283e28aacf9dff94e727716421906" alt=""><figcaption></figcaption></figure> <figure><img src="/files/5b744bd6b9db7db2640dae2a29e36df2235b4698" alt=""><figcaption></figcaption></figure></div>

を切り替えます。folder が停止されると:

* その folder に属するすべての API keys が無効になります
* その folder に対して usage が発生する API request はすべて、 `423 Locked` status code で拒否されます
* その folder について新たな請求対象 usage は記録されません

また、Pause All Descendant Folders' Usage を切り替えることで、folder とそのすべての子孫 folder をまとめて停止することもできます。これにより、選択した folder とその配下にネストされたすべての folder の API keys が無効になります。

#### Folder の再開

停止した folder を再開するには、"Folder Settings" modal に戻り、一時停止のコントロールをオフにします。これにより folder の API keys が再度有効になり、通常の動作が復元されます。同様に、folder とそのすべての子孫をまとめて再開することもできます。

再開は、folder の一時停止機能によって停止された keys にのみ影響します。ほかの理由で無効化された keys には影響しません。

### Folder API Keys

Billing Folders が有効な場合、各 folder には自動的に独自の API key が割り当てられます。これらの keys は、請求対象 usage がどの folder に属するかを追跡するために内部で使用されます。

* **keys の表示**: Folder Settings modal を開き、API Keys タブに移動すると、folder に関連付けられた API keys を確認できます。
* **自動作成**: API keys は、folder が作成されたとき、または workspace で Billing Folders が初めて有効化されたときに自動的に作成されます。手動で作成する必要はありません。

### よくあるシナリオ

| Scenario                     | 起こること                                                                                                            |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **project を別の folder に移動する** | その project の今後の usage は新しい folder に割り当てられます。過去の usage は元の folder に割り当てられたままです。                                   |
| **folder を削除する**             | folder は workspace から削除されます。子 project と sub-folders は親 folder に再割り当てされます。過去の usage データは billing reports に保持されます。 |
| **新しい folders を作成する**        | 新しい folders には、請求の割り当て用 API key が自動的に付与されます。追加の設定は不要です。                                                          |
| **Billing Folders を無効にする**   | folder レベルの割り当ては停止します。新しい usage は workspace レベルのみで追跡されます。folder の billing period に関する過去の usage データは保持されます。       |

### Usage Report API

を使用して、billing usage データをプログラムで照会できます。 [billing usage report REST API](/developer/rest-api/billing-folders-usage-report.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-jp/workspaces/billing-folders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
