The Scopes module centralizes the authorization scopes used by AI Gateway. Each scope is a named label, with an optional description, that can be referenced by one or more Routes, MCP Servers, and AI Agents. The gateway uses these scopes to determine who can access each resource by comparing the scopes in the presented token with the scopes required by the resource.
NOTEScopes is the canonical place to describe authorization in AI Gateway. Instead of typing free-form strings in each Route, MCP Server, or AI Agent, you register the scope here once and reference the scope ID in the forms for the other features. Renaming a scope here propagates the new name to every resource that uses it.
Learn how to:
The Scopes page lists registered scopes with pagination. You can filter by:
Use Search to apply the filter and Clear to reset it.
Columns shown in the table:
- when empty).Fill in Name (required) and, optionally, Description (see Form fields).
After creation, the gateway-generated scope ID becomes available in the scope selects in the Routes, MCP Servers, and AI Agents forms.
In the Actions column of the row you want, click the Overview icon (magnifying glass). A read-only screen opens at /scopes/<scopeId>/view with:
Use Overview when you need to check the impact of changing or deleting a scope before taking action.
In the Actions column of the row you want, click the Overview icon and then the Edit button. You can also open /scopes/<scopeId>/edit directly. The Update Scope form opens with the current data and shows the same Connected entities tabs described in View Scope below the editable fields.
CHANGES PROPAGATE AUTOMATICALLYWhen the scope is already in use, the form displays the warning "This scope is already in use. Changing its name will update it everywhere it is used." Changing the Name immediately updates every resource that references this scope. Check the Connected entities list before confirming.
Change the required fields and click Save.
In the Actions column of the row you want, click the Delete icon. Confirm the operation in the "Do you want to delete scope [scopeId]?" dialog.
IMPORTANTDeletion is permanent and cannot be undone. If any Routes, MCP Servers, or AI Agents are associated with this scope, remove those associations first and then delete it. Open the scope Overview to identify dependent resources.
The table below covers all fields in the creation and edit forms.
Field | Type | Required | Rules |
|---|---|---|---|
| Name | Text | Yes | Minimum 1 character, maximum 255 characters. This is the human-readable scope identifier. It appears in the scope selects in the other forms. |
| Description | Long text (textarea) | No | Maximum 1024 characters. Free-form text to explain the purpose of the scope, useful when other operators reuse it. |
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more