Image

Upload Image via Base64 Encoding

0calls
2 credits / call

When you need to process images on the frontend (such as after cropping or applying filters) and upload them directly without traditional forms, this endpoint comes in handy.

Interface Adjustment in Progress

This interface has been taken down due to policy reasons and will not be restored in the short term. Whether it will be restored later and the restoration time will be notified separately.

Overview

You just need to send the Base64 encoded string of the image, we will decode it, save it as an image file, and return a publicly accessible URL.

Usage Notes

Important

About imageData Format The imageData string you send must be in complete Base64 Data URI format, which needs to include MIME type information, such as data:image/png;base64,iVBORw0KGgo.... Missing the data:image/...;base64, prefix will cause decoding failure.

Request body

imageData
stringrequired

Base64 Data URI of the image, must include MIME type header. For example: data:image/png;base64,...

Response

200 / OK

Upload successful! Returns the access address of the image.

JSON

400 / Bad Request

Request failed. Possible reasons: request body is not valid JSON, missing imageData field, or imageData content is not a valid Base64 Data URI.

JSON

500 / Internal Server Error

Internal server error. An unknown error occurred while decoding or saving the image file. Please try again later.

JSON