convert_format · 1 credit · 6 output formats

Six formats. One field. One credit.

Somebody sends a TIFF. The CMS wants WebP. The partner integration insists on JPEG. Format conversion is the least interesting problem in an image pipeline and the one most likely to stop it — so it is a single call here, not a build step.

PNGJPGWEBPGIFTIFFAVIFany of them

What each format is actually for

Converting is easy. Converting to the right thing is the part that saves you a second pass later — usually after someone notices the transparency is gone.

FormatAlphaAnimationReach for it when…
WebPYesYesThe default answer for photographs and illustration on the web.
AVIFYesYesSmallest files of the group; slower to encode, and worth it for large heroes.
PNGYesNoLossless. Cutouts, screenshots, UI assets, anything with hard edges and flat colour.
JPEGNoNoMaximum compatibility. Photography destined for systems that predate WebP.
GIF1-bitYesLegacy animation and places that still refuse anything else.
TIFFYesNoPrint and archival hand-offs. Never serve it to a browser.

The one conversion that does not exist

You cannot convert a photo into an SVG

It is the most common request this endpoint refuses, and the refusal is deliberate. A raster image is a grid of coloured pixels. An SVG is a list of shapes. There is no lossless path from the first to the second, and the tracing tools that pretend otherwise return thousands of overlapping polygons — bigger than the original, impossible to edit, and ugly at any size.

If you need a real vector, generate it as one. Describe the mark in words and get path data back for 5 credits.

Generate an actual SVG
png → webp
tiff → jpeg
jpg → avif
jpg → svg

Two fields, both required

The source image and the target format. That is the whole API. There is no quality dial here on purpose — when you care about size rather than container, the right call is compress_image.

💡 Converting a whole folder

Conversions are independent of each other, so they are a perfect fit for multicall. Fifty images convert in parallel for fifty credits and one round trip.

request
curl -X POST \
  "https://api.imagemcpserver.com/playground/convert-format" \
  -H "Authorization: Bearer $IMAGEMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://cdn.example.com/scan.tiff",
    "targetFormat": "webp"
  }'

Format conversion questions

Which formats are supported?

Input can be any common raster image. Output can be PNG, JPEG/JPG, WebP, GIF, TIFF or AVIF. The converted file is re-encoded server-side and returned as a hosted https URL.

Can I convert a photo to SVG?

No, and no honest tool can. SVG describes shapes with paths; a photograph is a grid of pixels with no paths to recover. Auto-tracing produces thousands of meaningless polygons that are larger than the original and impossible to edit. If you need vector artwork, generate it as vector with text_to_svg.

Does converting change file size?

Usually yes, because the encoders differ enormously. Moving a PNG photograph to WebP or AVIF typically shrinks it a lot. If size is the goal rather than the container, compress_image gives you an explicit quality dial as well.

What happens to transparency?

PNG, WebP and AVIF all carry an alpha channel, so transparency survives. JPEG has no alpha at all — converting a cutout to JPEG flattens it onto a solid background. GIF supports only single-bit transparency, so soft edges become jagged.

How much does a conversion cost?

One credit per call, flat, regardless of source or target format. Like compression, it runs on our own infrastructure rather than a model provider.

Keep reading