New PlatformNeed 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

⚠️ Key goes in the header only — not in query params or form body.

Upload ImagePOST

POST https://api.imghosting.in/upload

Send as multipart/form-data. The file field must be named file.

ParameterLocationTypeDescription
X-Free-API-KeyrequiredheaderstringYour API key
filerequiredform-dataFileImage file. Free: max 20 MB · Premium: max 50 MB

Example

bash
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
{
  "success": true,
  "status": 200,
  "data": {
    "id": "abc123",
    "url": "https://imgh.in/images/abc123",
    "size": 204800,
    "type": "image/jpeg"
  },
  "usage": {
    "current": 42,
    "limit": 500
  }
}
FieldDescription
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
{
  "count": 42,
  "plan": "free"
}

Error Codes

CodeMeaning
200Upload successful
400Bad request — wrong field name or non-image file
401Missing or invalid API key
413File too large for your plan
429Monthly upload limit reached
500Worker error
json
// 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

PlanMonthly UploadsMax File Size
Free50020 MB
Premiumrecommended10,00050 MB

Need more? Upgrade to Premium →