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:
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 areLiteral unions, so a wrong value is caught by your type checker
rather than silently ignored as an unknown query parameter:
Presets
preset onto the p query parameter the API reads. See
create_preset().