Headers
Request (client → gateway)
| Header | Used on | Purpose |
|---|---|---|
Authorization: Bearer <key> | All API routes | Virtual key |
x-zeallm-customer-id | Chat | End-user / customer for spend and customer budgets |
x-zeallm-end-user-id | Chat | Alias for customer id (lower priority) |
x-zeallm-tags | Chat | Comma-separated cost-center tags |
Customer resolution: x-zeallm-customer-id → x-zeallm-end-user-id → body user. Upsert is best-effort.
Tags (chat): key tags + x-zeallm-tags + metadata.tags.
Response (gateway → client)
| Header | Chat | Embeddings | Meaning |
|---|---|---|---|
x-zeallm-request-id | Yes | Yes | req_<24 hex> — look up in Request Logs |
x-zeallm-model-group | Yes | Yes | Group that actually served the call |
x-zeallm-fallback-from | Yes | Yes | Original group if fallback fired |
x-zeallm-provider | Yes | — | OPENAI, AZURE_OPENAI, ANTHROPIC |
x-zeallm-key-max-budget | Yes* | — | Key max budget (6 decimal places) |
x-zeallm-key-spend | Yes* | — | Key current spend (6 decimal places) |
*Only when the key has an effective max budget.