Sample - OpenAI API
POST/organization/projects/{project_id}/model_permissions

Modify project model permissions

Updates the model permissions policy for a project. Provide mode and model_ids to define whether the listed models are allowed or denied.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 2 body fields
project_idstringrequired
The unique identifier of the project whose model permissions to update.

The project model permissions policy to apply.

modestringrequired
The model permissions mode to apply.
Allowed:allow_listdeny_list
model_idsarray<string>required
The model IDs included in this permissions policy.

1 status code
200Returns the updated model permissions object with `object` set to `project.model_permissions`, the applied `mode`, and the configured `model_ids`.
objectstringrequired
The object type, which is always `project.model_permissions`.
Allowed:project.model_permissions
modestringrequired
Whether the project uses an allowlist or a denylist.
Allowed:allow_listdeny_list
model_idsarray<string>required
The model IDs included in the model permissions policy.

Error handling

mode and model_ids are required. mode must be either allow_list or deny_list, and project_id must identify the project whose policy you want to update.