/api/orgs/{org_id}/identities/{identity_id}/model-accessSet a group's model access
Sets the mode and, when models or alias_ids is given, replaces the whole list (give one of the two). models takes model slugs as GET /v1/models lists them, or your custom model names. Omitting both keeps the saved list. The same call manages the group's custom-model grants: all grants every custom model of the org, allowlist grants exactly the listed ones. A key in a child group may call a model only when every group above it allows it too. Org admin or the provisioning key.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.identity_idstringrequiredIdentity id.
Request body
modeenumrequiredalias_idsarray | nullAlias ids; replaces the whole list.
modelsarray | nullModel slugs as
GET /v1/modelslists them, your custom model names, or alias ids; replaces the whole list.
Responses
200The group's mode and saved list.
Response
identity_idstringrequiredmodeenumrequiredallleaves every model callable;allowlistadmits onlyalias_ids.alias_idsarray<string>requiredThe saved list; kept while the mode is
all.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is not a provisioning key (inference keys are refused, reads included), or it is a customer-plan key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404Unknown organization, group or model.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422Both
modelsandalias_ids, an alias the org cannot use, or body validation.
Request
curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/model-access' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"mode": "allowlist",
"models": [
"claude-sonnet-4.6",
"gpt-6-luna",
"deepseek-v4-flash"
]
}'Response
{
"identity_id": "contractors-7c1e40ab",
"mode": "allowlist",
"alias_ids": [
"model-1f0c9a2e-5b7d-4c3a-9e81-0a6d2f4b7c13",
"model-8e2a4c6f-1d3b-4f5a-a9c7-2b0e6d8f1a34",
"model-4b6d8f0a-2c4e-4a6c-8e0a-2c4e6a8c0e25"
]
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/model-access