---
title: "Convert an image to another format"
method: POST
path: "/image/convert"
tags: ["Image"]
---

# Convert an image to another format

`POST /image/convert`

## Request

- Base URL: `https://abundanceapis.com`
- URL: `https://abundanceapis.com/image/convert`
- Auth: none declared

Convert between JPEG, PNG, WebP, and AVIF. Returns the image bytes (default) or JSON with base64.

## Request body

- object
  - `url` string: Public image URL
  - `base64` string: Base64-encoded image (data URI ok)
  - `output` 'binary' | 'base64': Return the image bytes or JSON with base64
  - `format` 'jpeg' | 'png' | 'webp' | 'avif', required: Output format (default: keep input)
  - `quality` integer: Output quality (lossy formats)

## Other responses

- `400`: Bad request
- `502`: Could not load the image

---

[API](https://skmtc.dev/abundanceapis/apis/web-toolbox.md) · [All operations](https://skmtc.dev/abundanceapis/apis/web-toolbox/llms.txt) · [OpenAPI document](https://skmtc.dev/abundanceapis/apis/web-toolbox/revisions/ada2893fef43?raw)
