Image API | Cloudinary (2024)

Create transformative visual experiences with image APIs

Start Transforming Now

Programmable Media AI-powered APIs automate image and video lifecycles

Transform and Customize

  • Generative Fill

    Leverage generative AI outpainting with our powerful cropping APIs.

  • Generative Object Removal

    Remove unwanted elements from your image with Generative Remove as if they never existed.

  • Generative Replace

    Use Generative AI and natural language to replace one object or color with another.

  • Zoom Pan

    Apply zoom or pan to an image to create a video or animated GIF.

  • 3D Spinset

    Easily create 3D animations and videos to give customers a 360° view of your product.

  • Product Gallery

    Create an interactive shopping experience with high-performant and responsive images, videos, 360° views, and 3D models.

  • Filters and Overlays

    Quickly make programmatic changes to images using upload presets.

  • Upscaling

    Super resolution upscaling uses AI to transform images from grainy or low-quality to high-resolution.

For more, check out our documentation for images and videos.

LEARN MORE ->

Originalhttps://res.cloudinary.com/demo/image/upload/v1689803100/ai/hiker.jpgFilled (800 pixels wider):https://res.cloudinary.com/demo/image/upload/c_pad,w_2400,h_1600,b_gen_fill/v1689803100/ai/hiker.jpg

Before:https://cloudinary-marketing-res.cloudinary.com/image/upload/cups_on_table.jpgAfter:https://cloudinary-marketing-res.cloudinary.com/image/upload/e_gen_remove:prompt_(remove-right-cup)/cups_on_table.jpg

Originalhttps://res.cloudinary.com/demo/image/upload/v1688737277/ai/model_plain_sweatshirt.jpgTransformed (shirt to rain coat)https://res.cloudinary.com/demo/image/upload/e_gen_replace:from_shirt;to_raincoat/v1688737277/ai/model_plain_sweatshirt.jpgTransformed (shirt to suit jacket)https://res.cloudinary.com/demo/image/upload/e_gen_replace:from_shirt;to_suit_jacket/v1688737277/ai/model_plain_sweatshirt.jpg

https://res.cloudinary.com/demo/image/upload/e_zoompan:from_(g_persons;zoom_3);du_10/w_1300/f_mp4/v1664906306/pm/hikers_mts.jpg

https://res.cloudinary.com/demo/image/upload/dl_200,f_gif,fl_animated/c_fill,h_600,w_600/v1664984700/pm/Shoe.glb

cloudinary.galleryWidget({ container: "#my-gallery", cloudName: "", mediaAssets: [{ tag: "shoes_product_gallery_demo" }, { publicId: "pm/shoes_video", mediaType: "video" } ], zoom: true});myGallery.render();

Image API | Cloudinary (1)

Grayscale: https://res.cloudinary.com/demo/image/upload/e_grayscale/v1664903773/pm/mountains_autumn.jpgTinthttps://res.cloudinary.com/demo/image/upload/e_tint/v1664903773/pm/mountains_autumn.jpgImage Overlayhttps://res.cloudinary.com/demo/image/upload/l_pm:cld_logo/w_230/o_80/fl_layer_apply,g_south_east,x_230,y_120/pm/mountains_autumn.jpg

Image API | Cloudinary (2)

Before (larger with no upscale)https://cloudinary-marketing-res.cloudinary.com/image/upload/w_2000/brooklyn_bridge.jpgAfter (larger with upscaling applied)https://cloudinary-marketing-res.cloudinary.com/image/upload/e_upscale/w_2000/brooklyn_bridge.jpg

Optimize and Deliver

  • Automatic Cropping

    Auto-cropping and filling that adapts to image content and your specified dimensions for precise results.

  • Object Aware Cropping

    Perfect your assets with AI-powered object cropping that identifies the most important sections of your image or video. Thousands of out-of-the-box object categories make it fast and accurate.

  • Video Smart Cropping

    Ensure that the most relevant portions of your content are the main focus throughout the duration of each video.

  • Auto Responsive

    Website and app users automatically view images and videos in the correct size and shape for their device.

  • Automatic Optimization

    Send the best quality asset every time, formatted to the user’s device, browser and connection – including cutting-edge formats like AVIF, JPEG-XL, HEIC & WebP.

