# Update inference policy models

```http
PATCH /projects/{project_reference}/inference-policy
```

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

## Parameters

| Name                | In   | Required | Description                                                |
| ------------------- | ---- | -------- | ---------------------------------------------------------- |
| `project_reference` | path | Yes      | Project slug, UUID, or domain that identifies the project. |

## Request body

| Field                              | Type        | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------------- | ----------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `models`                           | object      |          | Models the project allows and denies. They only narrow what its account allows.                                                                                                                                                                                                                                                                                                                                                                                            |
| `default_model`                    | string,null |          | Default model of the project. It must be allowed by the project's and its account's policy. Null uses the account default. Omit to keep the stored value.                                                                                                                                                                                                                                                                                                                  |
| `allow_provider_key_direct_routes` | boolean     |          | Whether the account's saved provider keys (for example an Anthropic key) may call their provider directly although the project states no tier. On, the default EU-resident floor does not apply to those routes, which may be served outside the EU; Veryfront's own routes keep it, and every requirement the project states (a tier, jurisdictions, hosts, models, precision) still applies. Saving a key alone never relaxes the policy. Omit to keep the stored value. |

## Responses

| Status | Description                                                                                                                            |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| 200    | The policy as it now stands                                                                                                            |
| 400    | Bad request                                                                                                                            |
| 401    | Unauthorized                                                                                                                           |
| 403    | Requires a signed-in project administrator. API keys are rejected regardless of their scopes, including project-scoped keys.           |
| 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                                                                                                                           |
