Media

Reshape one image into several platform canvases in a single call.

Cropping is saliency-based by default — an off-centre subject survives a 4:5 → 9:16 cut, where a centre crop would keep the wall behind them. Pass crop: "centre" for posters, screenshots and flat graphics composed around their middle. Two formats with the same dimensions produce one file, not two, and each variant inherits the source’s alt text and folder. Images only.

post/v1/media/{id}/variants

Request

  • Base URL: https://api.ravenpo.st
  • URL: https://api.ravenpo.st/v1/media/{id}/variants
  • Auth: HTTP bearer

Path parameters

idstring required

Source image asset id.

Request body

formatsstring[] required

Canvases to produce: 1080×1350 (4:5), 1080×1080 (1:1), 1080×566 (1.91:1), 1080×1920 (9:16 — also reels and TikTok photos).

fitstring

'cover' crops to fill (default); 'contain' pads so nothing is cut off.

cropstring

'smart' is saliency-based and the default; 'centre' is the predictable middle crop.

Response

Success

Changes

No recorded changes to this operation across all 1 revision of this API.