> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update inference policy models

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

`patchInferencePolicy(projectReference: String!, input: PatchInferencePolicyInput!): InferencePolicy!`

Requires project.settings.manage.

## Arguments

| Argument | Type | Required | Description |
| - | - | - | - |
| `projectReference` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | Project ID or slug. |
| `input` | [`PatchInferencePolicyInput!`](https://veryfront.com/docs/cloud/graphql/types/patchinferencepolicyinput) | Yes | |

## Input fields

### input

[`PatchInferencePolicyInput`](https://veryfront.com/docs/cloud/graphql/types/patchinferencepolicyinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `models` | [`ModelRuleInput`](https://veryfront.com/docs/cloud/graphql/types/modelruleinput) | No | |
| `defaultModel` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Default model of the project. It must be allowed by the project's and its account's policy. Null uses the account default. |

## Response

Returns [`InferencePolicy!`](https://veryfront.com/docs/cloud/graphql/types/inferencepolicy). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `projectId` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) | |
| `configured` | [`Boolean!`](https://veryfront.com/docs/cloud/graphql/types/boolean) | Whether the project states a policy. False returns the defaults the project is served under: EU-only, with an `eu-resident` minimum tier, while the EU default is on; every allowed model once it has ended. |
| `enforced` | [`Boolean!`](https://veryfront.com/docs/cloud/graphql/types/boolean) | |
| `createdAt` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `updatedAt` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `updatedBy` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | |
| `models` | [`ModelRule!`](https://veryfront.com/docs/cloud/graphql/types/modelrule) | Models the project itself allows and denies. They only narrow its account. |
| `defaultModel` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | The project's own default model. Null uses the account default, then the built-in default. |

[All fields of `InferencePolicy`](https://veryfront.com/docs/cloud/graphql/types/inferencepolicy).

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
mutation PatchInferencePolicy($projectReference: String!, $input: PatchInferencePolicyInput!) {
  patchInferencePolicy(projectReference: $projectReference, input: $input) {
    projectId
    createdAt
    updatedAt
    configured
    defaultModel
  }
}
```

```json title="variables.json" theme={null}
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "input": {}
}
```

<details>
  <summary>Try this mutation</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Mutation

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.