Get started

Image Processing & Optimization API

Manage your images programmatically with this powerful API: compress, convert, crop, resize, and more.
Get your free API key
Test it out
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Serving millions of calls to 100,000+ developers and end users worldwide

Why 10,000+ developers love Abstract's APIs

Easy to implement and maintain

We built Abstract because most of the API's we've used in the past simply weren't great. Our APIs are built the way we think API's should be: with excellent documentation, multiple easy to use libraries, and tutorials to get you started.

Speed and scale built into everything we do

Something like IP geolocation is probably part of a critical business processes and flow, so we built it (as all of our APIs) for use at scale and at blazing speeds. These aren't just marketing phrases, but fundamental features of our APIs.

Reliable uptime and great support

Developers trust Abstract because of our reliable uptime and excellent technical support that will help get you live quickly, keep you running smoothly, and resolve any issues you have fast regardless of where you are or what you're building.

The Image Processing & Optimization API helps you manage images programmatically and at scale

Reduce image size, not quality

Abstract's powerful image compression API allows you to reduce the size of your images without sacrificing on image quality or other factors that are important to you and your users.

Powerful infrastructure for top speed

Speed is critical for image processing and great infrastructure is the foundation of speed. So the infra for Abstract's image processing and optimization API is built with from ground up for speed.

Crop, resize, and optimize images

Abstract's Image Processing API comes with a full suite of functionality to programmatically manage images, from cropping to resizing to optimizing and more.

Multiple storage and export options

Abstract's Image Processing API makes it easy to export your optimized images in a number of cloud providers, including AWS S3, Azure, and more.

Speed up your site or app

There are many benefits to optimizing your images, from faster load times and more conversions to lower costs and increased performance in SEO.

Bank-level security for all queries

Abstract's Image Processing API comes with more than speed and features. We also care deeply about security, so all data sent and processed is secured via 256-bit SSL encryption (HTTPS).

Simple and cost-effective pricing



no card

  • 100 MB / month
  • Non-commercial use only




  • 1 GB / month
  • Commercial use allowed




  • 20 GB / month
  • Commercial use allowed
  • Chat support




  • 250 GB / month
  • Commercial use allowed
  • Premium chat support

Image Processing and Optimization API Documentation


Abstract's Image Processing and Optimization API is a simple yet powerful REST API that is used to convert, compress, or optimization an image that is provided via a URL or via POST to the API itself.


The Image Processing and Optimization API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors.


The Image Processing and Optimization API requires all communications to be secured TLS 1.2 or greater.

API Versions

All of Abstract's API are versioned. The Image Processing and Optimization API is currently on Version 1.

Your API Key

Your API key is your unique authentication key to be used to access Abstract's Image Processing and Optimization API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the Image Processing and Optimization and Website Screenshot APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.

Base URL

Getting an image to the Image Processing and Optimization API

There are two methods to begin working with an image: either providing the API with a URL of the image, or uploading the image directly to Abstract. Providing the URL is simpler, as you just need to make a simple HTTP POST call with all of the necessary data in the payload as JSON. The base URL for this is

To use the API with a direct upload, you must make a multi-part HTTP POST (content type multipart/form-data). The base URL for this is

The image should be uploaded as a file named "image", and the rest of the data should be json data uploaded with the name "data". The "data" argument should contain all the information from above EXCEPT the URL param which is not needed. Here's an example using curl:

curl \
--form data='{api_key": "your-api-key", "lossy": true}' \
--form image=@path/to/image/file.jpg

Return data is in JSON format:

   "original_size": "the size of the original input image, in bytes",
   "original_height": "original height in pixels of the image",
   "original_width": "original width in pixels of the image",
   "final_size": "the size of the new image, in bytes",
   "bytes_saved": "the number of bytes saved by compressing and resizing the image",
   "final_height": "final height in pixels of the image",
   "final_width": "final width in pixels of the image",
   "url": "url of the image hosted by abstract for you to download. Images are available for 1 day.",

Image Processing and Optimization API - Request Parameters

The Image Processing and Optimization API has 3 main functionalities, which can be used separately or independently as parameters on the request. These functionalities are:

- Resize: will change the dimensions of the image along one of several strategies (portrait, landscape, etc)
- Crop: will change the size of the image
- Compress: will reduce the size of the image without a noticeable decrease in quality using lossy compression
- Convert: will convert the image from one file format to another (from JPEG, PNG, SVG, or GIF to JPEG or PNG)

There are two methods to begin working with an image: either providing the API with a URL of the image, or uploading the image directly to Abstract. Providing the URL is simpler, as you just need to make a simple HTTP POST call with all of the necessary data in the payload as JSON. The base URL for this is




api_key required


Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Web Scraping API key will not work for as your User Avatar API key, for example.

url required


