---
title: "Set a model's sharing config"
method: PUT
path: "/v2/models/{model_id}/sharing"
tags: ["Model Sharing"]
---

# Set a model's sharing config

`PUT /v2/models/{model_id}/sharing`

Persists the project sharing config for a workspace model. Exactly one sharing mode must be set (all_projects / selected).

## Path parameters

- `model_id` string, required

## Request body

- Sharing — Sharing controls where a workspace-owned entity is visible and what consuming projects may do with it. Entities adopt it as one branch of a `oneof scope { string project_id; Sharing sharing; }` union: project-owned entities carry project_id, workspace-owned entities carry sharing. Reads for project-scoped callers include entities shared with their projects; mutation of workspace-owned entities is reserved for management keys / workspace admins.
  - `all_projects` SharingAllProjects
  - `selected` SharingSelectedProjects
    - `project_ids` string[] — An empty list is valid and means "shared with no project" — the model stays in the workspace catalog but no project-scoped caller can use it (admins/workspace-wide callers still can). The UI surfaces this as "Custom" with every project toggled off.
  - `allow_version_pin` boolean — Consuming projects may pin a specific version instead of tracking latest. Enforcement lives with the consuming reference.
  - `allow_fork` boolean — Projects may duplicate this entity into a detached project-owned copy.
  - `auto_grant_new_projects` boolean — New projects created after this sharing config is applied should receive access automatically. Enforcement lives with project creation and entity-specific adoption code.

## Response `200`

OK

- SetModelSharingResponse
  - `model_id` string
  - `sharing` Sharing — Sharing controls where a workspace-owned entity is visible and what consuming projects may do with it. Entities adopt it as one branch of a `oneof scope { string project_id; Sharing sharing; }` union: project-owned entities carry project_id, workspace-owned entities carry sharing. Reads for project-scoped callers include entities shared with their projects; mutation of workspace-owned entities is reserved for management keys / workspace admins.
    - `all_projects` SharingAllProjects
    - `selected` SharingSelectedProjects
      - `project_ids` string[] — An empty list is valid and means "shared with no project" — the model stays in the workspace catalog but no project-scoped caller can use it (admins/workspace-wide callers still can). The UI surfaces this as "Custom" with every project toggled off.
    - `allow_version_pin` boolean — Consuming projects may pin a specific version instead of tracking latest. Enforcement lives with the consuming reference.
    - `allow_fork` boolean — Projects may duplicate this entity into a detached project-owned copy.
    - `auto_grant_new_projects` boolean — New projects created after this sharing config is applied should receive access automatically. Enforcement lives with project creation and entity-specific adoption code.

---

[API](https://skmtc.net/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.net/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/deb8d376faee/schema)
