
🔑 How to get a free ImgBB API key
ImgBB's key is instant — one login and you're uploading images programmatically.
- Create a free ImgBB account. Sign up at imgbb.com.
- Open the API page. Visit api.imgbb.com and click "Get API key" — it's issued immediately.
- Upload an image. POST to https://api.imgbb.com/1/upload?key=YOUR_KEY with the image as base64, a file, or a URL.
- Use expiration if needed. Add &expiration=600 (seconds) for self-deleting uploads — handy for temporary content.
📚 Documentation & Examples
Everything you need to integrate with Imgbb
🚀 Quick Start Examples
// Imgbb API Example
const response = await fetch('https://api.imgbb.com/', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Experience hassle-free private image sharing with the IMGBB API, designed for developers seeking a user-friendly solution for uploading and managing images. This API allows you to effortlessly upload images to a secure cloud storage service, enabling fast access and sharing while maintaining privacy. Whether you’re working on a web application or mobile project, the IMGBB API ensures that your images are protected from unauthorized access, making it perfect for sensitive or personal content. With its robust features and simple integration, you can enhance your applications and provide a seamless experience for end-users.
Utilizing the IMGBB API offers numerous benefits, including:
- Quick and easy image uploads with minimal setup.
- Enhanced privacy features to secure your images.
- A straightforward API structure that simplifies integration.
- Reliable cloud storage ensuring images are always accessible.
- Comprehensive documentation available at api.imgbb.com for seamless implementation.
Here’s a JavaScript code example for calling the IMGBB API to upload an image:
const apiKey = 'YOUR_API_KEY';
const imageFile = document.getElementById('imageInput').files[0];
const formData = new FormData();
formData.append('image', imageFile);
fetch(`https://api.imgbb.com/1/upload?key=${apiKey}`, {
method: 'POST',
body: formData,
})
.then(response => response.json())
.then(data => {
if(data.success) {
console.log('Image uploaded successfully', data);
} else {
console.error('Image upload failed', data);
}
})
.catch(error => {
console.error('Error:', error);
});
How to Get an ImgBB API Key
ImgBB's upload API is free and the key takes about a minute to create:
- Create a free account at https://imgbb.com/ (or sign in) — email or social login both work.
- Go to https://api.imgbb.com/ and click "Get API key".
- Copy the key it shows you.
Pass the key as the key query parameter and POST your image (as a file, a base64 string, or an image URL) to the upload endpoint:
curl "https://api.imgbb.com/1/upload?key=YOUR_API_KEY" \
--form "image=@/path/to/photo.jpg"
The response returns JSON with the hosted image's url, display_url, delete_url, and thumbnail links. Options you can add:
expiration=600— auto-delete the image after N seconds (60–15552000).name— set a custom file name.
The key is free with no per-request charge; keep it server-side (it's tied to your account) rather than exposing it in client-side code. Full reference: https://api.imgbb.com/.
Security Assessment
❓ Frequently Asked Questions
Is the ImgBB API free?
Yes — free accounts get unlimited uploads up to 32MB per image via the API, with direct links suitable for hotlinking.
What are alternatives to the ImgBB API?
Imgur API (free with registration), Cloudinary and Uploadcare (free tiers with transformations), or S3-compatible storage like Cloudflare R2 for production apps.









