In Frontier Gateway, every API key belongs to a federated user: the resource that owns one downstream customer’sDocumentation Index
Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
Use this file to discover all available pages before exploring further.
customer_id, model set, and rate and usage limits. You manage users with POST/GET/DELETE /v1/gateway/users[...] and mint, list, or revoke their keys with POST/GET/DELETE /v1/gateway/users/{user_id}/api_keys[...]. This page walks the full lifecycle: creating a user, minting a key, listing and revoking keys, and soft-deleting the user when their account closes.
Concepts
A federated user maps a single downstream customer of yours into Frontier Gateway. The user owns:- A
customer_id: a stable identifier you choose, unique within your workspace. Use it to map the user back to your own system. Thecustomer_idis included asexternalCustomerIdon every billing webhook event for the user’s keys. - A model set: the slugs the user is allowed to call.
- Rate and usage limits: per-model
TOKEN/REQUESTceilings enforced on every call. Limits live on the user, not on the key.
. in the full key string) used as the path parameter in every per-key URL. The plaintext secret after the . is shown once at creation and is never retrievable; lose it and you must revoke and reissue.
The model set on the user is the maximum scope a key can be authorized for. When you mint a key, you can optionally restrict it to a subset of the user’s slugs; the key can never call slugs that aren’t on the user.
Create or update a user
Upsert a federated user withPOST /v1/gateway/users. The body specifies the user’s customer_id and the complete list of models with their rate and usage limits. The endpoint is upsert by customer_id: a request with a customer_id that already exists in your workspace updates that user instead of creating a new one. The models list defines the user’s complete model set with set semantics. Slugs added to the list are added to the user, and slugs currently on the user but absent from this list are removed (cascading to existing keys’ access).
id. It’s the path parameter for every per-user operation that follows.
models list must be non-empty. To remove all models from a user, delete the user instead. For the limit-shape reference, see Rate and usage limits.
List users
Fetch federated users for your workspace withGET /v1/gateway/users. Results are cursor-paginated: the default page size is 100 and the maximum is 1000. Pass ?customer_id= to look up a single user by their external identifier.
pagination block with has_more and a cursor you pass back to fetch the next page:
"has_more": false and "cursor": null.
Mint an API key
Mint a new API key for an existing federated user withPOST /v1/gateway/users/{user_id}/api_keys. The path parameter is the user’s internal id (not their customer_id). The body has two optional fields:
name: a display name for the key.models: a subset of the user’s model slugs the key may be used for. Omit it to default to the user’s full model set; every slug you list must already be on the user.
List a user’s keys
Fetch the keys belonging to a federated user withGET /v1/gateway/users/{user_id}/api_keys. Results are cursor-paginated with the same shape as the user list.
GET /v1/gateway/users/{user_id}/api_keys/{api_key_prefix}:
Revoke a key
Revoke a single key withDELETE /v1/gateway/users/{user_id}/api_keys/{api_key_prefix}. Other keys under the same user are unaffected.
Delete a user
When a downstream customer churns, soft-delete their federated user withDELETE /v1/gateway/users/{user_id}. This soft-deletes the user, soft-revokes all of its keys, and frees the customer_id for reuse. You can call POST /v1/gateway/users again with the same customer_id to provision a fresh user.
Next steps
- Rate and usage limits: Token and request thresholds, daily reset, and 429 behavior.
- Billing webhooks: Stream signed per-request usage events into your billing pipeline.