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 including Google Drive links.
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 API key. Send the API key via the X-API-Key header with every request.
| Parameter | Type | Description |
|---|---|---|
| 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. Supports direct URLs and Google Drive public links. |
| image_base64Required* | String | The image itself, base64 encoded. A data:image/png;base64, prefix is accepted and stripped, and whitespace or line breaks inside the value are ignored. Use this when the file is local and a multipart upload is not possible — an AI agent calling through MCP, for example. Aliases: imageBase64, base64, image_data. |
| durationOptional | Integer | Storage duration in hours (default: 2). Max depends on plan. Decimal values are rounded up (e.g. 2.5 → 3 hours). |
| widthOptional | Integer | Target width in pixels for resizing |
| heightOptional | Integer | Target height in pixels for resizing |
| qualityOptional | Integer | Compression quality 40-100 (default: 90). Values below 40 are auto-adjusted to 40. |
* Exactly one of image, image_url or image_base64 is required. If more than one arrives, the uploaded file is used first, then base64, then the URL.
Content-Type: application/json. JSON is the practical route
for image_url and image_base64, since neither needs
a file part.curl -X POST "https://api.corenexis.com/image-cdn/v3" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"image_base64": "iVBORw0KGgoAAAANSUhEUg...", "width": 800}'https://drive.google.com/uc?export=download&id=YOUR_FILE_IDcurl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image=@/path/to/image.jpg"
const formData = new FormData();
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")}
response = requests.post(url, headers=headers, files=files)
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 => [
"image" => new CURLFile("/path/to/image.jpg")
]
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo $data["data"]["url"];
# Upload with resize, compression and 7-day storage
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image=@/path/to/photo.jpg" \
-F "duration=168" \
-F "width=1200" \
-F "height=800" \
-F "quality=80"
const formData = new FormData();
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("photo.jpg", "rb")}
data = {
"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 => [
"image" => new CURLFile("/path/to/photo.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";
}
# Upload from any public image URL
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image_url=https://example.com/photo.jpg" \
-F "duration=24" \
-F "quality=85"
const formData = new FormData();
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);
import requests
url = "https://api.corenexis.com/image-cdn/v3"
headers = {"X-API-Key": "your_api_key"}
data = {
"image_url": "https://example.com/photo.jpg",
"duration": "24",
"quality": "85"
}
response = requests.post(url, headers=headers, data=data)
result = response.json()
print(result["data"]["url"])
# Upload directly from Google Drive (public link required)
# File sharing must be set to "Anyone with the link"
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image_url=https://drive.google.com/uc?export=download&id=1cKgiFhMRb-ZLrnprw_dJBxiubw" \
-F "duration=48" \
-F "width=1920" \
-F "quality=90"
// Upload image directly from Google Drive
// Make sure the file is shared as "Anyone with the link"
const driveFileId = '1cKgiFhMRb-ZLrnprw_dJBxiubw';
const driveUrl = `https://drive.google.com/uc?export=download&id=${driveFileId}`;
const formData = new FormData();
formData.append('image_url', driveUrl);
formData.append('duration', '48');
formData.append('width', '1920');
formData.append('quality', '90');
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('CDN URL:', data.data.url);
} else {
console.error('Error:', data.error);
}
import requests
url = "https://api.corenexis.com/image-cdn/v3"
headers = {"X-API-Key": "your_api_key"}
# Google Drive file must be shared as "Anyone with the link"
drive_file_id = "1cKgiFhMRb-ZLrnprw_dJBxiubw"
drive_url = f"https://drive.google.com/uc?export=download&id={drive_file_id}"
data = {
"image_url": drive_url,
"duration": "48",
"width": "1920",
"quality": "90"
}
response = requests.post(url, headers=headers, data=data)
result = response.json()
if result["success"]:
print(f"CDN URL: {result['data']['url']}")
else:
print(f"Error: {result['error']}")
https://drive.google.com/uc?export=download&id=FILE_ID
# Resize image to 800px width (height auto-calculated)
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image=@/path/to/banner.png" \
-F "width=800"
# Compress image to 60% quality for smaller file size
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image=@/path/to/photo.jpg" \
-F "quality=60"
# Upload with 2 hour storage (temporary sharing)
curl -X POST https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
-F "image=@/path/to/screenshot.png" \
-F "duration=2"
# Using GET method with image_url
curl -G https://api.corenexis.com/image-cdn/v3 \
-H "X-API-Key: your_api_key" \
--data-urlencode "image_url=https://example.com/photo.jpg" \
-d "duration=24" \
-d "quality=85"
{
"success": true,
"plan": "pro",
"data": {
"url": "https://cdn.corenexis.com/i/abc123.webp",
"expiry": "2025-01-22T10:30:00+00:00",
"dimension": "1200x800",
"compression_applied": true,
"compression_level": 80,
"width_apply": true,
"height_apply": true
},
"usage": {
"remaining": 4850,
"rate_limit": 30,
"monthly_limit": 5000
}
}
| Field | Description |
|---|---|
| success | Boolean indicating if the request was successful |
| plan | Your current subscription plan |
| data.url | Direct CDN URL to access the uploaded image |
| data.expiry | ISO 8601 timestamp when the image will be deleted |
| data.dimension | Final image dimensions (width x height) |
| data.compression_applied | Whether compression was applied to the image |
| data.compression_level | Quality level used (null if no compression) |
| data.width_apply | Whether width resizing was applied |
| data.height_apply | Whether height resizing was applied |
| usage.remaining | Remaining uploads for this billing period |
| usage.rate_limit | Maximum uploads allowed per minute |
| usage.monthly_limit | Maximum uploads allowed per month |
| HTTP | Code | Description |
|---|---|---|
| 400 | Bad Request | Missing required parameter, invalid image URL, or invalid file type |
| 400 | File Size Exceeded | Uploaded file exceeds your plan's maximum file size limit |
| 400 | Duration Exceeded | Requested storage duration exceeds your plan's maximum allowed hours |
| 401 | INVALID_KEY | API key is invalid, expired, or not found |
| 401 | Missing API Key | X-API-Key header is not present in the request |
| 402 | NO_SUBSCRIPTION | Image CDN API is not enabled for your account. Subscribe to a plan first. |
| 402 | SUBSCRIPTION_EXPIRED | Your subscription has expired. Please renew to continue. |
| 402 | SUBSCRIPTION_CANCELLED | Your subscription has been cancelled and the access period has ended. |
| 403 | KEY_DISABLED | Your API key has been disabled. Generate a new key from the dashboard. |
| 403 | ACCOUNT_SUSPENDED | Your account has been suspended. Contact support for assistance. |
| 403 | EMAIL_NOT_VERIFIED | Verify your email address before using the API. |
| 405 | Method Not Allowed | Only GET and POST methods are accepted |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests per minute. Wait and try again. |
| 429 | QUOTA_EXCEEDED | Monthly upload quota has been reached. Upgrade your plan for more uploads. |
| 500 | Server Error | Internal server or CDN processing error. Try again later. |
// 401 — Invalid API Key
{
"success": false,
"code": "INVALID_KEY",
"message": "The provided API key is invalid or has been revoked."
}
// 429 — Monthly Quota Exceeded
{
"success": false,
"code": "QUOTA_EXCEEDED",
"message": "Monthly upload quota exceeded. Upgrade your plan for more uploads."
}
// 429 — Rate Limit Exceeded
{
"success": false,
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please wait before making another request."
}
// 400 — File Size Exceeds Plan Limit
{
"success": false,
"error": "File size (15.30MB) exceeds your plan limit (12.00MB). Please reduce file size or upgrade your plan."
}
Create your free account and start uploading images in minutes. No credit card required.