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

Retrieve project model permissions

Retrieves the model permissions policy configured for a project. Supply project_id to inspect whether the project uses an allowlist or denylist and which model IDs are included.

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

1 parameter
project_idstringrequired
The unique identifier of the project whose model permissions to retrieve.

1 status code
200Returns the project model permissions object with `object` set to `project.model_permissions`, a `mode` of `allow_list` or `deny_list`, 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

project_id must identify the project whose model permissions you want to retrieve. The returned mode is either allow_list or deny_list, and model_ids contains the model identifiers in the policy.