For more, check out our documentation.

LEARN MORE ->

Originalhttps://res.cloudinary.com/demo/image/upload/pm/woman_car.jpgAuto Crophttps://res.cloudinary.com/demo/image/upload/c_auto,g_auto,w_900,ar_9:16/pm/woman_car.jpgAuto Crop With Generative Fillhttps://res.cloudinary.com/demo/image/upload/c_auto_pad,b_gen_fill,g_auto,w_900,ar_7:16/pm/woman_car.jpg

Image API | Cloudinary (3)

Originalhttps://res.cloudinary.com/demo/image/upload/v1688585331/pm/kitchen.jpgFace Crophttps://res.cloudinary.com/demo/image/upload/c_thumb,w_500,g_auto:face/v1688585331/pm/kitchen.jpgHands Crophttps://res.cloudinary.com/demo/image/upload/c_thumb,w_500,g_auto:hands/v1688585331/pm/kitchen.jpg

Originalhttps://res.cloudinary.com/demo/video/upload/pm/surfer.mp4Croppedhttps://res.cloudinary.com/demo/video/upload/w_600,c_fill,g_auto,ar_9:16/pm/surfer.mp4

Image API | Cloudinary (4)

<html> <head> <title> Auto Responsive Images with Cloudinary </title> <script src="https://unpkg.com/cloudinary-core@latest/cloudinary-core-shrinkwrap.js" type="text/javascript"> </script> </head> <body> <img data-src="https://res.cloudinary.com/demo/image/upload/c_limit,w_auto/v1689805772/pm/japan.jpg" class="cld-responsive"> <script type="text/javascript"> var cl = cloudinary.Cloudinary.new({ cloud_name: "demo" }); cl.responsive(); </script> </body></html>

Image API | Cloudinary (5)

Originalhttps://cloudinary-marketing-res.cloudinary.com/image/upload/patagonia_mountainsOptimizedhttps://cloudinary-marketing-res.cloudinary.com/image/upload/f_auto/q_auto/patagonia_mountains

Manage and Analyze

  • Smart tagging

    Industry leading AI tools power auto tagging of images and video during the upload process

  • AI Image Captioning

    Improve SEO and accessibiity with intelligent image captioning using Large Language Model (LLM) technology

  • Source and Moderate

    The Upload Widget interactive UI enables users to upload assets from a variety of sources and includes AI-based content moderation and curation.

  • Automated Workflows

    Generate presets to automatically transform files upon upload to save time and ensure files are delivery-ready automatically.

  • Quickstart UI

    Media Explorer is a UI-based visual asset management tool for developers providing corresponding SDK code snippets that reflect the actions executed in the UI.

Check out relevant documentation for Upload API, Admin API and Search API.

LEARN MORE ->

// utilize AWS Rekognition with Node.jscloudinary.v2.uploader.upload("fashion.jpg", {categorization: "aws_rek_tagging"}).then(result=>console.log(result));

Image API | Cloudinary (6)

cloudinary.v2.uploader.upload("island.jpg", { detection: "captioning"}).then(result => console.log(result));

Image API | Cloudinary (7)

var myWidget = cloudinary.createUploadWidget({ cloudName: 'Your Cloud Name', uploadPreset: 'my_preset'}, (error, result) => { if (!error && result && result.event === "success") { console.log('Done! Here is the image info: ', result.info); }})document.getElementById("upload_widget").addEventListener("click", function() { myWidget.open();}, false);

Image API | Cloudinary (8)

require("dotenv").config();const cloudinary = require("cloudinary").v2;cloudinary.api.create_upload_preset({ name: "auto_crop_square", transformation: [{ width: 200, height: 200, crop: "fill", gravity: "auto" }, ],}).then((uploadResult) => console.log(uploadResult)).catch((error) => console.error(error));

Image API | Cloudinary (9)

