---
title: "Set individual entity groups' AI credit limits"
method: PATCH
path: "/v1/ai/credit-controls/entity-groups"
tags: ["AI Credit Controls"]
---

# Set individual entity groups' AI credit limits

`PATCH /v1/ai/credit-controls/entity-groups`

## Request

- Base URL: `https://blobsrus.omniapp.co/api`
- URL: `https://blobsrus.omniapp.co/api/v1/ai/credit-controls/entity-groups`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

<Note>
  **Organization Admin** permissions are required to use this endpoint.
</Note>

Set individual embed entity groups' AI credit limits in bulk. Each entry names an entity group and either sets an individual limit or removes one so the entity group follows the organization default. All entries are applied in a single transaction.

## Request body

- object
  - `entityGroups` object[], required: Entity groups to update. Each entry has an `entity` plus exactly one of `creditLimit` (number or `null`) or `useDefaultLimit: true`.
    - `creditLimit` number, nullable: The entity group's individual AI credit limit for the billing period, or `null` for unlimited. This will override the organization default. Mutually exclusive with `useDefaultLimit`.
    - `entity` string, required: The embed entity's identifier (the SSO `entity` value).
    - `useDefaultLimit` boolean: Removes the entity group's individual limit so it follows the organization default. Mutually exclusive with `creditLimit`.

## Response `200`

All entries applied. Returns each entity group's effective limit, in request order.

- object
  - `entityGroups` object[], required
    - `creditLimit` number, nullable, required: The entity group's effective AI credit limit, or `null` for unlimited.
    - `entity` string, required: The embed entity's identifier (the SSO `entity` value).
    - `usesDefaultLimit` boolean, required: If `true`, the entity group has no individual limit and follows the organization default.

## Other responses

- `400`: Invalid request. Common causes: - An empty `entityGroups` array - More than 1000 entries - An entry with both `creditLimit` and `useDefaultLimit`, or neither - A negative `creditLimit` - A duplicated `entity`
- `401`: Missing or invalid API key.
- `403`: Insufficient permissions, or credit controls editing is disabled for the organization.
- `404`: An entity has no entity group in the organization; the response names the first invalid entity. No limits are changed.
- `429`: Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500`: Internal Server Error

## Changes

- **2026-11-03** `43290040f88f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omni/apis/omni-api/changes/v1/ai/credit-controls/entity-groups/patch.md)

---

[API](https://skmtc.dev/omni/apis/omni-api.md) - [All operations](https://skmtc.dev/omni/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omni/apis/omni-api/revisions/43290040f88f?raw)
