A powerful image compression API designed for developers and businesses. Optimize images, reduce bandwidth usage, and deliver faster websites.
Get your API key and compress your first image:
1. Create an account and generate your API key
2. Send a POST request
curl -X POST https://pixelflow.veen.africa/api/v1/compress \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@/path/to/image.jpg" \
-F "quality=60"
3. Receive optimized WebP image with download URL
Base URL:
https://pixelflow.veen.africa/api/v1
/compress
Uploads an image, compresses it, and converts it to WebP format. Supported formats: JPG, JPEG, PNG. Maximum file size: 20MB.
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer API key |
{
"image": "file",
"quality": 60
}
image — Image file (JPG, JPEG, PNG)
quality — Compression quality from 1–100. Default: 60
{
"success": true,
"data": {
"file_id": "f8a7c9e2d5b4a1c3d6e7",
"download_url": "https://pixelflow.veen.africa/api/download/f8a7c9e2d5b4a1c3d6e7",
"preview_url": "https://pixelflow.veen.africa/api/preview/f8a7c9e2d5b4a1c3d6e7",
"filename": "image.webp",
"stats": {
"original_size": 2457600,
"compressed_size": 512000,
"savings_percentage": 78.4,
"format": "webp",
"quality": 60
}
}
}
Below are examples showing how to use the PixelFlow API with PHP and Python. Replace YOUR_API_KEY with your actual API key.
<?php
$apiKey = "YOUR_API_KEY";
$url = "https://pixelflow.veen.africa/api/v1/compress";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $apiKey"
],
CURLOPT_POSTFIELDS => [
"image" => new CURLFile("image.jpg"),
"quality" => 60,
"api_key" => $apiKey
]
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
?>
import requests
api_key = "YOUR_API_KEY"
url = "https://pixelflow.veen.africa/api/v1/compress"
files = {
"image": open("image.jpg", "rb")
}
data = {
"quality": 60,
"api_key": api_key
}
headers = {
"Authorization": f"Bearer {api_key}"
}
response = requests.post(
url,
headers=headers,
files=files,
data=data
)
print(response.json())