Video APIs

  • Adaptive Bitrate Streaming

    Deliver videos instantly without buffering using on-the-fly encoding and automatic format, quality selection

  • Video Generation

    Programmatically generate videos at scale leveraging existing assets and re-usable templates

  • Video Previews

    Machine learning detects the most compelling video segments to generate video previews.

  • Video Player

    Customize player experience, add subtitles, captions and even add interactivity with pre-built widget

  • Engagement Analytics

    Get content performance and audience viewing insights to plan future video investments and maximize ROI

Check out relevant documentation for Upload API, Admin API and Search API.

LEARN MORE ->

URLhttps://res.cloudinary.com/demo/pm/video/upload/sp_auto/pm/travel_shorts.m3u8

{ "type": "video", "width": 1280, "height": 720, "duration": 10, "fps": 30, "vars": { "bgColor": "#8e998a", "imageUrl": "docs/retirement", "sponsoredText": "Elder Care & Nursing Home", "titleText": "The more we care, the more beautiful life becomes.", "ctaText": "Read more" }, "tracks": [ {1 item}, {6 items}, {6 items}, {5 items}, ]}

Original:https://res.cloudinary.com/demo/video/upload/rocket_launchAI Generated Previewhttps://res.cloudinary.com/demo/video/upload/e_preview:duration_12:max_seg_4:min_seg_dur_3/e_volume:mute/rocket_launch

<div style = "max-width: 1024px;"> <video id = "doc-player" class = "cld-video-player cld-video-player-skin-dark cld-fluid"></video></div><script type = "text/javascript"> var demoplayer = cloudinary.videoPlayer("doc-player", { cloud_name: 'Your Cloud Name', transformation: { effect: "deshake" }, controls: true, showLogo: false, autoplay: true });demoplayer.source("race_road_car");</script>

Explore More with Cloudinary

Image API | Cloudinary (10)

An arrow pointing from the original asset to the cropped asset

Image API | Cloudinary (11)
Original
18 MB

We’re showing a resized version of the original asset to avoid slow loading speeds. View the original.

JPEG
135 KB
WebP
135 KB
AVIF
90 KB
JPEG XL
94 KB

Original
18 MB

We’re showing a resized version of the original asset to avoid slow loading speeds. View the original.

JPEG
135 KB
WebP
135 KB
AVIF
90 KB
JPEG XL
94 KB

An arrow pointing from the original asset to the cropped asset

An arrow pointing from the original asset to the transformed asset.

Duration

An arrow pointing from the original video to the AI-generated preview.

Duration

URL:

/ar_0.5,c_fill,g_auto,w_433/q_auto/f_auto/hiking_dog_mountain.jpg

