Skip to content
Rapid Router
← API reference

Presets

Part of the Rapid Router API reference. One OpenAI-compatible endpoint, https://rapidrouter.ai/api/v1, in front of every model in the catalog.

16Presets

A preset is a named request template you manage in the dashboard: a model (with optional fallback models), a system prompt, sampling parameters (temperature, top_p, max_tokens), reasoning settings and provider routing preferences. Your code calls the name; the gateway resolves it server-side on every request, so changing the preset changes behaviour without a deploy. Three call forms:

curl https://rapidrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "preset": "support-triage",
    "messages": [{ "role": "user", "content": "My invoice is wrong" }]
  }'

# -> { ..., "preset": { "slug": "support-triage", "version": 3 } }

Merging is field by field and the request always wins. A model in the request beats the preset's; when the preset supplies it, its model then its models list are tried in order and the first with an available route serves (provider-level failover then applies to that model as usual). The system prompt is prepended only when the request carries no system message of its own. Sampling parameters fill gaps: a temperature in the request is used, the preset's only otherwise. Provider preferences merge key by key with the request's winning. The preset fields are stripped before anything is forwarded upstream.

Presets are versioned: every save appends a new version, the response reports which one served ("preset": { "slug", "version" }, on streams as a leading chunk), and any earlier version can be restored from the dashboard's history, itself recorded as a new version. Presets are per account; calling someone else's slug, or a deleted one, is a 400 preset_not_found; GET /v1/presets lists the slugs your account has. Works on chat completions (streaming included), /messages and /responses via the model forms, in batches, and in the playground.