Frontier Gateway delivers a signed webhook to your configured endpoint for each inference request through the gateway. This is a webhook delivered to your endpoint, not an endpoint you call. Delivery is gated to workspaces onboarded to Frontier Gateway. For the consumption guide (verification snippets, retry semantics, and recommended consumption pattern), see Billing webhooks.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.
Event type
Frontier Gateway emits a single event type today:API_BILLING_USAGE. The payload uses the standard Baseten envelope, where type is the discriminator and data holds the event-specific fields.
Event type discriminator. Always
"API_BILLING_USAGE" for Frontier Gateway billing events.Event-specific payload.
- events (
array, required): One or more event entries per delivery. Each entry corresponds to a single inference request through the gateway. See Event fields below for the entry shape.
Event fields
Each entry indata.events[] describes one inference request.
Stable identifier for the event. Use this to deduplicate on your side; the same key never describes two distinct events. Stable across retries of the same delivery.
ISO 8601 UTC timestamp of the inference request, for example
"2025-07-07T23:40:35.905Z".Per-request identifier, useful for correlating billing events with platform logs.
Freeform JSON object passed through from the inference request. May be
null when no metadata is supplied.Slug of the model invoked, in
your-org/your-model form.The
customer_id of the federated user that owns the key used for the request. Set when the user was created via POST /v1/gateway/users.Token counts for the request.
- inputTokens (
integer, required): Prompt tokens consumed by the request. - outputTokens (
integer, required): Generated tokens returned by the model. - cachedInputTokens (
integer, required): Prompt tokens served from cache, when applicable.
Headers
Baseten sets two headers on every delivery.HMAC-SHA256 signature of the raw request body, in
v1=<hex> format, computed with your workspace’s webhook signing secret. Verify this on every delivery before trusting the payload. For more information, see Verify the signature.UUID generated per outbound delivery. Reused across retry attempts of the same delivery, so it’s useful as a correlation ID against Baseten platform logs but not as a deduplication key. Use
idempotencyKey to dedupe events.Signature format
TheX-Baseten-Signature header has the format v1=<hex>, where <hex> is the HMAC-SHA256 of the raw request body computed with your workspace’s webhook signing secret. Compute the HMAC against the raw request bytes, not a re-serialized JSON, and compare in constant time. For runnable verification snippets in Python and Node.js, see Verify the signature.