Tags and customers
Two orthogonal attribution axes sit on top of the org → team → key hierarchy.
Tags (cost centers)
Clients send tags on chat completions:
x-zeallm-tags: cost-center-42,experiment-a
The gateway also merges:
- Tags already stored on the key (environment, application)
metadata.tagsin the request body (array of strings)
Create managed tags with their own budgets on the Tags page. Unmanaged tags still appear in usage breakdowns; only managed tags can block a request when their budget is exhausted.
Customers (end users)
Identify the human or tenant behind the application:
| Source (first match wins) | Header / field |
|---|---|
| Preferred | x-zeallm-customer-id |
| Alias | x-zeallm-end-user-id |
| Body | OpenAI user field |
Customers are upserted best-effort — a lookup failure does not block the call. Platform admins can set a per-customer budget, tier, or block the customer (403 customer_blocked).
Manage them on Customers.
Where attribution shows up
- Usage — group spend by tag or customer
- Request Logs — filter by customer or tag
- Gateway response does not echo the customer id; look up
x-zeallm-request-idin logs
Embeddings do not accept customer/tag request headers. Only the key's pre-configured tags are recorded.