Presets
Bundle a model, system prompt, and parameters into one reusable name.
A preset bundles a model choice, system prompt, and generation parameters (temperature, max_tokens, top_p) into a single name you can reference from any client, instead of repeating the same configuration in every request.
Create a Preset
- Go to Presets in the dashboard.
- Select New preset.
- Set the model, system prompt, and parameters.
- Name the preset. This is the name you'll reference in requests.
- Select Save preset.
Reference the preset by name in the model field, using the policy/ convention:
POST https://api.relixr.com/v1/chat/completions
Authorization: Bearer $RELIXR_API_KEY
{
"model": "policy/support-bot",
"messages": [{"role": "user", "content": "My order is late"}]
}
// Gateway resolves policy/{name} to the preset's model,
// system prompt, temperature, max_tokens, and top_p.Presets are the fastest way to change a model version for every caller at once — update the preset in the dashboard, and every integration referencing @preset/support-bot picks up the change on its next request. No redeploy needed.
Presets sync to the gateway as soon as you save. Assign a default preset to an inference key from the key detail page, so callers using that key don't need to specify one at all.
Request attribution
Use the reserved relixr object to attach queryable attribution. It is removed before Relixr forwards your request to a provider. Body attribution wins over equivalent X-Relixr-* headers.
curl https://api.relixr.com/v1/chat/completions \
-H "Authorization: Bearer $RELIXR_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"policy/support-bot","messages":[{"role":"user","content":"Hello"}],"relixr":{"user_id":"u1","trace_id":"trace-123","tags":["prod"],"extra":{"team":"support"}}}'user_id, trace_id, and session_id are strings; tags is a string array; extra is a flat string map; and auto_cache is a boolean. The envelope is limited to 2 KB, 12 fields, 12 tags, and 128 characters per string so it remains safe to index and query.
You can instead send analytics dimensions as inbound headers: X-Relixr-Agent, X-Relixr-Environment, X-Relixr-Team, X-Relixr-Branch, and X-Relixr-Customer. Any X-Relixr-<Name> header becomes the lowercase <name> dimension. Values over 128 characters, or dimensions beyond the first 12, are ignored and recorded in request detail; none of these headers are forwarded upstream.
Still stuck? Help center · Doctor