This is the core Openinary endpoint. The first request processes and caches the result; subsequent requests are served from cache in ~50ms.
Endpoint
Path parameters
Comma-separated transformation parameters. Omit this segment (or use
t/) to serve the original file without transformations.w_800,h_600,c_fill,q_85,f_webpPath to the file relative to the storage root, including the file extension.
image.jpg · photos/portrait.png · videos/clip.mp4Image parameters
Quick reference
| Param | Full name | Description |
|---|---|---|
w | width | Width in pixels |
h | height | Height in pixels |
c | crop | Crop/resize mode |
ar | aspect ratio | Crop to a given ratio (W:H) |
a | angle | Rotation angle or auto |
g | gravity | Focal point for cropping |
b | background | Background color (hex) |
r | round corners | Radius in pixels, per-corner list, or max |
q | quality | Compression level (1–100) |
f | format | Output format |
Parameter reference
Width of the output image in pixels.
w_800 · w_1920 · w_400Height of the output image in pixels.
h_600 · h_1080 · h_400How the image is resized and cropped.
| Value | Behavior |
|---|---|
fill | Fill the area, cropping the overflow (default) |
fit | Fit within dimensions, preserving aspect ratio |
scale | Stretch to exact dimensions (distorts if ratios differ) |
crop | Resize and crop to exact dimensions |
pad | Fit and add background-colored borders |
Crop the image to a specific aspect ratio. Format:
W:H.ar_16:9 · ar_1:1 · ar_4:3Rotate the image. Use
auto to rotate based on data, or a number (0–360) for a fixed angle.a_auto · a_90 · a_180Focal point used when cropping.
| Value | Behavior |
|---|---|
center | Center of the image (default) |
north | Top edge |
south | Bottom edge |
east | Right edge |
west | Left edge |
face | Face detection — keeps the detected face in frame |
auto | Entropy-based region of interest detection |
Background color for
c_pad (padding fill), a_<angle> (rotation fill), and r_<radius> (corner fill). Use rgb: followed by a 6-digit hex value.b_rgb:ffffff (white) · b_rgb:000000 (black) · b_rgb:f5f5f5 (light gray)Rounds the corners of the image using an SVG alpha mask.
| Syntax | Behavior |
|---|---|
r_<int> | Same radius on all four corners |
r_v1:v2 | v1 = top-left & bottom-right, v2 = top-right & bottom-left |
r_v1:v2:v3 | v1 = top-left, v2 = top-right & bottom-left, v3 = bottom-right |
r_v1:v2:v3:v4 | Each corner individually: TL, TR, BR, BL (clockwise) |
r_max | Circle (square image) or oval (rectangular image) |
r_80 · r_20:80 · r_20:0:40:60 · r_maxBy default, cut corners are transparent — use f_png, f_webp, or f_avif. Add b_rgb:<hex> to fill corners with a solid color and use any format including JPEG.Radius is clamped to half the shorter dimension. Round corners are not supported for video.
Compression quality from 1 (smallest file) to 100 (highest quality).
| Range | Trade-off |
|---|---|
| 90–100 | High quality, larger file |
| 80–89 | Recommended sweet spot |
| 60–79 | Smaller file, slight quality loss |
| 1–59 | Aggressive compression, visible artifacts |
Force a specific output format. When omitted, the best format is chosen automatically based on the browser’s
Accept header.| Value | Notes |
|---|---|
avif | Best compression (up to 50% vs JPEG) |
webp | Excellent compatibility, ~30% vs JPEG |
jpeg / jpg | Universal fallback |
png | Lossless, supports transparency |
Image examples
- Resize
- Smart crop
- Aspect ratio
- Format
Instagram portrait
Instagram portrait
Padded thumbnail
Padded thumbnail
Rotated PNG (with transparency)
Rotated PNG (with transparency)
Full HD AVIF
Full HD AVIF
Circular avatar
Circular avatar
f_png or f_webp to preserve the alpha channel, or add b_rgb:<hex> to fill corners with a solid color.Rounded card image
Rounded card image
Supported image formats
Input: JPEG, PNG, WebP, AVIF, GIF (first frame), HEIC/HEIF (converted to JPEG on upload), PSD (layers composited) Output: AVIF, WebP, JPEG, PNGVideo parameters
Quick reference
Parameter reference
Width of the output video in pixels.
w_1920 (1080p) · w_1280 (720p) · w_640 (SD)Height of the output video in pixels.
h_1080 · h_720 · h_480 · h_360Resize/crop strategy.
| Value | Behavior |
|---|---|
fill | Scale and crop to fill the target dimensions |
crop | Resize and crop to exact dimensions |
Video quality via encoding. Range: 1–100.
q value | CRF | Notes |
|---|---|---|
| 100 | 18 | Very high quality |
| 85 | 23 | High quality, recommended |
| 75 | 28 | Balanced (default) |
| 50 | 35 | Smaller file, noticeable loss |
| 10 | 45 | Low quality, minimum size |
Start time in seconds. Used for trimming (with
eo) or thumbnail extraction (with an image f).so_5 · so_10.5End time in seconds. Must be used together with
so. The output duration is eo − so.so_5,eo_12 → 7-second clipThe end offset is exclusive:
so_5,eo_12 produces a clip from 5s to 12s (7 seconds).Output format. Defaults to
mp4 (H.264). When combined with so and without eo, extracts a single frame as an image.| Value | Use case |
|---|---|
mp4 | Re-encoded video (H.264) — default |
webp | Frame thumbnail |
jpeg / jpg | Frame thumbnail |
png | Frame thumbnail with transparency |
Video examples
- 720p HD
- Trim
- Thumbnail
- Mobile preview
Square social video
Square social video
Trim and resize
Trim and resize
High-quality presentation
High-quality presentation
Supported video formats
Input: MP4 (H.264/H.265), MOV, WebM (VP8/VP9) Output: MP4 (H.264) — standardized for maximum device and browser compatibilityResponse
Returns the binary content of the transformed file.| Header | Value |
|---|---|
Content-Type | Detected from output format (e.g. image/webp, video/mp4) |
Cache-Control | Set for browser caching |
200 success · 404 file not found · 500 processing error
Related
Authenticated Transform
Signed URLs for restricted transformations.
Upload Files
Upload files and pre-generate variants.
Intelligent Compression
How Openinary picks the optimal format automatically.