Transform Presets
Per-project custom named transform presets referenced via ?size=<name>. Free includes 5 presets per project, Starter 25 and Pro 100. Combine with project strict_transforms to restrict CDN delivery to declared presets only.
The Transform preset object
A project-scoped custom named transform preset usable via ?size=<name>.
Properties
| Property | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
params | TransformParams | On-the-fly image transform parameters (subset of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Child properties of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property | Type | Description |
|---|---|---|
size | string | Named preset (built-in or custom). Allowed on |
w | integer | |
h | integer | |
fit | string | |
fmt | string | |
q | string | |
dpr | string | Device pixel ratio multiplier (1, 1.5, or 2; requires w/h). |
trim | string | Auto-trim uniform outer borders. |
anim | string | Set |
metadata | string | EXIF/copyright/C2PA metadata handling. |
segment | string | |
background | string | |
gravity | string | |
zoom | string | |
blur | string | |
sharpen | string | |
rotate | string | |
flip | string | |
brightness | string | |
contrast | string | |
saturation | string | |
tile | string | Public same-project raster image path to tile as a watermark. |
watermark | string | Public same-project raster image path for a single positioned watermark. |
watermark_pos | string | |
watermark_opacity | string | Snapped to 0.25/0.5/0.75/1. |
watermark_width | string | Target width in px (snapped up to 32..512). |
text | string | Text overlay string. |
text_color | string | |
text_size | string | Font size in px (snapped to 16..128). |
text_pos | string | |
text_opacity | string | Snapped to 0.25/0.5/0.75/1. |
created_atupdated_at{
"name": "avatar",
"params": {
"size": "avatar",
"w": 400,
"h": 400,
"fit": "cover",
"fmt": "auto",
"q": "85",
"dpr": "2",
"trim": "border",
"anim": "false",
"metadata": "none",
"segment": "foreground",
"background": "white",
"gravity": "face",
"zoom": "0.7",
"blur": "30",
"sharpen": "1",
"rotate": "90",
"flip": "h",
"brightness": "1.25",
"contrast": "1.25",
"saturation": "0",
"tile": "img_logo.png",
"watermark": "img_logo.png",
"watermark_pos": "bottom-right",
"watermark_opacity": "0.75",
"watermark_width": "128",
"text": "SAMPLE",
"text_color": "#ffffff",
"text_size": "32",
"text_pos": "bottom-right",
"text_opacity": "0.75"
},
"created_at": "2026-11-17T09:30:00Z",
"updated_at": "2026-11-17T09:30:00Z"
}List custom transform presets
GET /v1/presets
Lists the active project's custom named transform presets, plan capacity (Free 5, Starter 25, Pro 100), built-in preset names, and whether strict_transforms is enabled.
Authentication
API key, or a dashboard session token, sent as Authorization: Bearer <token>.
Responses
- 200
Project transform presets and limits
- 401
unauthorized: no Bearer token, or the dashboard session is invalid or expired.invalid_api_key: the API key is unknown or revoked. - 403
preset_management_forbidden: publishable keys cannot manage transform presets.account_suspended: the account is suspended. - 429
rate_limit_exceeded: more than 60 requests per minute for this key (or dashboard session) or 300 per minute for the project. HonourRetry-After.
curl https://api.pixelvault.dev/v1/presets \
-H "Authorization: Bearer $PIXELVAULT_API_KEY" {
"data": [
{
"name": "avatar",
"params": {
"size": "avatar",
"w": 400,
"h": 400,
"fit": "cover",
"fmt": "auto",
"q": "85",
"dpr": "2",
"trim": "border",
"anim": "false",
"metadata": "none",
"segment": "foreground",
"background": "white",
"gravity": "face",
"zoom": "0.7",
"blur": "30",
"sharpen": "1",
"rotate": "90",
"flip": "h",
"brightness": "1.25",
"contrast": "1.25",
"saturation": "0",
"tile": "img_logo.png",
"watermark": "img_logo.png",
"watermark_pos": "bottom-right",
"watermark_opacity": "0.75",
"watermark_width": "128",
"text": "SAMPLE",
"text_color": "#ffffff",
"text_size": "32",
"text_pos": "bottom-right",
"text_opacity": "0.75"
},
"created_at": "2026-11-17T09:30:00Z",
"updated_at": "2026-11-17T09:30:00Z"
}
],
"meta": {
"limit": 25,
"total": 2,
"strict_transforms": false,
"builtin_presets": [
"s",
"m",
"l",
"social",
"square",
"portrait"
]
}
} Create or update a transform preset
PUT /v1/presets/{name}
Idempotently creates (201) or updates (200) a named transform preset on the active project and mirrors it to edge KV. Reference it on any project image URL with ?size=<name>. Presets cannot nest size.
Authentication
API key, or a dashboard session token, sent as Authorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Custom preset name (2–40 lowercase letters, digits, |
Request body
| Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params | TransformParams | Required | On-the-fly image transform parameters (subset of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Child properties of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | Type | Required | Description |
|---|---|---|---|
size | string | Optional | Named preset (built-in or custom). Allowed on |
w | integer | Optional | |
h | integer | Optional | |
fit | string | Optional | |
fmt | string | Optional | |
q | string | Optional | |
dpr | string | Optional | Device pixel ratio multiplier (1, 1.5, or 2; requires w/h). |
trim | string | Optional | Auto-trim uniform outer borders. |
anim | string | Optional | Set |
metadata | string | Optional | EXIF/copyright/C2PA metadata handling. |
segment | string | Optional | |
background | string | Optional | |
gravity | string | Optional | |
zoom | string | Optional | |
blur | string | Optional | |
sharpen | string | Optional | |
rotate | string | Optional | |
flip | string | Optional | |
brightness | string | Optional | |
contrast | string | Optional | |
saturation | string | Optional | |
tile | string | Optional | Public same-project raster image path to tile as a watermark. |
watermark | string | Optional | Public same-project raster image path for a single positioned watermark. |
watermark_pos | string | Optional | |
watermark_opacity | string | Optional | Snapped to 0.25/0.5/0.75/1. |
watermark_width | string | Optional | Target width in px (snapped up to 32..512). |
text | string | Optional | Text overlay string. |
text_color | string | Optional | |
text_size | string | Optional | Font size in px (snapped to 16..128). |
text_pos | string | Optional | |
text_opacity | string | Optional | Snapped to 0.25/0.5/0.75/1. |
Responses
- 200
Updated transform preset
- 201
Created transform preset
- 400
invalid_jsonorvalidation_error: invalid preset name or invalid/emptyparams. - 401
unauthorized: no Bearer token, or the dashboard session is invalid or expired.invalid_api_key: the API key is unknown or revoked. - 403
preset_management_forbidden: publishable keys cannot manage transform presets.account_suspended: the account is suspended. - 409
preset_limit_reached: the project already has the maximum number of custom presets for its plan. - 429
rate_limit_exceeded: more than 60 requests per minute for this key (or dashboard session) or 300 per minute for the project. HonourRetry-After.
curl -X PUT https://api.pixelvault.dev/v1/presets/avatar \
-H "Authorization: Bearer $PIXELVAULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"params": {
"size": "avatar",
"w": 400,
"h": 400,
"fit": "cover",
"fmt": "auto",
"q": "85",
"dpr": "2",
"background": "white",
"gravity": "face",
"zoom": "0.7",
"blur": "30",
"sharpen": "1",
"rotate": "90",
"brightness": "1.25",
"contrast": "1.25",
"saturation": "0",
"tile": "img_logo.png",
"watermark": "img_logo.png",
"watermark_pos": "bottom-right",
"watermark_opacity": "0.75",
"watermark_width": "128",
"text": "SAMPLE",
"text_color": "#ffffff",
"text_size": "32",
"text_pos": "bottom-right",
"text_opacity": "0.75"
}
}' {
"data": {
"name": "avatar",
"params": {
"size": "avatar",
"w": 400,
"h": 400,
"fit": "cover",
"fmt": "auto",
"q": "85",
"dpr": "2",
"trim": "border",
"anim": "false",
"metadata": "none",
"segment": "foreground",
"background": "white",
"gravity": "face",
"zoom": "0.7",
"blur": "30",
"sharpen": "1",
"rotate": "90",
"flip": "h",
"brightness": "1.25",
"contrast": "1.25",
"saturation": "0",
"tile": "img_logo.png",
"watermark": "img_logo.png",
"watermark_pos": "bottom-right",
"watermark_opacity": "0.75",
"watermark_width": "128",
"text": "SAMPLE",
"text_color": "#ffffff",
"text_size": "32",
"text_pos": "bottom-right",
"text_opacity": "0.75"
},
"created_at": "2026-11-17T09:30:00Z",
"updated_at": "2026-11-17T09:30:00Z"
},
"meta": {
"limit": 0
}
} Delete a transform preset
DELETE /v1/presets/{name}
Removes a custom named preset from the active project and updates edge KV.
Authentication
API key, or a dashboard session token, sent as Authorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Custom preset name (2–40 lowercase letters, digits, |
Responses
- 200
Deleted preset
- 401
unauthorized: no Bearer token, or the dashboard session is invalid or expired.invalid_api_key: the API key is unknown or revoked. - 403
preset_management_forbidden: publishable keys cannot manage transform presets.account_suspended: the account is suspended. - 404
preset_not_found: no custom preset with this name exists in the project. - 429
rate_limit_exceeded: more than 60 requests per minute for this key (or dashboard session) or 300 per minute for the project. HonourRetry-After.
curl -X DELETE https://api.pixelvault.dev/v1/presets/avatar \
-H "Authorization: Bearer $PIXELVAULT_API_KEY" {
"data": {
"deleted": true,
"name": "avatar"
}
}