Skip to Content
Image

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

NameTypeDefaultDescription
qualitynumber (1–100)80Compression quality for lossy formats (jpeg, webp, avif, tiff, heic).
losslesstrue | falsefalseUse lossless compression (webp, avif, png).
effortnumber (1–10)5Compression effort — higher = smaller file, slower encode.
progressivetrue | falsefalseProgressive/interlaced encoding (jpeg, png).
stripMetadatatrue | falsetrueRemove EXIF, IPTC, XMP metadata from output.
chromaSubsampling4:2:0 | 4:4:44:2:0JPEG chroma subsampling mode.
colorsnumber (2–256)256PNG max palette colors for lossy quantization.
ditheringnumber (0–1)0.75PNG dithering level for lossy quantization.
maxWidthnumberMax width in pixels for optional downscale (preserves aspect ratio, no upscale).
maxHeightnumberMax 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.jpg

Accepted 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

NameTypeDefaultDescription
targetFormatpng | jpeg | webp | avif | tiff | gif | heic | heif | bmp | icowebpOutput image format.
qualitynumber (1–100)Output quality for lossy formats (jpeg, webp, avif, heic, heif).
widthnumberTarget width in pixels. Omit to auto-calculate from height.
heightnumberTarget height in pixels. Omit to auto-calculate from width.
fitcontain | cover | fill | inside | outsidecontainResize strategy when both width and height are specified.
backgroundstring#FFFFFFBackground hex color for alpha flattening.
flattentrue | falsefalseForce-flatten alpha channel to background color.
stripMetadatatrue | falsefalseRemove EXIF, ICC profile, and XMP data from output.
colorSpacesrgb | p3 | cmyk | labConvert color space. Omit to preserve source.
losslesstrue | falsefalseEncode lossless output (webp, avif, heic, heif).
pngCompressionLevelnumber (0–9)PNG zlib compression level (higher = smaller, slower).
jpegProgressivetrue | falsefalseEnable progressive JPEG encoding.
avifSpeednumber (0–9)AVIF encoding speed (lower = smaller file, slower).
tiffCompressionnone | lzw | deflate | jpeg | ccittfax4TIFF compression algorithm.
gifColorsnumber (2–256)GIF max palette size.
gifDithertrue | falsetrueApply 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.webp

Limits

  • 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

NameTypeDefaultDescription
widthnumberRequired* Target width in pixels. Omit to auto-calculate from height.
heightnumberRequired* Target height in pixels. Omit to auto-calculate from width.
scalenumberRequired* Scale multiplier (e.g. 0.5 = 50%, 2.0 = 200%). Mutually exclusive with width/height.
fitcontain | cover | fill | inside | outsidecontainResize strategy when both width and height are specified.
positioncenter | top | right-top | right | right-bottom | bottom | left-bottom | left | left-top | entropy | attentioncenterAnchor position for cover cropping. entropy and attention are smart crop strategies.
withoutEnlargementtrue | falsetruePrevent upscaling if source is smaller than target.
kernelnearest | cubic | mitchell | lanczos2 | lanczos3lanczos3Interpolation algorithm for resampling.
extendtrue | falsefalseAdd padding to reach exact dimensions (only with fit=contain).
extendBackgroundstring#FFFFFFHex color for padding when extend=true.
autoRotatetrue | falsetrueAuto-rotate based on EXIF orientation before resizing.
rotate0 | 90 | 180 | 270Explicit rotation in degrees. Applied after autoRotate.
stripMetadatatrue | falsefalseRemove EXIF, ICC profile, and XMP data from output.
qualitynumber (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.jpg

Limits

  • 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

NameTypeDefaultDescription
textstringRequired* Watermark text to render. Required if no watermarkFile.
fontSizenumber48Font size in pixels.
fontColorstringwhiteText color (CSS color: #RRGGBB, named, rgba(…)).
fontFamilysans-serif | serif | monospacesans-serifFont family.
fontWeightnormal | boldboldFont weight.
strokeColorstringText outline/stroke color (empty = no stroke).
strokeWidthnumber0Stroke width in pixels.
watermarkScalenumber (0.01–1.0)0.2Logo scale relative to image width.
opacitynumber (0–1)0.3Opacity.
positioncenter | top-left | top-right | bottom-left | bottom-right | top-center | bottom-centercenterPosition on the image (ignored when repeat=tile).
rotationnumber (-360–360)0Rotation angle in degrees.
repeatnone | tilenoneRepeat mode: single placement or tile across image.
tileSpacingnumber100Pixel spacing between tiled watermarks.
marginnumber20Margin from edges in pixels.
outputFormatauto | png | jpeg | webp | avif | tiff | gifautoOutput format (auto = preserve input format).
qualitynumber (1–100)90Output 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.jpg

Limits

  • Max file size: 100 MB
Last updated on