# set_ai_policy

Replace the AI controls a workspace, project, group or member sets itself.

Project, group and member controls are an Enterprise feature. Read the scope with  
get\_ai\_policy first and send back the whole policy with your change. Requires workspace  
settings admin (content policy author for a project).

## Parameters

| Parameter                        | Type                                                                                                                           | Default           | Description                                                                                                                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| scoperequired                    | AiPolicyScopeToolInput                                                                                                         | —                 |                                                                                                                                                                                      |
| workspace\_idrequired            | string (uuid)                                                                                                                  | —                 | The workspace the policy belongs to.                                                                                                                                                 |
| kindrequired                     | enum                                                                                                                           | —                 | What the policy is attached to: the workspace itself, one of its projects, a group or a member.One of: workspace, project, group, member                                             |
| project\_id                      | string (uuid)                                                                                                                  | —                 | The project, for kind=project.                                                                                                                                                       |
| group\_id                        | string (uuid)                                                                                                                  | —                 | The group, for kind=group. Use list\_groups to find it.                                                                                                                              |
| member\_email                    | string (email)                                                                                                                 | —                 | The member's email, for kind=member.                                                                                                                                                 |
| principal\_id                    | string (uuid)                                                                                                                  | —                 | The member's principal id, for kind=member: a service account or API key.                                                                                                            |
| policyrequired                   | AiPolicy                                                                                                                       | —                 | Everything the scope sets itself; it replaces what the scope set before. Leave a control out to inherit it. Each value is {value, locked}; only workspace and project policies lock. |
| agent\_enabled                   | Setting\_bool\_                                                                                                                | —                 |                                                                                                                                                                                      |
| valuerequired                    | boolean                                                                                                                        | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| agents                           | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
| agent\_confirm\_above\_cu        | Setting\_Annotated\_float\_\_Ge\_\_                                                                                            | —                 |                                                                                                                                                                                      |
| valuerequired                    | number≥0                                                                                                                       | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| modalities                       | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
| new\_models\_enabled             | Setting\_bool\_                                                                                                                | —                 |                                                                                                                                                                                      |
| valuerequired                    | boolean                                                                                                                        | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| models                           | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
| model\_defaults                  | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
| guardrails                       | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
| output\_scoring                  | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
| nsfw\_tolerance                  | Setting\_Annotated\_int\_\_FieldInfo\_annotation\_NoneType\_\_required\_True\_\_metadata\_\_Ge\_ge\_1\_\_\_Le\_le\_6\_\_\_\_\_ | —                 |                                                                                                                                                                                      |
| valuerequired                    | integer1–6                                                                                                                     | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| reference\_set\_sharing\_enabled | Setting\_bool\_                                                                                                                | —                 |                                                                                                                                                                                      |
| valuerequired                    | boolean                                                                                                                        | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| workflow\_sharing\_enabled       | Setting\_bool\_                                                                                                                | —                 |                                                                                                                                                                                      |
| valuerequired                    | boolean                                                                                                                        | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| invisible\_watermark\_enabled    | Setting\_bool\_                                                                                                                | —                 |                                                                                                                                                                                      |
| valuerequired                    | boolean                                                                                                                        | —                 |                                                                                                                                                                                      |
| locked                           | boolean                                                                                                                        | false             |                                                                                                                                                                                      |
| usage\_caps                      | object                                                                                                                         | \[object Object\] |                                                                                                                                                                                      |
