Skip to content

Presets

Save a (model + system prompt + params) bundle once and invoke it as model:"@preset/<slug>".

A preset is a saved bundle of settings you use often — a specific model, system prompt, and sampling parameters stored under one slug. In a normal chat call you then just set "model": "@preset/<slug>" to reuse that whole configuration. Presets belong to your account and are invoked with your plm_ key.

Managing presets#

POST/v1/presets

The preset management endpoints authenticate with your dashboard session token (a logged-in JWT) — Authorization: Bearer <JWT>. These are dashboard-management APIs, not SDK-compatible endpoints. List with GET /v1/presets, update with PATCH /v1/presets/{id}, and delete with DELETE /v1/presets/{id}.

ParameterTypeRequiredDescription
slugstringRequiredThe invocation id. Pattern ^[a-z0-9][a-z0-9-]{0,62}$. Used as "@preset/<slug>".
display_namestringRequiredDisplay name. 1 to 100 characters.
descriptionstringOptionalOptional. Up to 500 characters.
system_promptstringOptionalOptional. Prepended as a system message.
modelstringRequiredThe model ID the preset routes to.
paramsobjectOptionalOptional. Only temperature, max_tokens, top_p, frequency_penalty, and presence_penalty are kept; other keys are dropped.

POST /v1/presets returns 201 on success. If a preset with the same slug already exists, it returns 409.

create preset
curl https://apirouter.pleum.ai/v1/presets \
  -H "Authorization: Bearer <JWT>" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "terse-coder",
    "display_name": "Terse Coder",
    "description": "Short, code-only answers.",
    "system_prompt": "You are a terse coding assistant. Reply with code and minimal prose.",
    "model": "claude-sonnet-4-6",
    "params": {
      "temperature": 0.2,
      "max_tokens": 2048
    }
  }'

Using a preset#

In a normal chat call, set "model": "@preset/<slug>". It works with the OpenAI SDK and your plm_ key, and the preset's model, system prompt, and params are applied.

use preset
curl https://apirouter.pleum.ai/v1/chat/completions \
  -H "Authorization: Bearer plm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "@preset/terse-coder",
    "messages": [
      {"role": "user", "content": "Reverse a linked list in Python."}
    ]
  }'
Parameters set explicitly in the request override the preset's values — for example, passing temperature in the request body takes precedence over the preset's value. Slugs are unique per user (409 on a duplicate), and calling an unknown slug returns 400.