> ## 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](/gateway/api-keys) or an [invite](/gateway/invites), 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.

<img width="700" style={{ borderRadius: "0.5rem" }} src="https://mintcdn.com/openlayer-44/2eGfXTpwMAOWCnGg/images/gateway/assign_team.png?fit=max&auto=format&n=2eGfXTpwMAOWCnGg&q=85&s=ba553d03bd4b2bacdfaa814d9bb4695e" alt="Creating a group from the group picker" data-path="images/gateway/assign_team.png" />

## 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](/gateway/budgets-and-limits) and
[Guardrails](/gateway/guardrails).
