Skip to main content

Tags and customers

Two orthogonal attribution axes sit on top of the organization → team → application → key hierarchy.

The portal user answers “who owns the credential?” A customer answers “on whose behalf did the application call?” They can be different people or tenants. Tags answer “which labels did the caller or key attach?”

Tags​

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.tags in 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 participate in tag-scoped budget enforcement.

Tags are caller- or key-supplied labels. They are not managed cost centers. A cost center is assigned by a platform admin to an organization, team, application, or user and is resolved independently of request tags.

Customers (end users)​

Identify the human or tenant behind the application:

Source (first match wins)Header / field
Preferredx-zeallm-customer-id
Aliasx-zeallm-end-user-id
BodyOpenAI 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​

  • FinOps Analytics — filter spend by tag, or group it by customer under Attribution
  • Request Logs — filter by customer or tag
  • Gateway response does not echo the customer id; look up x-zeallm-request-id in logs

Embeddings do not accept customer/tag request headers. Only the key's pre-configured tags are recorded.

See FinOps relationship and data flow for how these axes combine with managed cost centers, budgets, and chargeback.