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 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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Lower-case letters, digits and hyphens. |
name | string | No | A display name. |
description | string | No | What the preset is for. |
config | object | Yes | model or models, provider, params (temperature, max_tokens, tools and the rest) and system. |
POST /v1/presets
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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Path. The preset's name. |
GET /v1/presets/{slug}
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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Path. The preset's name. |
name | string or null | No | A display name. |
description | string or null | No | What the preset is for. |
config | object | No | The new config. |
PATCH /v1/presets/{slug}
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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Path. The preset's slug. |
DELETE /v1/presets/{slug}
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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Path. The preset's name. |
before | string | No | Query. Versions below this number (next_before of the previous page). |
limit | integer | No | Query. How many versions to return. |
GET /v1/presets/{slug}/versions
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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Path. The preset's name. |
n | string | Yes | Path. The version number. |
GET /v1/presets/{slug}/versions/{n}
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.
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Path. The preset's name. |
n | string | Yes | Path. The version number. |
POST /v1/presets/{slug}/versions/{n}
curl -X POST https://api.usdf.fi/v1/presets/{slug}/versions/{n} \
-H "Authorization: Bearer $SESSION"