Complete reference for all X-Majordomo-* HTTP headers — authentication key, provider selection, and custom metadata dimensions for cost attribution.
Majordomo controls all gateway behavior through HTTP headers. This page covers every X-Majordomo-* header you can send — required authentication, optional provider selection, and the open-ended metadata headers you use to tag requests for cost attribution and usage analysis.
When you omit X-Majordomo-Provider, the gateway infers the provider from the request path:
Path prefix
Inferred provider
/v1/chat/completions
OpenAI
/v1/messages
Anthropic
/v1beta/models
Gemini
Set X-Majordomo-Provider explicitly when your request path does not match the defaults above, or when you are routing the same path to multiple different providers.
Metadata lands in the raw_metadata JSONB column on llm_requests. From the dashboard, you can promote any key to the indexed_metadata column, which is GIN-indexed for fast @> queries.Naming convention: The X-Majordomo- prefix is stripped; the rest of the header name is stored as-is. X-Majordomo-Feature becomes Feature in the metadata map.No schema changes required. You can start sending a new metadata key at any time and it is stored immediately — no database migrations needed.
X-Majordomo-* headers are not forwarded to upstream providers. The gateway consumes and strips them before proxying the request. All other headers — including custom X-* headers your provider supports, Authorization, and Content-Type — are forwarded as-is.