API reference

Presets

Saved request settings, called as a model, with every version kept.

On this page

GET/v1/presets

The account's presets, each at its current version, with how to call it.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

No parameters.

GET /v1/presets

curl
curl https://api.usdf.fi/v1/presets \
  -H "Authorization: Bearer $SESSION"

POST/v1/presets

A named request config: model or models, provider preferences, params and a system prompt.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesLower-case letters, digits and hyphens.
namestringNoA display name.
descriptionstringNoWhat the preset is for.
configobjectYesmodel or models, provider, params (temperature, max_tokens, tools and the rest) and system.

POST /v1/presets

curl
curl -X POST https://api.usdf.fi/v1/presets \
  -H "Authorization: Bearer $SESSION" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "support-bot",
    "config": {
      "model": "deepseek-v4.1-flash",
      "params": {"temperature": 0.2, "max_tokens": 512},
      "system": "Answer as the support team."
    }
  }'

Response, trimmed

{
  "object": "preset",
  "slug": "support-bot",
  "version": …,
  "versions": …,
  "config": { … },
  "use": { "model": "@preset/support-bot", "preset": "support-bot", "pinned": "@preset/support-bot@<version>" },
  …
}

GET/v1/presets/{slug}

One preset at its current version.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesPath. The preset's name.

GET /v1/presets/{slug}

curl
curl https://api.usdf.fi/v1/presets/{slug} \
  -H "Authorization: Bearer $SESSION"

PATCH/v1/presets/{slug}

Every save is a new version; requests use the newest. PUT and POST are taken the same.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesPath. The preset's name.
namestring or nullNoA display name.
descriptionstring or nullNoWhat the preset is for.
configobjectNoThe new config.

PATCH /v1/presets/{slug}

curl
curl -X PATCH https://api.usdf.fi/v1/presets/{slug} \
  -H "Authorization: Bearer $SESSION" \
  -H "Content-Type: application/json" \
  -d '{"config": {"model": "deepseek-v4.1-flash", "system": "Answer briefly."}}'

DELETE/v1/presets/{slug}

The preset and every version.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesPath. The preset's slug.

DELETE /v1/presets/{slug}

curl
curl -X DELETE https://api.usdf.fi/v1/presets/{slug} \
  -H "Authorization: Bearer $SESSION"

GET/v1/presets/{slug}/versions

Newest first.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesPath. The preset's name.
beforestringNoQuery. Versions below this number (next_before of the previous page).
limitintegerNoQuery. How many versions to return.

GET /v1/presets/{slug}/versions

curl
curl https://api.usdf.fi/v1/presets/{slug}/versions \
  -H "Authorization: Bearer $SESSION"

GET/v1/presets/{slug}/versions/{n}

One version's config.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesPath. The preset's name.
nstringYesPath. The version number.

GET /v1/presets/{slug}/versions/{n}

curl
curl https://api.usdf.fi/v1/presets/{slug}/versions/{n} \
  -H "Authorization: Bearer $SESSION"

POST/v1/presets/{slug}/versions/{n}

Saves version n again as the newest; restored_from names it. Every version is kept.

Auth: Session, not an API key: Authorization: Bearer <session token>. See Sign in.

NameTypeRequiredDescription
slugstringYesPath. The preset's name.
nstringYesPath. The version number.

POST /v1/presets/{slug}/versions/{n}

curl
curl -X POST https://api.usdf.fi/v1/presets/{slug}/versions/{n} \
  -H "Authorization: Bearer $SESSION"
Foundry documentation

Confirm it's you

Confirm to continue the action you started.

Checking confirmation options…