Named presets
Define a transform bundle once, reference it by name everywhere. A preset is a saved set of params (w, h, q, fit, gravity, format, plus the text-overlay options) stored per workspace.
There are two equivalent ways to reference a preset:
Manage presets
| Method | Endpoint | Use |
|---|---|---|
GET | /api/cdn-presets | List every preset on the workspace. |
POST | /api/cdn-presets | Create a preset. Body: { "name": "hero", "params": { "w": 1920, "h": 720, "fit": "cover", "format": "auto" } }. |
PATCH | /api/cdn-presets/{id} | Replace a preset’s params (provide the full new shape). |
DELETE | /api/cdn-presets/{id} | Delete a preset. URLs using ?preset= for it return 404. |
When to use a preset vs inline params
Use a preset when:- The same transform shows up in more than 2-3 places in your codebase.
- A design-system component (Hero, Card, Thumb) has a standard variant.
- You want to be able to retune quality / size without touching markup.
Signed URLs
By default, CDN URLs are public — anyone with the URL can fetch the image at any size. That’s fine for<img src> on a marketing page. For gated content (paid downloads, subscriber-only assets, signed-link emails), use signed URLs: a server-generated HMAC signature is appended as ?s=…, and any tampering with the URL (changing width, format, swapping the file id or slug) invalidates it.
Public CDN signatures do not expire. Once generated, a signed URL stays valid until you rotate the delivery key or change signing secrets. For time-limited links, use the legacy
/api/cdn/image/{id} route or gate access at your application layer.Generate a signed URL
{deliveryKeyId}is the row id you got when you created the key (visible in Settings → Image CDN → Delivery keys).- The
Authorizationheader carries the public delivery token — your server keeps both around because the token ends up in the URL.
403. Browsers, CDNs, and <img src> treat it like any other URL — there’s nothing special to do client-side.
When to use signed URLs
- Paid downloads where you want to bind a URL to a specific transform you priced.
- Subscriber-only galleries where you don’t want anyone to scrape and serve the same images elsewhere.
- Email campaigns with one-shot artwork that shouldn’t be reused.
<img src> is public by nature. Use the unsigned form there.
Programmatic signing
Most apps should use thePOST /api/delivery-keys/{id}/sign endpoint above — it returns a ready-to-embed URL.
If you need to sign in application code, the algorithm matches what that endpoint uses: canonical query string (sorted keys, excluding s), HMAC over {deliveryKey}:{fileId}:{canonicalQuery} with a per-delivery-key secret. Retrieve the secret from the dashboard when you create or rotate a delivery key.