Back to APIs
Cloudinary
Upload, store, transform, and deliver images and videos with a powerful CDN and on-the-fly transformation pipeline.
Base URL
https://api.cloudinary.com/v1_1/{cloud_name}imagesvideoCDNtransformationsoptimization
Endpoints
POST
/image/uploadUpload an image to your Cloudinary account.
const response = await fetch("https://api.cloudinary.com/v1_1/YOUR_CLOUD/image/upload", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
body: JSON.stringify({
"file": "https://example.com/photo.jpg",
"public_id": "my-image"
})
});
const data = await response.json();
console.log(data);Response Preview
{
"public_id": "my-image",
"version": 1714000000,
"format": "jpg",
"width": 1920,
"height": 1080,
"bytes": 245678,
"secure_url": "https://res.cloudinary.com/YOUR_CLOUD/image/upload/my-image.jpg"
}