client=acme or project=invoices. OmniRelay stores them with the request, so the console can split usage and cost per customer, project or environment. There is nothing to set up: tag a call and it appears on the Usage page.
Adding tags to a call
With the X-Gateway-Tags header
Write key=value pairs separated by commas. Spaces around a pair are ignored. If a proxy repeats the header, every copy’s pairs are kept.
With a tags field in the body
tags field that is not an object, such as the list some SDKs send, is ignored rather than refused.
As default tags on an API key
Tags set on a key are added to every call made with it, so a key that serves one customer or one environment needs nothing in its requests. Set them under Default tags when you create a key or open Key settings on the API Keys page.From the OpenAI SDK
Combining sources
When a call gets tags from more than one place, they are merged by key and the call’s own tags win: the header over the key’s defaults, the body over both.Rules
A call that breaks a rule fails with
400 invalid_tags, is not charged, and still appears on the Usage page as a failed request.
Reading tagged usage
On the Usage page:- The Tag filter keeps calls carrying a tag key, or, with a value, only that value. It combines with the model, provider, key and status filters.
- Explore → Group by → Tag splits spend, requests, tokens or errors by one tag key. Calls without that tag form their own row, so the rows add up to the total.
- When the per-request list is enabled for your account, the Requests log shows each call’s tags and the CSV export has a
tagscolumn.