API V3 — Production Ready

Image CDN API

Upload, process and deliver images through global CDN network. Smart compression, instant resizing, and fast delivery for modern applications.

99.9%
Uptime SLA
499ms
Avg Response
Auto
Image Optimization
1M+
Images Served

Everything You Need

Powerful features to handle all your image hosting needs

Flexible Upload

Upload via file or URL. Support for all major image formats.

Smart Compression

Intelligent compression that reduces size without visible quality loss.

Auto Resize

Resize images on-the-fly with customizable width and height.

Global CDN

Deliver images from worldwide.

Simple, Transparent Pricing

Start free and scale as you grow. No hidden fees.

Basic
Free
  • 300 uploads/month
  • 5 uploads/minute
  • 12MB max file size
  • Up to 7 days storage
  • Standard CDN delivery
  • Community support
Start Free
Starter
$4.99 /month
  • 2,000 uploads/month
  • 15 uploads/minute
  • 24MB max file size
  • Up to 30 days storage
  • Fast CDN delivery
  • Email support
Get Started
Pro
$9.99 /month
  • 5,000 uploads/month
  • 30 uploads/minute
  • 32MB max file size
  • Up to 30 days storage
  • Premium CDN delivery
  • Priority support
Get Pro
Enterprise
Custom
  • Unlimited uploads
  • Custom rate limits
  • Up to 100MB+ file size
  • Dedicated CDN
  • 24/7 Priority support
  • Custom storage duration
Contact Sales

API Reference

Everything you need to integrate Image CDN API

Authentication

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.

Get Your API Credentials Sign up at dash.corenexis.com to get your client_id and API key instantly.

API Endpoint

POST https://api.corenexis.com/image-cdn/v3

Request Parameters

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.

Code Examples

Basic Upload

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"];

Upload with Processing

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";
}

Upload from URL

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);

Response Format

Success Response

JSON Response
{
  "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"
  }
}

Response Fields

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

Error Codes

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

Error Response Example

Error Response
{
  "success": false,
  "error": "api_key invalid",
  "api_version": "V1",
  "timestamp": "2025-01-15T10:30:00+00:00"
}

Ready to Get Started?

Create your free account and start uploading images in minutes. No credit card required.

Join Our Newsletter

Stay updated with our latest news and updates

Successfully Subscribed!
Thank you for joining our newsletter