API reference/POST /presets
Presets
Save a reusable bundle of parameters once, then apply it on any processing call with preset=<id>. Manage presets with GET (list), POST (create or update), and DELETE.
POSThttps://useknockout--api.modal.run/presets
Parameters
Send as multipart/form-data unless noted otherwise.
FieldTypeDefaultDescription
namerequiredstring–Human-readable preset name. Required on POST.
endpointstring–Optional endpoint this preset targets, e.g. /studio-shot.
paramsobject–JSON object of stored param defaults, e.g. {"bg_color":"#FFFFFF","aspect":"1:1","max_dim":2048}.
idstring–Preset id. Required for DELETE; pass on POST to overwrite an existing preset.
Request
curl -X POST "https://useknockout--api.modal.run/presets" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Catalog 1:1","endpoint":"/studio-shot","params":{"aspect":"1:1","bg_color":"#FFFFFF"}}'Response
HTTP/1.1 200 OK
content-type: application/jsonErrors
FieldTypeDefaultDescription
401unauthorized–Missing or invalid token.
404not_found–No preset with that id for this account.
Every error response also includes a
request_id in the JSON body. Quote it when reporting issues.Notes
- GET /presets lists your presets. POST creates one (or updates when you pass id). DELETE /presets removes one (send id).
- Apply a preset with the preset= param on /remove, /replace-bg, and /studio-shot. Explicit params always win over stored values.