End users and tags
Say who each request is for and what it is for, then see cost per end user and per feature, cap each end user on its own, and budget each feature.
End users
If your application serves its own users through one Inference Bureau key, name the user on each request. Send the ib-user header, or use the field your SDK already has:
| Endpoint | Field |
|---|---|
/v1/chat/completions | user, or safety_identifier when user is absent |
/v1/responses | user, or safety_identifier |
/v1/messages | metadata.user_id (Anthropic) |
/v1/embeddings | user |
/v1/evaluate | user |
/v1/suggest | As the turn it pre-flights: user, or metadata.user_id for a Messages body |
The header wins when both are sent. Use an id that is stable for the user and means nothing outside your system, such as your internal user id or a hash of it, rather than an email address.
Tags
Tags say what a request was for: the feature, workflow or job, such as inference-bureau-search, summarize or nightly-digest. Send them comma-separated in the ib-tags header, or as ib.tags in the body; both together are merged. /v1/evaluate takes the header only.
curl https://api.inferencebureau.com/v1/chat/completions \
-H "Authorization: Bearer $IB_API_KEY" \
-H "Content-Type: application/json" \
-H "ib-user: ib-user-1042" \
-H "ib-tags: inference-bureau-search,onboarding" \
-d '{ "model": "openai/gpt-4o-mini", "messages": [{ "role": "user", "content": "Find my last invoice" }] }'Tags are kept by Inference Bureau and never sent to the provider or the gateway, so they add nothing to the cost of a request.
Rules
- An end user id is up to 256 characters, without control characters.
- A request takes up to 10 tags. Each is up to 64 characters of letters, digits and
_ . : / -, starting with a letter or digit, such asfeature:search. Tags are case-sensitive; a repeated tag counts once. - A value that breaks these rules is refused with
400 invalid_requestnaming the header or field, before anything is reserved or charged. - Neither the end user nor the tags are forwarded:
user,metadataandibare removed before dispatch.safety_identifieris forwarded as sent.
Where they show
- Logs: filter with
user = ib-user-1042ortag = inference-bureau-search, and click a user or tag in the table to add it. Export CSV includes both. - The project Overview lists the top end users and tags by charge for the selected range.
GET /v1/usagereturnsend_userandtagson every row and filters byend_userandtag, so a monthly bill per customer is one loop over pages.GET /v1/requests/:idshows them on the receipt.
Limits and budgets
Directives can limit each end user on its own: requests and tokens per minute, concurrent requests, requests and tokens per UTC day, and daily and monthly budgets, so one heavy user can't use up the team's allowance. endUser.required refuses requests that name no end user. See Directives: Per end user. When an end user's budget refuses a request, an end_user.budget_exhausted webhook tells you, once per end user per day or month.
Tags can have budgets too: tagBudgets caps the daily and monthly spend of requests carrying a tag, at the level that sets it, so a runaway job stops before it uses the team's budget. See Directives: Tag budgets.
All of this applies on every endpoint that takes an end user, /v1/evaluate and /v1/suggest included. A /v1/suggest pre-flight that needs no classifier call creates no request, so nothing is counted.