Skip to content
Local Cloud

Convert / compress

Convert and compress images

Switch between PNG, JPEG and WebP, set the quality, or ask for a maximum file size.

$0.001

per run in the cloud

$0

on your own machine

Target file size

Ask for under 200 KB and the quality is picked for you.

Transparency handled

Pick the background color when a format has no alpha.

Private

Runs on your computer, no upload.

Reference

Inputs and parameters

The same on every surface: the desktop app, Claude through MCP and the API. Unknown parameters are refused, so a typo never runs with a default.

Inputs

NameTypeLimitsNotes
image requiredimage30 MB, 40 MPSource image

Parameters

NameTypeDefaultAcceptedNotes
formatenumwebppng, jpeg, webp
qualityint851 to 100JPEG/WebP quality.
losslessboolfalsetrue, falseWebP lossless.
max_kbint·10 to 50000Lower the quality until the file fits (JPEG/WebP).
backgroundstring#ffffff^#[0-9a-fA-F]{6}$Fill for transparent pixels when the format has no alpha (JPEG).

Outputs

  • imageimage

API

Run Convert / compress from the API

curl https://imference.com/tools/convert \
  -H "Authorization: Bearer $IMFERENCE_API_KEY" \
  -F image=@image.png

Files go in multipart fields named after the inputs; JSON works too, with {"inputs": {...}, "params": {...}} and https URLs or base64 data: URIs. The answer is a request_id: poll GET /status?request_id=... until it returns the outputs. Pay per call from a wallet instead at POST /ondemand/tools/convert. A run that fails is refunded to your credits. Details in the reference.

Specs

The details

Price
$0.001 · 1 credit
Runs
Local and cloud
License
No model weights
Tool id
convert 1.0.0
MCP tool
convert

More tools

Often used with it

All tools

Try Convert / compress tonight