Skip to main content
Appends transform parameters to an asset’s delivery URL. Pure string work — no network call, no API key — so it’s safe in a render path.

Signature

It never builds a URL from scratch. The delivery host and API version come from server configuration — a project can serve from its own CDN domain — so the only correct base is the one the API already returned. If you store URLs rather than whole assets, pass the string:
Anything with an id and a url works as target: Asset, MediaItem, BackgroundRemovedAsset, ConvertedDocument. Transforms run on the fly and are cached, so one original serves every size you ask for.

Parameters

Transform is a TypedDict; every key is optional. Snake_case keys are converted to the names the API reads, so trim_start becomes trimStart on the wire. See Image Transformations, Video Transformations and Document Conversions for what each does.

Type safety

Enum-like parameters are Literal unions, so a wrong value is caught by your type checker rather than silently ignored as an unknown query parameter:
A misspelled key is caught at runtime too, instead of quietly returning the original:

Presets

The SDK maps preset onto the p query parameter the API reads. See create_preset().