PUT/api/orgs/{org_id}/identities/{identity_id}/model-access

Set 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_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • identity_idstringrequired

    Identity id.

Request body

  • modeenumrequired
    "all""allowlist"
  • alias_idsarray | null

    Alias ids; replaces the whole list.

  • modelsarray | null

    Model slugs as GET /v1/models lists them, your custom model names, or alias ids; replaces the whole list.

Responses

  • 200

    The group's mode and saved list.

    Response
    • identity_idstringrequired
    • modeenumrequired

      all leaves every model callable; allowlist admits only alias_ids.

      "all""allowlist"
    • alias_idsarray<string>required

      The saved list; kept while the mode is all.

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The key is not a provisioning key (inference keys are refused, reads included), or it is a customer-plan key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    Unknown organization, group or model.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    Both models and alias_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