Skip to main content
This is the core Openinary endpoint. The first request processes and caches the result; subsequent requests are served from cache in ~50ms.

Endpoint

GET /t/{transformations}/{path}
Auth: Public (rate limited)

Path parameters

transformations
string
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_webp
path
string
required
Path to the file relative to the storage root, including the file extension.image.jpg · photos/portrait.png · videos/clip.mp4

Image parameters

Quick reference

ParamFull nameDescription
wwidthWidth in pixels
hheightHeight in pixels
ccropCrop/resize mode
araspect ratioCrop to a given ratio (W:H)
aangleRotation angle or auto
ggravityFocal point for cropping
bbackgroundBackground color (hex)
rround cornersRadius in pixels, per-corner list, or max
qqualityCompression level (1–100)
fformatOutput format

Parameter reference

w
integer
Width of the output image in pixels.w_800 · w_1920 · w_400
h
integer
Height of the output image in pixels.h_600 · h_1080 · h_400
c
string
default:"fill"
How the image is resized and cropped.
ValueBehavior
fillFill the area, cropping the overflow (default)
fitFit within dimensions, preserving aspect ratio
scaleStretch to exact dimensions (distorts if ratios differ)
cropResize and crop to exact dimensions
padFit and add background-colored borders
ar
string
Crop the image to a specific aspect ratio. Format: W:H.ar_16:9 · ar_1:1 · ar_4:3
a
string | number
Rotate the image. Use auto to rotate based on data, or a number (0–360) for a fixed angle.a_auto · a_90 · a_180
g
string
default:"center"
Focal point used when cropping.
ValueBehavior
centerCenter of the image (default)
northTop edge
southBottom edge
eastRight edge
westLeft edge
faceFace detection — keeps the detected face in frame
autoEntropy-based region of interest detection
b
string
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)
r
string
Rounds the corners of the image using an SVG alpha mask.
SyntaxBehavior
r_<int>Same radius on all four corners
r_v1:v2v1 = top-left & bottom-right, v2 = top-right & bottom-left
r_v1:v2:v3v1 = top-left, v2 = top-right & bottom-left, v3 = bottom-right
r_v1:v2:v3:v4Each corner individually: TL, TR, BR, BL (clockwise)
r_maxCircle (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.
q
integer
default:"85"
Compression quality from 1 (smallest file) to 100 (highest quality).
RangeTrade-off
90–100High quality, larger file
80–89Recommended sweet spot
60–79Smaller file, slight quality loss
1–59Aggressive compression, visible artifacts
f
string
Force a specific output format. When omitted, the best format is chosen automatically based on the browser’s Accept header.
ValueNotes
avifBest compression (up to 50% vs JPEG)
webpExcellent compatibility, ~30% vs JPEG
jpeg / jpgUniversal fallback
pngLossless, supports transparency

Image examples

GET /t/w_800,h_600/image.jpg
GET /t/ar_1:1,w_1080,g_face,q_85,f_webp/portrait.jpg
GET /t/w_400,h_300,c_pad,b_rgb:f5f5f5,q_80/thumbnail.jpg
Consistent dimensions with a light gray background on the borders.
GET /t/a_15,w_200,h_200/logo.png
GET /t/w_1920,h_1080,q_85,f_avif/landscape.jpg
GET /t/w_400,h_400,c_fill,r_max,f_png/avatar.jpg
Square crop then circular mask. Use f_png or f_webp to preserve the alpha channel, or add b_rgb:<hex> to fill corners with a solid color.
GET /t/w_600,h_400,c_fill,r_16,b_rgb:ffffff/photo.jpg
Uniform 16 px radius with white corners — safe to serve as JPEG on a white page.

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, PNG

Video parameters

Video processing is resource-intensive (5–30s per file). For high-traffic assets, prewarm transformed variants at upload time so the first request is served from cache.

Quick reference

ParamFull nameDescription
wwidthWidth in pixels
hheightHeight in pixels
ccropCrop/resize mode
qqualityCRF quality (1–100)
sostart offsetStart time in seconds
eoend offsetEnd time in seconds (trim)
fformatOutput format

Parameter reference

w
integer
Width of the output video in pixels.w_1920 (1080p) · w_1280 (720p) · w_640 (SD)
h
integer
Height of the output video in pixels.h_1080 · h_720 · h_480 · h_360
c
string
Resize/crop strategy.
ValueBehavior
fillScale and crop to fill the target dimensions
cropResize and crop to exact dimensions
q
integer
default:"75"
Video quality via encoding. Range: 1–100.
q valueCRFNotes
10018Very high quality
8523High quality, recommended
7528Balanced (default)
5035Smaller file, noticeable loss
1045Low quality, minimum size
so
number
Start time in seconds. Used for trimming (with eo) or thumbnail extraction (with an image f).so_5 · so_10.5
eo
number
End time in seconds. Must be used together with so. The output duration is eo − so.so_5,eo_12 → 7-second clip
The end offset is exclusive: so_5,eo_12 produces a clip from 5s to 12s (7 seconds).
f
string
Output format. Defaults to mp4 (H.264). When combined with so and without eo, extracts a single frame as an image.
ValueUse case
mp4Re-encoded video (H.264) — default
webpFrame thumbnail
jpeg / jpgFrame thumbnail
pngFrame thumbnail with transparency

Video examples

GET /t/w_1280,h_720,q_80/video.mp4
GET /t/w_1080,h_1080,q_85/social.mp4
GET /t/w_400,h_300,so_5,eo_12/video.mp4
7-second clip (5s → 12s) resized to 400×300.
GET /t/w_1920,h_1080,q_95/presentation.mp4

Supported video formats

Input: MP4 (H.264/H.265), MOV, WebM (VP8/VP9) Output: MP4 (H.264) — standardized for maximum device and browser compatibility

Response

Returns the binary content of the transformed file.
HeaderValue
Content-TypeDetected from output format (e.g. image/webp, video/mp4)
Cache-ControlSet for browser caching
Status codes: 200 success · 404 file not found · 500 processing error

Authenticated Transform

Signed URLs for restricted transformations.

Upload Files

Upload files and pre-generate variants.

Intelligent Compression

How Openinary picks the optimal format automatically.