Skip to navigation

Media · Image · Convert an image between formats (JPG/PNG/WebP/GIF/…)

View as Markdown

Convert an image from one container format to another (jpg, jpeg, png, webp, gif, bmp, tiff). Pass the source image_url and the target output_format. This changes the file format ONLY — for pixel-level edits (background removal, upscale, inpaint) use the other image tools in this module. Async — returns a task_id (auto-polled).

Authentication

AuthorizationApi-Key

Header authentication of the form Api-Key <token>

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
output_formatenumRequired
Target image format.
image_urlstringOptionalformat: "uri"
URL of the image to convert.

Response

Async task queued.
task_idstringOptional

Poll GET /api/v1/tasks/{task_id} until SUCCESS or FAILURE.