From a45c01e37323a25e49f61628bc211262d6f1a09f Mon Sep 17 00:00:00 2001 From: Pierric Cistac Date: Wed, 24 Jun 2026 08:30:50 -0700 Subject: [PATCH 1/5] docs: document cost attribution for resource groups Add cost attribution as an admin capability in the enterprise resource groups overview, and link the usage-by-resource-group billing API endpoint from the security resource groups page. --- docs/hub/enterprise-resource-groups.md | 1 + docs/hub/security-resource-groups.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/hub/enterprise-resource-groups.md b/docs/hub/enterprise-resource-groups.md index 92730ef6f3..5ec02c69ca 100644 --- a/docs/hub/enterprise-resource-groups.md +++ b/docs/hub/enterprise-resource-groups.md @@ -26,6 +26,7 @@ This feature allows organization administrators to: - Keep private repositories visible only to authorized group members - Enable multiple teams to work independently within the same organization - Configure which member roles are allowed to create new resource groups +- Attribute costs to specific resource groups for better budget management This Team & Enterprise feature helps organizations manage complex team structures and maintain proper access control over their repositories. diff --git a/docs/hub/security-resource-groups.md b/docs/hub/security-resource-groups.md index 63e445e29f..7fb46a8d7b 100644 --- a/docs/hub/security-resource-groups.md +++ b/docs/hub/security-resource-groups.md @@ -108,6 +108,8 @@ Resource Groups also serve as a cost attribution unit for compute services. When - **Inference Providers**: pass the resource group's ID via the `X-HF-Bill-To` header (or `bill_to` parameter in the SDK). See [Billing for Team and Enterprise organizations](/docs/inference-providers/pricing#billing-for-team-and-enterprise-organizations). - **Inference Endpoints**: cost is automatically attributed to the resource group the model repository belongs to. Endpoints instantiated directly from the built-in Inference Endpoints catalog aren't supported at this time. +You can use the [dedicated API endpoint](https://huggingface.co/spaces/huggingface/openapi#tag/orgs/GET/api/organizations/{name}/billing/usage-by-resource-group) to retrieve cost attribution data for resource groups. + ## Resource Groups API You can list resource groups and add users to them (or change a member's org role and resource group assignments) via the Hub API. For the full reference, examples, and batch workflows, see the [Programmatic User Access Control Management](./programmatic-user-access-control) guide. From a7fa00120c969645d78ff32cbdd2b1a79b2f33af Mon Sep 17 00:00:00 2001 From: Pierric Cistac Date: Wed, 24 Jun 2026 09:01:25 -0700 Subject: [PATCH 2/5] fix: URL-encode braces in resource groups billing API link The raw {name} path-template parameter inside the markdown link was parsed by the doc-builder prerenderer as a JS interpolation expression ("ReferenceError: name is not defined"), failing the docs build. Encode the braces as %7B/%7D, matching the convention used for other OpenAPI orgs-tag links in the repo. --- docs/hub/security-resource-groups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/security-resource-groups.md b/docs/hub/security-resource-groups.md index 7fb46a8d7b..0e5caaada2 100644 --- a/docs/hub/security-resource-groups.md +++ b/docs/hub/security-resource-groups.md @@ -108,7 +108,7 @@ Resource Groups also serve as a cost attribution unit for compute services. When - **Inference Providers**: pass the resource group's ID via the `X-HF-Bill-To` header (or `bill_to` parameter in the SDK). See [Billing for Team and Enterprise organizations](/docs/inference-providers/pricing#billing-for-team-and-enterprise-organizations). - **Inference Endpoints**: cost is automatically attributed to the resource group the model repository belongs to. Endpoints instantiated directly from the built-in Inference Endpoints catalog aren't supported at this time. -You can use the [dedicated API endpoint](https://huggingface.co/spaces/huggingface/openapi#tag/orgs/GET/api/organizations/{name}/billing/usage-by-resource-group) to retrieve cost attribution data for resource groups. +You can use the [dedicated API endpoint](https://huggingface.co/spaces/huggingface/openapi#tag/orgs/GET/api/organizations/%7Bname%7D/billing/usage-by-resource-group) to retrieve cost attribution data for resource groups. ## Resource Groups API From d78d4bc751b1b001034deb98e49de6036cd83ea9 Mon Sep 17 00:00:00 2001 From: Pierric Cistac Date: Wed, 24 Jun 2026 09:05:50 -0700 Subject: [PATCH 3/5] fix(docs): escape braces in resource groups billing API link as HTML The markdown link's {name} path parameter reached the Svelte prerenderer verbatim ("ReferenceError: name is not defined" in _page.svelte.js), aborting the docs build. URL-encoding (%7B/%7D) didn't help because mdsvex normalizes the href before Svelte sees it. Switch to a raw tag with HTML-encoded braces ({name}), matching the existing convention in programmatic-user-access-control.md for OpenAPI orgs links. --- docs/hub/security-resource-groups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/security-resource-groups.md b/docs/hub/security-resource-groups.md index 0e5caaada2..bc246db33e 100644 --- a/docs/hub/security-resource-groups.md +++ b/docs/hub/security-resource-groups.md @@ -108,7 +108,7 @@ Resource Groups also serve as a cost attribution unit for compute services. When - **Inference Providers**: pass the resource group's ID via the `X-HF-Bill-To` header (or `bill_to` parameter in the SDK). See [Billing for Team and Enterprise organizations](/docs/inference-providers/pricing#billing-for-team-and-enterprise-organizations). - **Inference Endpoints**: cost is automatically attributed to the resource group the model repository belongs to. Endpoints instantiated directly from the built-in Inference Endpoints catalog aren't supported at this time. -You can use the [dedicated API endpoint](https://huggingface.co/spaces/huggingface/openapi#tag/orgs/GET/api/organizations/%7Bname%7D/billing/usage-by-resource-group) to retrieve cost attribution data for resource groups. +You can use the dedicated API endpoint to retrieve cost attribution data for resource groups. ## Resource Groups API From f595b0422bd110dcb0d54d014570658490e0429a Mon Sep 17 00:00:00 2001 From: Pierric Cistac Date: Wed, 24 Jun 2026 09:25:22 -0700 Subject: [PATCH 4/5] docs: simplify resource groups billing API link --- docs/hub/security-resource-groups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/security-resource-groups.md b/docs/hub/security-resource-groups.md index bc246db33e..8458ac2778 100644 --- a/docs/hub/security-resource-groups.md +++ b/docs/hub/security-resource-groups.md @@ -108,7 +108,7 @@ Resource Groups also serve as a cost attribution unit for compute services. When - **Inference Providers**: pass the resource group's ID via the `X-HF-Bill-To` header (or `bill_to` parameter in the SDK). See [Billing for Team and Enterprise organizations](/docs/inference-providers/pricing#billing-for-team-and-enterprise-organizations). - **Inference Endpoints**: cost is automatically attributed to the resource group the model repository belongs to. Endpoints instantiated directly from the built-in Inference Endpoints catalog aren't supported at this time. -You can use the dedicated API endpoint to retrieve cost attribution data for resource groups. +You can use the dedicated API endpoint to retrieve cost attribution data for resource groups. ## Resource Groups API From 44966b330e37b9e069eef9a92652344c4bce47c1 Mon Sep 17 00:00:00 2001 From: Pierric Cistac Date: Wed, 24 Jun 2026 09:27:47 -0700 Subject: [PATCH 5/5] fix(docs): restore encoded braces in billing API link --- docs/hub/security-resource-groups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/security-resource-groups.md b/docs/hub/security-resource-groups.md index 8458ac2778..81495d962e 100644 --- a/docs/hub/security-resource-groups.md +++ b/docs/hub/security-resource-groups.md @@ -108,7 +108,7 @@ Resource Groups also serve as a cost attribution unit for compute services. When - **Inference Providers**: pass the resource group's ID via the `X-HF-Bill-To` header (or `bill_to` parameter in the SDK). See [Billing for Team and Enterprise organizations](/docs/inference-providers/pricing#billing-for-team-and-enterprise-organizations). - **Inference Endpoints**: cost is automatically attributed to the resource group the model repository belongs to. Endpoints instantiated directly from the built-in Inference Endpoints catalog aren't supported at this time. -You can use the dedicated API endpoint to retrieve cost attribution data for resource groups. +You can use the dedicated API endpoint to retrieve cost attribution data for resource groups. ## Resource Groups API