Compress Image
POST
https://picnie.com/api/v1/compress-imageCompress images without losing quality, specifying quality level and output format.
Headers
| Name | Type | Description |
|---|---|---|
Authorization* | string | Pass api key in the authorization field Example: |
Body Parameters
| Name | Type | Description |
|---|---|---|
project_id* | integer | The ID of the project. Create one using Picnie's dashboard if needed. Example: |
image_url* | string | URL of the image to compress. Example: |
image_quality* | string | Quality level between 55 (lowest) and 70 (maximum). Example: |
image_output_format* | string | Output format. Values: original, jpg, png, webp. Default: original. Example: |
Notes
⚠️ Authentication required
curl -X POST "https://picnie.com/api/v1/compress-image"
-H "Authorization: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"project_id": 1,
"image_url": "https://picnie.com/data/raw_images/demo_bg1.jpg",
"image_quality": "65",
"image_output_format": "original"
}'Responses
200200 OK
{
"error": false,
"message": "Success",
"url": "https://picnie.com/v1/data/cmp_5153_20230217110649.jpg"
}