The URL to extract the data from. Note that this parameter should include the full HTTP Protocol (http:// or https://).



If true the request will render Javascript on the target site. Note that Javascript is rendered via a Google Chrome headless browser. Defaults to false.



If true the request will block any advertisements it can identify on the target site. Defaults to false.



The country to make the request from. The country should be submitted in the two letter, ISO 3166-1 alpha-2 code.

Response and Error Codes

Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.






Everything worked as expected.


Bad request

Bad request



The request was unacceptable. Typically due to the API key missing or incorrect.


Internal Server Error

The request could not be completed due to an error on the server side.


Service Unavailable

The server was unavailable.

Frequently Asked Questions
about Image Processing & Optimization API

What is an Image Processing & Optimization API?

An Image Processing & Optimization API provides a set of tools for a user to manipulate an image programatically. This can include but is not limited to reducing the image size, changing the image's dimensions, and more.

What are the benefits to Image Processing & Optimization?

Image optimization has many technical, user experience, and economic benefits. First, programatic image processing such as through Abstract's API makes it easy for you to get images in a format that you require. Second, more optimized images are often smaller in size and load faster, and so result in a faster experience for users and overall a better user experience. And last, smaller images means less storage and lower costs. It's a win win win!

What's the trade off between size and quality in image optimization?

There are certainly trade offs to make between an image's size and its quality. The smaller an image is, the less quality it has, all things being equal. However, Abstract's Image Processing and Optimization API's are designed to reduce size without affecting quality too much. The trade offs between these two are also fully configurable in the API, so if you don't like the API's default settings, you can always change it.

Developers love Abstract's Image Processing and Optimization API

We saved several thousand dollars a month from switching to Abstract's image API. The savings were more or less immediate since it was so easy to integrate. I think this is a no brainer for anyone working with lots of images.

Matt N.

Our team was struggling with a ton of different image formats, sizes, etc until we came across Abstract and began working with the Image Processing API. It's saved us a bunch of time and now we can actually focus on the core parts of our business!

Christophe L.

Needless to say we're not experts in image optimization but thankfully we can just outsource that to Abstract. We love working with the team and really appreciate the fast technical support as well. Keep it up and thanks :)

Sam S.

Image Processing and Optimization API Changelog

Last Updated on 

July 8, 2020

July 8, 2020


Improved compression and optimization flows to improve quality and reduce speed


Get  FREE credits to start today.

Get thousands of API calls for free across all Abstract APIs.

Frequently Asked Questions
About Subscription & Pricing

What does the API cost?

Each of our API's has a free plan as well as several paid options, which offer a greater number of requests, a higher level of data quality, and greater speed for higher prices. Please see the page above or sign into your account to view pricing for each API.

Do you have a free trial or free options for your API's?

Absolutely! We want you to try before you buy. Each of our API's has a free tier with a generous usage allowance for you to try the product out and verify that the speed and data quality work for you.

What payment options do you offer?

We use Stripe to accept payment via major debit and credit cards (Visa, Mastercard, American Express). If you cannot use those payment methods, then contact us at team at to arrange for an alternative payment method.

Can I upgrade or downgrade my subscription?

Yes, you can upgrade or downgrade your subscription at any time by visiting your dashboard. If you upgrade in the middle of a billing cycle, you will be charged a pro-rated amount for your new plan through the end of the billing cycle.

Can I cancel at any time?

Yes, all of our subscriptions are month to month. You can cancel at any time, and you will not be charged again at the end of your billing cycle.

How can I cancel my subscription?

You can cancel your subscription at any time from your dashboard. Once canceled, your subscription will be active until the end your current billing cycle, and then it will be automatically moved to the free plan.

What happens if I go over my monthly quota for requests?

If your API usage exceeds the monthly limit set by your plan, then you will be charged a fee for each call over your limit. At the end of your billing period, your usage will reset again.

What if I need more requests or something else that's not offered in your plans?

We do offer enterprise plans with custom features and pricing in limited circumstances. If our public pricing plans don't work for you, then contact us (team at and we'll work something out.

Do you offer any discounts?

While we don't normally offer discounts, we do make exceptions for certain types of users and use cases. If you are a student or are engaged in academic work, or are working on a non-profit or open source project, we're happy to offer you discounts for our API's. Just email us at team at

Do you offer discounts for annual or quarterly payments?

All of our plans are currently paid month to month. We will be launching annual plans at a discount soon. If you're interested in an annual plan in the meantime, just contact us and we'll set you up.

What happens if my payment method expires?

We will typically attempt to charge your payment method up to three times after it fails. If we're still unable to collect payment, then your subscription will be automatically canceled and you'll be moved to the free plan.

Can I use the API's for a commercial project?

Yes, a paid tier of our API may be used in conjunction with a commercial project. The free tiers of our API's may not be used in commercial projects.