cloudinary.image("hiking_dog_mountain.jpg", {transformation: [ {aspect_ratio: "0.5", gravity: "auto", width: 433, crop: "fill"}, {quality: "auto"}, {fetch_format: "auto"} ]})
new CloudinaryImage("hiking_dog_mountain.jpg") .resize( fill() .width(433) .aspectRatio(0.5) .gravity(autoGravity()) ) .delivery(quality(auto())) .delivery(format(auto()));
new CloudinaryImage("hiking_dog_mountain.jpg") .resize( fill() .width(433) .aspectRatio(0.5) .gravity(autoGravity()) ) .delivery(quality(auto())) .delivery(format(auto()));
new CloudinaryImage("hiking_dog_mountain.jpg") .resize( fill() .width(433) .aspectRatio(0.5) .gravity(autoGravity()) ) .delivery(quality(auto())) .delivery(format(auto()));
new CloudinaryImage("hiking_dog_mountain.jpg") .resize( fill() .width(433) .aspectRatio(0.5) .gravity(autoGravity()) ) .delivery(quality(auto())) .delivery(format(auto()));
CloudinaryImage("hiking_dog_mountain.jpg").image(transformation=[ {'aspect_ratio': "0.5", 'gravity': "auto", 'width': 433, 'crop': "fill"}, {'quality': "auto"}, {'fetch_format': "auto"} ])
(new ImageTag('hiking_dog_mountain.jpg'))->resize(Resize::fill()->width(433)->aspectRatio(0.5)->gravity(Gravity::autoGravity()))->delivery(Delivery::quality(Quality::auto()))->delivery(Delivery::format(Format::auto()));
cloudinary.url().transformation(new Transformation() .aspectRatio("0.5").gravity("auto").width(433).crop("fill").chain() .quality("auto").chain() .fetchFormat("auto")).imageTag("hiking_dog_mountain.jpg");
cl_image_tag("hiking_dog_mountain.jpg", transformation: [ {aspect_ratio: "0.5", gravity: "auto", width: 433, crop: "fill"}, {quality: "auto"}, {fetch_format: "auto"} ])
cloudinary.Api.UrlImgUp.Transform(new Transformation() .AspectRatio("0.5").Gravity("auto").Width(433).Crop("fill").Chain() .Quality("auto").Chain() .FetchFormat("auto")).BuildImageTag("hiking_dog_mountain.jpg")
cloudinary.image('hiking_dog_mountain.jpg').transformation(Transformation().resize(Resize.fill().width(433).aspectRatio(0.5).gravity(Gravity.autoGravity())).delivery(Delivery.quality(Quality.auto())).delivery(Delivery.format(Format.auto())));
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation() .setAspectRatio("0.5").setGravity("auto").setWidth(433).setCrop("fill").chain() .setQuality("auto").chain() .setFetchFormat("auto")).generate("hiking_dog_mountain.jpg")!, cloudinary: cloudinary)
MediaManager.get().url().transformation(new Transformation() .aspectRatio("0.5").gravity("auto").width(433).crop("fill").chain() .quality("auto").chain() .fetchFormat("auto")).generate("hiking_dog_mountain.jpg");
cloudinary.image('hiking_dog_mountain.jpg').transformation(Transformation().resize(Resize.fill().width(433).aspectRatio(0.5).gravity(Gravity.autoGravity())).delivery(Delivery.quality(Quality.auto())).delivery(Delivery.format(Format.auto())));
cloudinary.image {publicId("hiking_dog_mountain.jpg") resize(Resize.fill() { width(433) aspectRatio(0.5F) gravity(Gravity.autoGravity()) }) delivery(Delivery.quality(Quality.auto())) delivery(Delivery.format(Format.auto())) }.generate()
new CloudinaryImage("hiking_dog_mountain.jpg") .resize( fill() .width(433) .aspectRatio(0.5) .gravity(autoGravity()) ) .delivery(quality(auto())) .delivery(format(auto()));

Resources

Cloudinary’s AI-powered Image API offers a plethora of transformative and customizable features that empower developers to enhance, optimize, and manage their images seamlessly. From generative image manipulations to intelligent optimizations, the Cloudinary Image API caters to a wide array of use cases.

E-Commerce Image Enhancement

Leverage Generative Fill and Generative Object Removal to automatically enhance product images. This ensures that your e-commerce platform showcases products at their best by removing distractions and highlighting essential elements.

Dynamic Content Creation

Utilize Generative Replace to dynamically change specific elements in images based on natural language commands. This can be particularly useful for creating personalized content on the fly, allowing you to adapt images to suit different contexts or promotional campaigns.

Interactive Product Displays

Implement 3D Spinset and Product Gallery features to provide customers with an interactive shopping experience. Showcase products from multiple angles, allowing users to view 360° rotations, zoom in, and explore details, enhancing engagement and potentially boosting sales.

Real-time Image Filtering

Employ Filters and Overlays to modify images on the fly programmatically. This can be handy for implementing real-time image effects, enabling users to personalize their experience on your platform.

Enhanced Image Upscaling

Use Super Resolution Upscaling to enhance image quality, making your visuals appear sharper and more professional. This is especially beneficial when dealing with user-generated content that may vary in quality.

Object-Aware Cropping for Asset Perfection

Perfect your assets with Object Aware Cropping, which identifies and retains essential elements in images. This is invaluable for ensuring that key features are not lost during cropping, providing a polished and professional appearance to your visuals.

Automatic Image Optimization

Benefit from Auto-Responsive and Automatic Optimization features to automatically deliver the best-quality assets tailored to users’ devices, browsers, and connections. Support for cutting-edge image formats ensures optimal performance and faster loading times.

