Image
Endpoints for compressing, converting, resizing, and watermarking images.
Compress
$0.012per request
POST /image/compress
Reduce image file size using format-native compression. Control quality, effort, progressive encoding, and optional downscaling.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
quality | number (1–100) | 80 | Compression quality for lossy formats (jpeg, webp, avif, tiff, heic). |
lossless | true | false | false | Use lossless compression (webp, avif, png). |
effort | number (1–10) | 5 | Compression effort — higher = smaller file, slower encode. |
progressive | true | false | false | Progressive/interlaced encoding (jpeg, png). |
stripMetadata | true | false | true | Remove EXIF, IPTC, XMP metadata from output. |
chromaSubsampling | 4:2:0 | 4:4:4 | 4:2:0 | JPEG chroma subsampling mode. |
colors | number (2–256) | 256 | PNG max palette colors for lossy quantization. |
dithering | number (0–1) | 0.75 | PNG dithering level for lossy quantization. |
maxWidth | number | — | Max width in pixels for optional downscale (preserves aspect ratio, no upscale). |
maxHeight | number | — | Max height in pixels for optional downscale (preserves aspect ratio, no upscale). |
Example
tempo request -X POST https://api.fylor.com/image/compress \
-F "file=@photo.jpg" \
-F "quality=75" \
-F "stripMetadata=true" \
-o compressed.jpgAccepted file types
jpeg, png, webp, avif, gif, tiff, heic, heif
Limits
- Max file size: 100 MB
Convert
$0.012per request
POST /image/convert
Convert between image formats with optional resizing, color space conversion, and format-specific encoding options.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
targetFormat | png | jpeg | webp | avif | tiff | gif | heic | heif | bmp | ico | webp | Output image format. |
quality | number (1–100) | — | Output quality for lossy formats (jpeg, webp, avif, heic, heif). |
width | number | — | Target width in pixels. Omit to auto-calculate from height. |
height | number | — | Target height in pixels. Omit to auto-calculate from width. |
fit | contain | cover | fill | inside | outside | contain | Resize strategy when both width and height are specified. |
background | string | #FFFFFF | Background hex color for alpha flattening. |
flatten | true | false | false | Force-flatten alpha channel to background color. |
stripMetadata | true | false | false | Remove EXIF, ICC profile, and XMP data from output. |
colorSpace | srgb | p3 | cmyk | lab | — | Convert color space. Omit to preserve source. |
lossless | true | false | false | Encode lossless output (webp, avif, heic, heif). |
pngCompressionLevel | number (0–9) | — | PNG zlib compression level (higher = smaller, slower). |
jpegProgressive | true | false | false | Enable progressive JPEG encoding. |
avifSpeed | number (0–9) | — | AVIF encoding speed (lower = smaller file, slower). |
tiffCompression | none | lzw | deflate | jpeg | ccittfax4 | — | TIFF compression algorithm. |
gifColors | number (2–256) | — | GIF max palette size. |
gifDither | true | false | true | Apply Floyd-Steinberg dithering for GIF palette reduction. |
Example
tempo request -X POST https://api.fylor.com/image/convert \
-F "file=@photo.png" \
-F "targetFormat=webp" \
-F "quality=85" \
-o photo.webpLimits
- Max file size: 100 MB
Resize
$0.012per request
POST /image/resize
Resize images with intelligent cropping, scaling, and rotation options.
Required: At least one of width, height, or scale must be provided.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
width | number | — | Required* Target width in pixels. Omit to auto-calculate from height. |
height | number | — | Required* Target height in pixels. Omit to auto-calculate from width. |
scale | number | — | Required* Scale multiplier (e.g. 0.5 = 50%, 2.0 = 200%). Mutually exclusive with width/height. |
fit | contain | cover | fill | inside | outside | contain | Resize strategy when both width and height are specified. |
position | center | top | right-top | right | right-bottom | bottom | left-bottom | left | left-top | entropy | attention | center | Anchor position for cover cropping. entropy and attention are smart crop strategies. |
withoutEnlargement | true | false | true | Prevent upscaling if source is smaller than target. |
kernel | nearest | cubic | mitchell | lanczos2 | lanczos3 | lanczos3 | Interpolation algorithm for resampling. |
extend | true | false | false | Add padding to reach exact dimensions (only with fit=contain). |
extendBackground | string | #FFFFFF | Hex color for padding when extend=true. |
autoRotate | true | false | true | Auto-rotate based on EXIF orientation before resizing. |
rotate | 0 | 90 | 180 | 270 | — | Explicit rotation in degrees. Applied after autoRotate. |
stripMetadata | true | false | false | Remove EXIF, ICC profile, and XMP data from output. |
quality | number (1–100) | — | Re-encoding quality for lossy formats (jpeg, webp, avif, heic, heif). |
Example
tempo request -X POST https://api.fylor.com/image/resize \
-F "file=@photo.jpg" \
-F "width=800" \
-F "fit=cover" \
-F "position=attention" \
-o resized.jpgLimits
- Max file size: 100 MB
Watermark Add
$0.012per request
POST /image/watermark/add
Add text or logo watermarks with positioning, tiling, opacity, and font control.
Required: At least one of text or watermarkFile must be provided.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
text | string | — | Required* Watermark text to render. Required if no watermarkFile. |
fontSize | number | 48 | Font size in pixels. |
fontColor | string | white | Text color (CSS color: #RRGGBB, named, rgba(…)). |
fontFamily | sans-serif | serif | monospace | sans-serif | Font family. |
fontWeight | normal | bold | bold | Font weight. |
strokeColor | string | — | Text outline/stroke color (empty = no stroke). |
strokeWidth | number | 0 | Stroke width in pixels. |
watermarkScale | number (0.01–1.0) | 0.2 | Logo scale relative to image width. |
opacity | number (0–1) | 0.3 | Opacity. |
position | center | top-left | top-right | bottom-left | bottom-right | top-center | bottom-center | center | Position on the image (ignored when repeat=tile). |
rotation | number (-360–360) | 0 | Rotation angle in degrees. |
repeat | none | tile | none | Repeat mode: single placement or tile across image. |
tileSpacing | number | 100 | Pixel spacing between tiled watermarks. |
margin | number | 20 | Margin from edges in pixels. |
outputFormat | auto | png | jpeg | webp | avif | tiff | gif | auto | Output format (auto = preserve input format). |
quality | number (1–100) | 90 | Output quality (JPEG/WebP/AVIF). |
Example
tempo request -X POST https://api.fylor.com/image/watermark/add \
-F "file=@photo.jpg" \
-F "text=SAMPLE" \
-F "opacity=0.3" \
-F "position=center" \
-F "fontSize=64" \
-o watermarked.jpgLimits
- Max file size: 100 MB
Last updated on