> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Assign groups

> Group API keys so they share usage limits and guardrails

A group is a grouping of API keys. Put related keys in a group, and any **usage limit** or **guardrail**
you scope to that group applies to all of them at once. It's the way to govern many keys with one
rule, like a single monthly spend cap across every app a squad ships.

## Create a group

Groups are created inline, wherever you pick one. When you create an
[API key](https://docs.openlayer.com/gateway/api-keys.md) or an [invite](https://docs.openlayer.com/gateway/invites.md), type a new name in the **Group**
picker and the group is created on the spot. Existing keys can be moved onto a group from the API keys
table.

![Creating a group from the group picker](https://mintcdn.com/openlayer-44/2eGfXTpwMAOWCnGg/images/gateway/assign_team.png?fit=max\&auto=format\&n=2eGfXTpwMAOWCnGg\&q=85\&s=ba553d03bd4b2bacdfaa814d9bb4695e)

## How group rules combine with key rules

Usage limits and guardrails can target a single key or a whole group. When both exist, both apply:

* A **group limit** caps the combined usage of every key in the group.
* A **key limit** caps that one key, on top of any group limit.

Guardrails work the same way. Scope a rule to a group to cover every key at once, or to a single key
for an exception. See [Set usage limits](https://docs.openlayer.com/gateway/budgets-and-limits.md) and
[Guardrails](https://docs.openlayer.com/gateway/guardrails.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.