New Platform Need Video Hosting or Video APIs?
You can now upload and host videos up to 100 MB for free on our new platform, VidHosting . Dedicated video APIs and scalable cloud storage are also available at affordable, cost-effective rates.
Try VidHosting at vidhosting.in →
API Reference v1 Live Programmatically upload images and retrieve permanent CDN links. Base URL: https://api.imghosting.in
Get API Key → Authentication Pass your API key in the request header. You can get your key from the Dashboard .
X-Free-API-Key: YOUR_API_KEY Copy
⚠️ Key goes in the header only — not in query params or form body.
Upload ImagePOST POST https://api.imghosting.in/upload Copy
Send as multipart/form-data. The file field must be named file.
Parameter Location Type Description X-Free-API-Keyrequired header string Your API key filerequired form-data File Image file. Free: max 20 MB · Premium: max 50 MB
Example cURL JavaScript Python
bash Copy
curl -X POST "https://api.imghosting.in/upload" \
-H "X-Free-API-Key: YOUR_API_KEY" \
-F "[email protected] "Response On success, returns 200 with the image URL and usage info.
json Copy
{
"success": true,
"status": 200,
"data": {
"id": "abc123",
"url": "https://imgh.in/images/abc123",
"size": 204800,
"type": "image/jpeg"
},
"usage": {
"current": 42,
"limit": 500
}
}Field Description data.idUnique image ID data.urlPermanent image URL — https://imgh.in/images/{id} data.sizeFile size in bytes data.typeMIME type (e.g. image/jpeg) usage.currentUploads used so far this month usage.limitMonthly limit for your plan (500 free / 10,000 premium)
Check Usage GET Returns current usage and plan for an API key.
GET https://api.imghosting.in/api/usage?key=YOUR_API_KEY
json Copy
{
"count": 42,
"plan": "free"
}Error Codes Code Meaning 200 Upload successful 400 Bad request — wrong field name or non-image file 401 Missing or invalid API key 413 File too large for your plan 429 Monthly upload limit reached 500 Worker error
json Copy
// 401 - Missing API key
{ "error": "API Key missing" }
// 429 - Limit exceeded
{ "error": "API limit reached. Upgrade to Premium for 10,000 requests." }
// 413 - File too large
{ "error": "File too large. Your plan limit is 20MB." }
// 400 - Wrong file
{ "error": "Only images are allowed" }Rate Limits Plan Monthly Uploads Max File Size Free 500 20 MB Premium recommended 10,000 50 MB
Need more? Upgrade to Premium →