Upload, process and deliver images through global CDN network. Smart compression, instant resizing, and fast delivery for modern applications.
Powerful features to handle all your image hosting needs
Upload via file or URL. Support for all major image formats.
Intelligent compression that reduces size without visible quality loss.
Resize images on-the-fly with customizable width and height.
Deliver images from worldwide.
Start free and scale as you grow. No hidden fees.
Everything you need to integrate Image CDN API
All API requests require authentication using your client_id and API key. The client_id is sent in the request body, while the API key is sent via the X-API-Key header.
| Parameter | Type | Description |
|---|---|---|
| client_idRequired | Integer | Your unique client identifier |
| X-API-KeyHeader | String | Your API key (send in request headers) |
| imageRequired* | File | Image file to upload (multipart/form-data) |
| image_urlRequired* | String | URL of image to fetch and process |
| durationOptional | Integer | Storage duration in hours (default: 2). Max depends on plan. |
| widthOptional | Integer | Target width in pixels for resizing |
| heightOptional | Integer | Target height in pixels for resizing |
| qualityOptional | Integer | Compression quality 1-100 (default: 90) |
* Either image file or image_url is required, not both.
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "client_id=12345" \
-F "image=@/path/to/image.jpg"
const formData = new FormData();
formData.append('client_id', '12345');
formData.append('image', fileInput.files[0]);
const response = await fetch('https://api.corenexis.com/image-cdn/v3', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key'
},
body: formData
});
const data = await response.json();
console.log(data.data.url);
import requests
url = "https://api.corenexis.com/image-cdn/v3"
headers = {"X-API-Key": "your_api_key"}
files = {"image": open("image.jpg", "rb")}
data = {"client_id": "12345"}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(result["data"]["url"])
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.corenexis.com/image-cdn/v3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: your_api_key"],
CURLOPT_POSTFIELDS => [
"client_id" => "12345",
"image" => new CURLFile("/path/to/image.jpg")
]
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo $data["data"]["url"];
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "client_id=12345" \
-F "image=@/path/to/image.jpg" \
-F "duration=168" \
-F "width=1200" \
-F "height=800" \
-F "quality=80"
const formData = new FormData();
formData.append('client_id', '12345');
formData.append('image', fileInput.files[0]);
formData.append('duration', '168'); // 7 days
formData.append('width', '1200');
formData.append('height', '800');
formData.append('quality', '80');
const response = await fetch('https://api.corenexis.com/image-cdn/v3', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key'
},
body: formData
});
const data = await response.json();
if (data.success) {
console.log('URL:', data.data.url);
console.log('Dimension:', data.data.dimension);
console.log('Expires:', data.data.expiry);
}
import requests
url = "https://api.corenexis.com/image-cdn/v3"
headers = {"X-API-Key": "your_api_key"}
files = {"image": open("image.jpg", "rb")}
data = {
"client_id": "12345",
"duration": "168", # 7 days
"width": "1200",
"height": "800",
"quality": "80"
}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
if result["success"]:
print(f"URL: {result['data']['url']}")
print(f"Dimension: {result['data']['dimension']}")
print(f"Expires: {result['data']['expiry']}")
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.corenexis.com/image-cdn/v3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: your_api_key"],
CURLOPT_POSTFIELDS => [
"client_id" => "12345",
"image" => new CURLFile("/path/to/image.jpg"),
"duration" => "168", // 7 days
"width" => "1200",
"height" => "800",
"quality" => "80"
]
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
if ($data["success"]) {
echo "URL: " . $data["data"]["url"] . "\n";
echo "Dimension: " . $data["data"]["dimension"] . "\n";
echo "Expires: " . $data["data"]["expiry"] . "\n";
}
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "client_id=12345" \
-F "image_url=https://example.com/photo.jpg" \
-F "duration=24" \
-F "quality=85"
const formData = new FormData();
formData.append('client_id', '12345');
formData.append('image_url', 'https://example.com/photo.jpg');
formData.append('duration', '24');
formData.append('quality', '85');
const response = await fetch('https://api.corenexis.com/image-cdn/v3', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key'
},
body: formData
});
const data = await response.json();
console.log(data);
{
"success": true,
"message": "Image uploaded successfully",
"api_version": "V1",
"timestamp": "2025-01-15T10:30:00+00:00",
"data": {
"url": "https://cdn.corenexis.com/media/abc123.jpg",
"expiry": "2025-01-22T10:30:00+00:00",
"plan": "pro",
"dimension": "1200x800",
"compression_applied": true,
"compression_level": 80,
"width_apply": true,
"height_apply": true
},
"usage": {
"count": 150,
"monthly_limit": 5000,
"reset_date": "2025-02-01T00:00:00+00:00"
}
}
| Field | Description |
|---|---|
| url | Direct CDN URL to access the uploaded image |
| expiry | ISO 8601 timestamp when the image will be deleted |
| dimension | Final image dimensions (width x height) |
| compression_applied | Whether compression was applied to the image |
| compression_level | Quality level used (0 if no compression) |
| width_apply | Whether width resizing was applied |
| height_apply | Whether height resizing was applied |
| HTTP | Error | Description |
|---|---|---|
| 400 | client_id not found | Missing client_id in request body |
| 400 | api_key not found | Missing X-API-Key header |
| 401 | api_key invalid | API key doesn't match client_id |
| 403 | api_not_subscribed | Image CDN API not enabled for account |
| 403 | account_status: suspended | Account is suspended or inactive |
| 429 | rate limit exceeded | Too many requests per minute |
| 429 | upload limit reached | Monthly upload quota exceeded |
{
"success": false,
"error": "api_key invalid",
"api_version": "V1",
"timestamp": "2025-01-15T10:30:00+00:00"
}
Create your free account and start uploading images in minutes. No credit card required.