API 参考Endpoints
Compress or resize an image
Accepts an image URL or a data-URL/Base64 encoded local image. Charges one imageCompress operation and refunds it if processing fails.
Accepts an image URL or a data-URL/Base64 encoded local image. Charges one imageCompress operation and refunds it if processing fails.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/image/compress" \ -H "Content-Type: application/json" \ -d '{}'{ "code": 1000, "data": { "originalUrl": "string", "compressedUrl": "http://example.com", "originalSize": 0, "compressedSize": 0, "format": "string", "quality": 0, "width": 0, "height": 0, "base64": "string" }}{ "code": 0, "message": "string"}{ "code": 0, "message": "string"}