Efficient Asset Management

Smart tagging and AI Image Captioning streamline asset management by automatically categorizing and captioning images. This not only enhances searchability but also improves SEO and accessibility.

Moderated Uploads

Ensure a safe and curated content environment using AI-based moderation during uploading. The Upload Widget’s interactive UI facilitates easy asset uploads from various sources while maintaining content quality.

Workflow Automation

Generate automated workflows with preset configurations to transform files upon upload. This saves time and ensures that assets are delivery-ready without manual intervention.

Visual Asset Management

Leverage the Media Explorer’s Quickstart UI for visual asset management. Developers can benefit from corresponding SDK code snippets, allowing seamless integration of the Cloudinary Image API into their applications.

Why Choose Our API for Images? Unleashing the Potential of Visual Assets

Choosing Cloudinary’s API for images unlocks a world of possibilities, empowering businesses and developers to unleash the full potential of their visual assets. Here are compelling reasons why Cloudinary stands out as the preferred choice for managing and optimizing images

Image API | Cloudinary (12)

AI-Powered Transformations

Cloudinary’s Image API harnesses the power of artificial intelligence to offer cutting-edge image transformations. Generative Fill, Generative Object Removal, and Generative Replace are just a few examples of how AI can enhance and customize images, providing unparalleled flexibility in content creation.

Image API | Cloudinary (13)

Comprehensive Image Enhancement

Whether it’s 3D animations, interactive product displays, or real-time image filtering, Cloudinary’s API covers a wide spectrum of image enhancement features. Developers can seamlessly integrate these capabilities to create visually appealing and dynamic content.

Image API | Cloudinary (14)

Optimization for Performance

Automatic optimization ensures that images are delivered in the best quality and format based on the user’s device, browser, and connection. This improves website performance and contributes to a better user experience by reducing loading times.

Image API | Cloudinary (15)

Intelligent Asset Management

Smart tagging, AI image captioning, and object-aware cropping simplify asset management. These features enhance searchability, improve SEO, and facilitate accessibility, allowing businesses to organize and utilize their visual content efficiently.

Image API | Cloudinary (16)

Real-Time Moderation

The AI-based moderation during upload ensures that content remains safe and adheres to quality standards. This is particularly crucial for platforms that rely on user-generated content, helping maintain a positive and curated environment.

Image API | Cloudinary (17)

Workflow Automation

Cloudinary’s image API enables the creation of automated workflows with preset configurations. This saves time and ensures that files are transformed and ready for delivery automatically upon upload, streamlining the content management process.

Image API | Cloudinary (18)

Responsive Design

The auto-responsive feature ensures that images are automatically displayed in the correct size and shape for each user’s device, contributing to a consistent and optimized viewing experience across various platforms.

Image API | Cloudinary (19)

Versatility in Image Formats

Support for cutting-edge image formats like AVIF, JPEG-XL, HEIC, and WebP ensures that visual assets are delivered in formats that offer the best combination of quality and efficiency. This adaptability future-proofs your content for evolving technological landscapes.

Image API | Cloudinary (20)

Ease of Integration

Cloudinary’s image API is developer-friendly, providing a seamless integration experience. The Quickstart UI and corresponding SDK code snippets simplify visual asset management, making it accessible for developers to incorporate powerful image transformations into their applications.

Image API | Cloudinary (21)

Scalability and Reliability

Cloudinary’s infrastructure is designed for scalability and reliability, making it suitable for businesses of all sizes. Whether you’re a small startup or a large enterprise, the API can efficiently handle image processing demands, ensuring consistent performance.

Image API | Cloudinary (22)

Innovation and Future-Proofing

With Cloudinary, you’re not just adopting an image API; you’re embracing innovation. The platform stays at the forefront of technological advancements, regularly introducing new features and staying up-to-date with industry trends, ensuring your visual content remains ahead of the curve.

Ready to start using Cloudinary?

Sign up for our free plan and start creating stunning visual experiences in minutes.

Sign Up for Free

Image API | Cloudinary (23)

Image API | Cloudinary (2024)

References

Top Articles
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 5949

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.