# Update account inference policy

```http
PATCH /accounts/{account_id}/inference-policy
```

Update the models an account allows and denies and its default model, replacing each key sent; returns the policy. Requires account.settings.manage.

## Parameters

| Name         | In   | Required | Description |
| ------------ | ---- | -------- | ----------- |
| `account_id` | path | Yes      |             |

## Request body

| Field           | Type        | Required | Description                                                                                                                               |
| --------------- | ----------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `models`        | object      |          | Models the account allows and denies. Every project of the account can only narrow them.                                                  |
| `default_model` | string,null |          | Default model of projects that set none. It must be allowed by the policy. Null uses the built-in default. Omit to keep the stored value. |

## Responses

| Status | Description                                                                                                                                                                  |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200    | The account inference policy after the update. Requires a signed-in account owner or admin. API keys are rejected regardless of their scopes.                                |
| 400    | Bad request                                                                                                                                                                  |
| 401    | Unauthorized                                                                                                                                                                 |
| 403    | Requires a signed-in session as the account owner or an admin with `account.settings.manage`. API keys are refused whatever their scopes, so no API key scope grants access. |
| 404    | Not found                                                                                                                                                                    |
| 422    | A model in `models.allowed` or `default_model` is retired (`model-retired`). The Problem detail names its successor; nothing is saved.                                       |
| 500    | Server error                                                                                                                                                                 |
