v4
latestOpenAPI 3.1.02026-08-01207318738.7 KBAI
Set individual entity groups' AI credit limits
Set individual embed entity groups' AI credit limits in bulk. Each entry names an entity group by its embed entity string and either sets an individual limit (creditLimit: a non-negative number, or null for unlimited) or removes one (useDefaultLimit: true) so the entity group follows the org default. Each entity may appear at most once and must have an entity group in the organization. All updates are applied in one transaction, so either every entry takes effect or none do — an unknown entity fails the whole request with a 404 naming it. Requires the same add/remove-users permission as the group settings page and the embed-entity credit-limit feature flag.
patch/api/v1/ai/credit-controls/entity-groups
Request body
Example request
{
"entityGroups": [
{
"creditLimit": 50,
"entity": "acme-corp"
}
]
}Response
All entries applied. Returns each entity group's effective limit, in request order.
Example response
{
"entityGroups": [
{
"creditLimit": 50,
"entity": "acme-corp"
}
]
}