By the end of this guide, you’ll have created a Frontier Gateway group for one of your downstream customers, minted an API key bound to that group, and called your Dedicated deployment through the gateway with the key. From here, you can build a deeper group hierarchy, configure additional rate and usage limits, set up billing webhooks, and explore the full lifecycle.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.
Prerequisites
- A Dedicated deployment of your model on Baseten.
- A Baseten workspace API key with management scope, exported as
BASETEN_API_KEY. - Completed Frontier Gateway onboarding with your Baseten team.
/v1/gateway/ endpoints used here return 403 to workspaces that aren’t onboarded.
Step 1: Create a group
A group is the resource you create per customer, plan, project, or whichever unit of your organizational hierarchy maps to a billing or access boundary. The group owns an external identifier (your stable ID for this entity), the model slugs it’s allowed to call, and the rate and usage limits enforced on every call. API keys are minted under the group in step 2. Create a group withPOST /v1/gateway/groups. The request takes a metadata block (display name plus the external identifier), a non-empty models list pairing each model slug with its rate and usage limits, and a hierarchy block declaring the inheritance mode and an optional parent. This example creates a top-level (root) group with independent enforcement.
id you’ll use as the path parameter when minting keys:
id. You’ll need it in step 2. The effective_models block shows the limits the runtime enforces after inheritance; for a root group it matches models exactly. See Rate and usage limits for how this changes once you add a parent.
Step 2: Mint an API key for the group
Issue a new API key under the group withPOST /v1/gateway/groups/{group_id}/api_keys. The key inherits the group’s effective model set and limits; you don’t configure either on the key itself.
. (here, aBcDeFg) is the prefix. You’ll use the prefix, not the full key, when fetching or revoking the key later.
Step 3: Call your model through the gateway
Use the API key from step 2 to call your model. Frontier Gateway is OpenAI-compatible, so the OpenAI SDK works with the gateway base URL. ReplaceYOUR_API_KEY in the examples below with the value you saved from the mint-key response.
- Python
- curl
Install the OpenAI SDK:Make a chat completion request:
chat.py
https://inference.baseten.co/v1 today. Once white-label routing is provisioned for your workspace, the base URL becomes the branded domain you configure with your Baseten team, and your downstream customers call your domain instead.
Next steps
- Manage groups and API keys: Build a multi-level hierarchy, mint and revoke keys, and delete groups.
- Rate and usage limits: Tune per-group, per-model thresholds and pick an inheritance mode.
- Billing webhooks: Stream signed per-request usage events into your billing pipeline.