Convert an image
Convert an image to png, jpg, webp, or gif. Synchronous — the converted
file’s download URL is in the response (no job to poll).
Pricing: 2 credits per conversion, charged only on success. Estimate via
POST /v1/cost with
{"model": "convert-image"}.
file accepts a public URL (up to 30 MB), an uploaded-file URL from
POST /v1/uploads, a data URI, or raw
base64. Input limit 20 MB. Results are stored privately and deleted after 7 days.
Authorizations
API key as a bearer token: Authorization: Bearer bpx_live_xxx
Body
Response
Converted. Download from url (valid several hours; file kept 7 days).
A completed format conversion. Download from url.
"image/webp"
Credits charged for this conversion (2 image / 10 video / 3 audio).
Suggested download filename.
"photo.webp"
"7 days"
Converted file size in bytes.
Signed download URL for the converted file (valid several hours; the file itself is kept 7 days).