Presets API: save a named, versioned request config
Save a model, fallback list, default params, system prompt and tools as a named, versioned preset, then name it from a request instead of repeating config.
A preset is a saved, versioned bundle of request defaults you name from a chat or messages call instead of repeating the same configuration every time. Presets live at https://api.uplinkswitch.com/v1 and are managed with an admin key, or read with a console session. The chat reference covers a one-off request; this page covers the preset that stands behind many of them.
What a preset holds
A preset carries a name and a version that increases when its configuration changes, plus the defaults a request inherits:
| Field | Notes |
|---|---|
model | A catalog id, or one of your aliases, that the preset runs on. |
models | A fallback list tried in order when a route fails before the first byte. |
params | Defaults such as temperature; the request's own fields take precedence over these. |
system_prompt | Up to 32 KB. |
system_mode | prepend (the default) puts it ahead of the request's own system text; replace swaps it. |
tools | Up to 128 tool declarations. Request tools replace matching names; unmatched preset tools remain. |
description | Up to 280 characters, for your own reference. |
created_at, updated_at | Unix milliseconds. |
Manage presets
GET /v1/presets lists the organization's presets by name, and GET /v1/presets/{name} returns one with its version history. POST /v1/presets creates a preset at version 1. PUT /v1/presets/{name} creates the preset if it is new or replaces it if it exists, raising the version only when configuration changes. An identical PUT does not create a version. Call a saved preset with model: "@preset/support-bot". DELETE /v1/presets/{name} removes it. An organization may hold up to 100 presets.
Example
curl -X PUT https://api.uplinkswitch.com/v1/presets/support-bot \
-H "Authorization: Bearer sk-uplink-live-ADMIN..." \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5-5", "params": {"temperature": 0.2}, "system_prompt": "Answer in two sentences."}'The response is the preset at its new version; name it from a request to apply its defaults.
Status codes
Reads and replaces return 200, a fresh create 201. A field out of range is 400 invalid_request. No admin key and no console session is 401 unauthorized, and a key that is not an admin key is 403 forbidden. A model, or a fallback model, that does not exist is 404 model_not_found, and an unknown preset name is 404 preset_not_found. Creating a name that already exists is 409 preset_exists, and a hundred presets already is 409 limit_reached.