Skip to content

Processing images

Depicta provides 20 server-side image processing operations. Each takes an input image and returns a processed result via signed URL.

Generative AI models are powerful at creating images, but they are not a replacement for traditional image processing. An AI model can generate a stunning product photo, but it can’t reliably crop it to exact pixel dimensions, convert it to WebP for your website, or strip unwanted metadata (with legal limits). Processing operations handle the precise, deterministic work that AI generation was never designed for.

Your AI assistant can chain generation and processing together — generate an image, remove the background, resize it to the exact dimensions needed, and convert to the right format — all in one workflow.

API pattern: POST /v1/process/{operation} with multipart form data (field name: image).

CLI pattern: depicta process {operation} <input> [options]


Adjust brightness, contrast, and saturation. Values range from -100 to 100.

Terminal window
depicta process adjust photo.png --brightness 20 --contrast 10 --saturation -15
ParameterTypeDescription
brightnessinteger-100 to 100 (default: 0)
contrastinteger-100 to 100 (default: 0)
saturationinteger-100 to 100 (default: 0)

Convert to grayscale.

Terminal window
depicta process grayscale photo.png

No additional parameters.

Invert pixel values (photographic negative effect).

Terminal window
depicta process invert photo.png

No additional parameters.


Extract a rectangular region.

Terminal window
depicta process crop photo.png --x 100 --y 50 --width 800 --height 600
ParameterTypeRequiredDescription
xintegeryesLeft offset in pixels
yintegeryesTop offset in pixels
widthintegeryesCrop width
heightintegeryesCrop height

Resize with aspect ratio preservation. Provide width, height, or both.

Terminal window
depicta process resize photo.png --width 512
ParameterTypeDescription
widthintegerTarget width (aspect ratio preserved if height omitted)
heightintegerTarget height (aspect ratio preserved if width omitted)

Rotate by an arbitrary angle. Areas outside the original bounds are filled with the background color.

Terminal window
depicta process rotate photo.png --angle 45
ParameterTypeRequiredDescription
anglenumberyesRotation angle in degrees

Mirror horizontally or vertically.

Terminal window
depicta process flip photo.png --direction horizontal
ParameterTypeRequiredDescription
directionstringyeshorizontal or vertical

Auto-trim uniform borders (e.g., white space around an image).

Terminal window
depicta process trim photo.png --tolerance 10
ParameterTypeDescription
toleranceintegerColor difference threshold (default: 0)

Add padding to reach a target size. The image is centered on the canvas.

Terminal window
depicta process pad icon.png --width 512 --height 512
ParameterTypeRequiredDescription
widthintegeryesTarget canvas width
heightintegeryesTarget canvas height

Remove the background, producing a transparent PNG.

Terminal window
depicta process remove-bg photo.png

No additional parameters. Output is always PNG (transparency).

Reduce chroma noise.

Terminal window
depicta process denoise photo.png --strength 50
ParameterTypeDescription
strengthintegerNoise reduction strength (default: 50)

Apply unsharp mask sharpening.

Terminal window
depicta process sharpen photo.png --amount 1.5 --threshold 0
ParameterTypeDescription
amountnumberSharpening strength (default: 1.0)
thresholdnumberEdge detection threshold (default: 0)

Apply Gaussian blur.

Terminal window
depicta process blur photo.png --radius 5
ParameterTypeRequiredDescription
radiusnumberyesBlur radius in pixels

Convert between image formats.

Terminal window
depicta process convert photo.png --format webp
ParameterTypeRequiredDescription
formatstringyespng, jpg, or webp

Reduce file size via color quantization without visible quality loss.

Terminal window
depicta process optimize screenshot.png --colors 256
ParameterTypeDescription
colorsintegerMax colors for quantization (default: 256)
min_psnrnumberMinimum quality threshold in dB

Strip EXIF and XMP metadata. C2PA Content Credentials are preserved — this operation only removes non-provenance metadata.

Terminal window
depicta process metadata-strip photo.jpg
ParameterTypeDescription
keep_iccbooleanPreserve ICC color profile (default: false)

Composite one image on top of another.

Terminal window
depicta process overlay background.png --overlay logo.png --x 20 --y 20 --opacity 0.8
ParameterTypeRequiredDescription
overlayfile/URLyesImage to overlay
xintegernoLeft offset (default: 0)
yintegernoTop offset (default: 0)
opacitynumberno0.0–1.0 (default: 1.0)

Replace transparency with a solid color.

Terminal window
depicta process alpha-to-color icon.png --color "#FFFFFF"
ParameterTypeDescription
colorstringHex color (default: #FFFFFF)

Make a specific color transparent.

Terminal window
depicta process color-to-alpha logo.png --color "#FFFFFF" --tolerance 30
ParameterTypeDescription
colorstringHex color to make transparent
toleranceintegerColor matching tolerance (default: 0)

Apply EXIF orientation metadata and strip the tag. Useful for photos from phones that appear rotated.

Terminal window
depicta process auto-orient photo.jpg

No additional parameters.