Image API Reference
This page is generated from the same API catalog used by the Skymage processing service.
Request URLs
Public origin:
text
https://{handle}.skymage.net/v1/{origin-host}/{path}?{parameters}Configured external storage:
text
https://{handle}.skymage.net/v1/ex/{storage-handle}/{path}?{parameters}Sizing
| Parameter | Description | Type and limits | Example |
|---|---|---|---|
w | Resize the image to this width in pixels. | integer: 1 to 10000 | w=800 |
h | Resize the image to this height in pixels. | integer: 1 to 10000 | h=600 |
dpr | Multiply the requested dimensions for high-density displays. | number: 0.1 to 8 | dpr=2 |
fit | Control how the image fits the requested width and height. | string: clip, cover, contain, fill, scale-down, crop, inside | fit=clip |
Output
| Parameter | Description | Type and limits | Example |
|---|---|---|---|
q | Output quality for JPEG, WebP, and AVIF. | integer: 1 to 100 | q=82 |
f | Convert the result to a supported output format. | string: auto, jpg, jpeg, png, webp, avif | f=auto |
Crop
| Parameter | Description | Type and limits | Example |
|---|---|---|---|
crop | Crop width,height,x,y after resizing. | string | crop=500,300,0,100 |
p | Choose a preset, smart crop, or crop-X-Y focal point used by cover or crop. | string: top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right, entropy, attention, crop-X-Y | p=center |
trim | Trim a uniform border using this sensitivity. | integer: 1 to 254 | trim=10 |
Orientation
| Parameter | Description | Type and limits | Example |
|---|---|---|---|
or | Rotate clockwise by a multiple of 90 degrees. | integer: 0, 90, 180, 270 | or=0 |
flip | Flip horizontally, vertically, or in both directions. | string: h, v, hv | flip=h |
Effects
| Parameter | Description | Type and limits | Example |
|---|---|---|---|
blur | Apply Gaussian blur using this sigma value. | number: 0.3 to 1000 | blur=5 |
sharp | Sharpen the image using an intensity from 0 to 10. | number: 0 to 10 | sharp=4 |
bri | Adjust brightness from -100 to 100. | integer: -100 to 100 | bri=15 |
con | Adjust contrast from -100 to 100. | integer: -100 to 100 | con=15 |
gam | Apply gamma correction from 1.0 to 3.0. | number: 1 to 3 | gam=2.2 |
filter | Apply a color filter. | string: grayscale, sepia, negate | filter=grayscale |
Composition
| Parameter | Description | Type and limits | Example |
|---|---|---|---|
bg | Flatten transparency against a CSS color, hex color, or transparent. | string | bg=ffffff |
t | Place the transformed image on a transparent canvas. | string: letterbox | t=letterbox |
shape | Mask the image to a supported shape. | string: circle, ellipse, hexagon, pentagon, pentagon-180, square, star, heart, triangle, triangle-180 | shape=circle |
strim | Trim transparent pixels around non-ellipse shape masks. | boolean | strim=true |
watermark | Add a text watermark to the bottom-right corner. | string | watermark=example.com |
Examples
text
https://demo.skymage.net/v1/daudau.cc/images/crab.png?w=800&f=webp&q=82
https://demo.skymage.net/v1/daudau.cc/images/crab.png?w=480&h=480&fit=cover&f=avif&q=80
https://demo.skymage.net/v1/daudau.cc/images/crab.png?w=700&h=500&fit=crop&p=attention