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

# Frontier Gateway API reference

> Manage Frontier Gateway endpoints, groups, and federated API keys through the Baseten REST API.

The Frontier Gateway API manages the resources behind your branded inference gateway: the **endpoints** that route slugs to deployments, the **groups** that model your customers and their limits, and the **federated API keys** your customers call with. For the conceptual guide and end-to-end examples, see the [Frontier Gateway overview](/frontier-gateway/overview).

These endpoints live under `/v1/gateway/`, and Baseten enables them for Frontier Gateway workspaces. Authenticate with a workspace API key with management scope, passed as `Authorization: Bearer $BASETEN_API_KEY`. Requests from workspaces that aren't onboarded return `403`. The OpenAPI spec is available at [api.baseten.co/v1/spec](https://api.baseten.co/v1/spec) for generating API clients. It doesn't yet cover deleting a group, revoking a group API key, or fetching group usage: see those reference pages for request and response details.

## Endpoints

An endpoint maps a routing slug to the deployment that serves it. Use these routes to create, inspect, re-point, and delete endpoints.

| Method | Endpoint | Description |
| :- | :- | :- |
| `GET` | [`/v1/gateway/endpoints`](/reference/gateway/endpoints/list-endpoints) | Lists endpoints. |
| `GET` | [`/v1/gateway/endpoints/{endpoint_id}`](/reference/gateway/endpoints/get-an-endpoint) | Gets an endpoint. |
| `POST` | [`/v1/gateway/endpoints`](/reference/gateway/endpoints/create-an-endpoint) | Creates an endpoint. |
| `PATCH` | [`/v1/gateway/endpoints/{endpoint_id}`](/reference/gateway/endpoints/replace-endpoint-targets) | Updates an endpoint. |
| `DELETE` | [`/v1/gateway/endpoints/{endpoint_id}`](/reference/gateway/endpoints/delete-an-endpoint) | Deletes an endpoint. |

## Groups

A group owns the model set, rate limits, usage limits, and place in the hierarchy that its keys inherit. Use these routes to manage groups and inspect their usage.

| Method | Endpoint | Description |
| :- | :- | :- |
| `GET` | [`/v1/gateway/groups`](/reference/gateway/groups/list-groups) | Lists groups. |
| `GET` | [`/v1/gateway/groups/{group_id}`](/reference/gateway/groups/get-a-group) | Gets a group. |
| `GET` | [`/v1/gateway/groups/{group_id}/usage`](/reference/gateway/groups/get-group-usage) | Gets group usage. |
| `POST` | [`/v1/gateway/groups`](/reference/gateway/groups/create-a-group) | Creates a group. |
| `PATCH` | [`/v1/gateway/groups/{group_id}`](/reference/gateway/groups/update-a-group) | Updates a group. |
| `DELETE` | [`/v1/gateway/groups/{group_id}`](/reference/gateway/groups/delete-a-group) | Deletes a group. |

## API keys

A federated API key is the credential your customers call with, bound to one group whose limits it inherits. Use these routes to mint, list, and revoke keys.

| Method | Endpoint | Description |
| :- | :- | :- |
| `GET` | [`/v1/gateway/groups/{group_id}/api_keys`](/reference/gateway/api-keys/list-api-keys-for-a-group) | Lists API keys for a group. |
| `GET` | [`/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix}`](/reference/gateway/api-keys/get-an-api-key) | Gets an API key. |
| `POST` | [`/v1/gateway/groups/{group_id}/api_keys`](/reference/gateway/api-keys/create-an-api-key) | Creates an API key. |
| `POST` | [`/v1/gateway/groups/{group_id}/api_keys/register`](/reference/gateway/api-keys/register-an-api-key) | Registers an API key. |
| `DELETE` | [`/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix}`](/reference/gateway/api-keys/revoke-an-api-key) | Revokes an API key. |

## Events

Every inference request through the gateway produces a billing event. Fetch events for a time window with this route, optionally filtered by API key prefix or external entity ID.

| Method | Endpoint | Description |
| :- | :- | :- |
| `GET` | [`/v1/gateway/events`](/reference/gateway/events/list-gateway-events) | Lists billing events. |

## Billing webhooks

Instead of polling for events, Frontier Gateway can push a signed per-request usage event to your webhook endpoint for every call. For the payload shape and signature verification, see [Billing webhooks](/reference/gateway/billing-webhooks).
