{"id":15020,"date":"2026-10-14T15:56:16","date_gmt":"2026-10-14T13:56:16","guid":{"rendered":"https:\/\/shortpixel.com/blog\/?p=15020"},"modified":"2026-10-14T15:56:19","modified_gmt":"2026-10-14T13:56:19","slug":"how-to-remove-image-backgrounds-with-the-shortpixel-api-curl-php-javascript-python-examples","status":"publish","type":"post","link":"https:\/\/shortpixel.com\/blog\/how-to-remove-image-backgrounds-with-the-shortpixel-api-curl-php-javascript-python-examples\/","title":{"rendered":"How to Remove Image Backgrounds With the ShortPixel API (cURL, PHP, JavaScript &amp; Python Examples)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Removing the background from one photo is quick. Removing it from hundreds of product photos is not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s where an API comes in. With the ShortPixel API, background removal comes down to adding the bg_remove parameter to a standard optimization request. You can make the background transparent, swap it for a solid color, or place the subject on a different image.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No worries, it\u2019s not complicated. We\u2019ll go through it step by step, with ready-to-use examples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, we\u2019ll look at how to remove image backgrounds with the ShortPixel API using cURL, PHP, JavaScript, and Python.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What do you need to get started?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not much. Just two things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>A ShortPixel API key.<\/strong> You can find it in your ShortPixel dashboard and in the signup confirmation email. If you don\u2019t have an account yet, you can <a href=\"https:\/\/shortpixel.com\/free-sign-up\">sign up for free<\/a>.<\/li>\n\n\n\n<li><strong>Your images.<\/strong> They can be online (available through a URL) or stored on your computer or server.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How does background removal work in the ShortPixel API?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Background removal is part of ShortPixel\u2019s Reducer API. It\u2019s the same API that compresses, resizes, and converts your images. You just add the bg_remove parameter to the request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The parameter accepts three types of values:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1<\/strong>: removes the background and makes it transparent.<\/li>\n\n\n\n<li><strong>A URL<\/strong>: removes the background and uses the image from that URL as the new background.<\/li>\n\n\n\n<li><strong>#rrggbbxx<\/strong>: replaces the background with a solid color. rrggbb is the hex color code, and xx is the transparency level (00 is fully transparent, FF is fully opaque). For example, #ffffffff gives you a solid white background.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How much does it cost?<br><\/strong>Background removal is available on all ShortPixel plans and costs 1 credit per image, so you don\u2019t need a separate add-on. As a general rule, 1 optimized image uses 1 credit too. Keep in mind that generating extra formats also counts: optimizing an image and generating WebP or AVIF versions uses 3 credits.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And there are three endpoints you can use, depending on where your images are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>reducer.php<\/strong>: for images that are online. You can send up to 100 URLs in one request.<\/li>\n\n\n\n<li><strong>reducer-sync.php<\/strong>: also for online images, but it returns the processed image directly instead of a JSON response.<\/li>\n\n\n\n<li><strong>post-reducer.php<\/strong>: for images stored on your computer or server, which you upload with the request.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Remove a background with cURL<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is the quickest way to test the API. Open your terminal and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -X POST https:\/\/api.shortpixel.com\/v2\/reducer.php \\\n\u00a0\u00a0-H \"Content-Type: application\/json\" \\\n\u00a0\u00a0-d '{\n\u00a0\u00a0\u00a0\u00a0\"key\": \"YOUR_API_KEY\",\n\u00a0\u00a0\u00a0\u00a0\"plugin_version\": \"MY123\",\n\u00a0\u00a0\u00a0\u00a0\"lossy\": 1,\n\u00a0\u00a0\u00a0\u00a0\"wait\": 30,\n\u00a0\u00a0\u00a0\u00a0\"bg_remove\": \"1\",\n\u00a0\u00a0\u00a0\u00a0\"urllist\": &#91;\"https:\/\/example.com\/images\/product.jpg\"]\n\u00a0\u00a0}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s what the parameters do:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>key: your API key.<\/li>\n\n\n\n<li>plugin_version: a code you choose for your app (maximum 5 alphanumeric characters).<\/li>\n\n\n\n<li>lossy: the compression type (1 for lossy, 2 for glossy, 0 for lossless).<\/li>\n\n\n\n<li>wait: how many seconds (1 to 30) the API should wait for the image to be ready before responding.<\/li>\n\n\n\n<li>bg_remove: the background option, in this case a transparent background.<\/li>\n\n\n\n<li>urllist: the list of image URLs to process.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Want a white background instead? Just change the bg_remove value:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"bg_remove\": \"#ffffffff\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or use another image as the background:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"bg_remove\": \"https:\/\/example.com\/backgrounds\/studio.jpg\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Get the image directly with the sync endpoint<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t want to deal with JSON and a second download step, use the synchronous endpoint. It sends back the processed image, so you can save it straight to a file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -X POST https:\/\/api.shortpixel.com\/v2\/reducer-sync.php \\\n\u00a0\u00a0-H \"Content-Type: application\/json\" \\\n\u00a0\u00a0-d '{\n\u00a0\u00a0\u00a0\u00a0\"key\": \"YOUR_API_KEY\",\n\u00a0\u00a0\u00a0\u00a0\"plugin_version\": \"MY123\",\n\u00a0\u00a0\u00a0\u00a0\"lossy\": 1,\n\u00a0\u00a0\u00a0\u00a0\"bg_remove\": \"1\",\n\u00a0\u00a0\u00a0\u00a0\"url\": \"https:\/\/example.com\/images\/product.jpg\"\n\u00a0\u00a0}' \\\n\u00a0\u00a0-o product-no-bg.png<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Notice that this endpoint takes a single url instead of a urllist.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Remove a background with PHP<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s the same request in PHP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n$apiKey \u00a0 = 'YOUR_API_KEY';\n$endpoint = 'https:\/\/api.shortpixel.com\/v2\/reducer.php';\n$data = json_encode(&#91;\n\u00a0\u00a0\u00a0\u00a0'key'\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 => $apiKey,\n\u00a0\u00a0\u00a0\u00a0'plugin_version' => 'MY123',\n\u00a0\u00a0\u00a0\u00a0'lossy'\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 => 1,\n\u00a0\u00a0\u00a0\u00a0'wait' \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 => 30,\n\u00a0\u00a0\u00a0\u00a0'bg_remove'\u00a0 \u00a0 \u00a0 => '1',\n\u00a0\u00a0\u00a0\u00a0'urllist'\u00a0 \u00a0 \u00a0 \u00a0 => &#91;'https:\/\/example.com\/images\/product.jpg'],\n]);\n$ch = curl_init($endpoint);\ncurl_setopt_array($ch, &#91;\n\u00a0\u00a0\u00a0\u00a0CURLOPT_POST \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 => true,\n\u00a0\u00a0\u00a0\u00a0CURLOPT_POSTFIELDS \u00a0 \u00a0 => $data,\n\u00a0\u00a0\u00a0\u00a0CURLOPT_HTTPHEADER \u00a0 \u00a0 => &#91;'Content-Type: application\/json', 'Accept: application\/json'],\n\u00a0\u00a0\u00a0\u00a0CURLOPT_RETURNTRANSFER => true,\n\u00a0\u00a0\u00a0\u00a0CURLOPT_TIMEOUT\u00a0 \u00a0 \u00a0 \u00a0 => 60,\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\n$item = json_decode($response, true)&#91;0];\nif ((int) $item&#91;'Status']&#91;'Code'] === 2) {\n\u00a0\u00a0\u00a0\u00a0\/\/ The image is ready, so we download it\n\u00a0\u00a0\u00a0\u00a0file_put_contents('product-no-bg.png', file_get_contents($item&#91;'LossyURL']));\n\u00a0\u00a0\u00a0\u00a0echo 'Done!';\n} else {\n\u00a0\u00a0\u00a0\u00a0echo $item&#91;'Status']&#91;'Code'] . ': ' . $item&#91;'Status']&#91;'Message'];\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you prefer something shorter, ShortPixel also has an official <a href=\"https:\/\/github.com\/short-pixel-optimizer\/shortpixel-php\" target=\"_blank\" rel=\"noopener\">PHP library<\/a> with a simple, fluent syntax.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Remove a background with JavaScript<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s an example using fetch in Node.js (version 18 or newer):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const response = await fetch('https:\/\/api.shortpixel.com\/v2\/reducer.php', {\n\u00a0\u00a0method: 'POST',\n\u00a0\u00a0headers: {\n\u00a0\u00a0\u00a0\u00a0'Content-Type': 'application\/json',\n\u00a0\u00a0\u00a0\u00a0'Accept': 'application\/json',\n\u00a0\u00a0},\n\u00a0\u00a0body: JSON.stringify({\n\u00a0\u00a0\u00a0\u00a0key: 'YOUR_API_KEY',\n\u00a0\u00a0\u00a0\u00a0plugin_version: 'MY123',\n\u00a0\u00a0\u00a0\u00a0lossy: 1,\n\u00a0\u00a0\u00a0\u00a0wait: 30,\n\u00a0\u00a0\u00a0\u00a0bg_remove: '1',\n\u00a0\u00a0\u00a0\u00a0urllist: &#91;'https:\/\/example.com\/images\/product.jpg'],\n\u00a0\u00a0}),\n});\nconst &#91;item] = await response.json();\nif (item.Status.Code === 2) {\n\u00a0\u00a0console.log('Processed image:', item.LossyURL);\n} else {\n\u00a0\u00a0console.log(`${item.Status.Code}: ${item.Status.Message}`);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> don\u2019t use your API key in JavaScript that runs in the browser. Anyone can see it in the developer tools. Make the request from your server and send only the result to the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Using Node.js?<\/strong> ShortPixel also has an official Node.js SDK, so you don\u2019t have to build the requests manually. It has dedicated helpers like backgroundRemove() for transparent backgrounds and backgroundChange() for replacing the background with a color or an image, and it takes care of polling for you.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import SHORTPIXEL from \"@shortpixel-com\/shortpixel\";\nconst { ShortPixelClient } = SHORTPIXEL;\nconst cli = new ShortPixelClient({ apiKey: process.env.SHORTPIXEL_API_KEY });\nconst src = await cli.backgroundRemove(\"assets\/product.png\", { lossy: 1 });\nawait src.downloadTo(\".\/output\");<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install it with npm i @shortpixel-com\/shortpixel. The package is ESM-only, and Node 20+ is recommended. For the full walkthrough, see our guide on <a href=\"https:\/\/shortpixel.com\/blog\/how-to-optimize-images-in-node-js-with-the-shortpixel-sdk\/\">how to optimize images in Node.js with the ShortPixel SDK<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Remove a background with Python<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import requests\nr = requests.post(\n\u00a0\u00a0\u00a0\u00a0'https:\/\/api.shortpixel.com\/v2\/reducer.php',\n\u00a0\u00a0\u00a0\u00a0json={\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'key': 'YOUR_API_KEY',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'plugin_version': 'MY123',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'lossy': 1,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'wait': 30,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'bg_remove': '1',\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'urllist': &#91;'https:\/\/example.com\/images\/product.jpg'],\n\u00a0\u00a0\u00a0\u00a0}\n)\nitem = r.json()&#91;0]\nif int(item&#91;'Status']&#91;'Code']) == 2:\n\u00a0\u00a0\u00a0\u00a0img = requests.get(item&#91;'LossyURL'])\n\u00a0\u00a0\u00a0\u00a0with open('product-no-bg.png', 'wb') as f:\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0f.write(img.content)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Remove the background from images that aren\u2019t online<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">What if the image is on your computer or server and doesn\u2019t have a public URL? Then use the post-reducer.phpendpoint and upload the file with your request:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -X POST https:\/\/api.shortpixel.com\/v2\/post-reducer.php \\\n\u00a0\u00a0-F \"key=YOUR_API_KEY\" \\\n\u00a0\u00a0-F \"plugin_version=MY123\" \\\n\u00a0\u00a0-F \"lossy=1\" \\\n\u00a0\u00a0-F \"wait=30\" \\\n\u00a0\u00a0-F \"bg_remove=1\" \\\n\u00a0\u00a0-F 'file_paths={\"file1\": \"\/unique\/path\/product.jpg\"}' \\\n\u00a0\u00a0-F \"file1=@product.jpg\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The file_paths parameter tells the API which file is which. The key (here, file1) must be the same as the name of the uploaded file field. The value can be any string, as long as it\u2019s unique to that file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Understanding the API response<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The API sends back a JSON response with one entry for each image. The most important field is Status, which has a Code and a Message:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Code 2<\/strong>: the image is processed, and the download link is in the response.<\/li>\n\n\n\n<li><strong>Code 1<\/strong>: the image was scheduled for processing, but it\u2019s not ready yet. Send the same request again after a few seconds.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Background removal is more demanding than regular compression, so it can take longer. Seeing code 1 from time to time is normal. Just send the same request again after a few seconds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you uploaded a file with post-reducer.php and got code 1, don\u2019t upload it again, as it would be processed as a new image. Instead, call reducer.php with the OriginalURL from the first response to check the status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These are the errors you\u2019re most likely to see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>-207<\/strong>: invalid parameters for background removal. Check the bg_remove value.<\/li>\n\n\n\n<li><strong>-401 \/ -402<\/strong>: invalid API key.<\/li>\n\n\n\n<li><strong>-403<\/strong>: your quota is exceeded. You\u2019ll need a bigger plan or an additional package.<\/li>\n\n\n\n<li><strong>-106<\/strong>: the image URL can\u2019t be accessed by ShortPixel\u2019s servers.<\/li>\n\n\n\n<li><strong>-111<\/strong>: the file is too big.<\/li>\n\n\n\n<li><strong>-404<\/strong>: the optimization queue is full. Try again in a minute.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll find the full list in the <a href=\"https:\/\/shortpixel.com\/api-docs\">API documentation<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A few tips for working with many images<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Send images in batches.<\/strong> With reducer.php you can process up to 100 URLs in a single request.<\/li>\n\n\n\n<li><strong>Use different settings for different images.<\/strong> The paramlist parameter lets you set custom options for each URL in the same request.<\/li>\n\n\n\n<li><strong>Replaced an image but kept the same URL?<\/strong> Add &#8220;refresh&#8221;: 1 so ShortPixel downloads and processes it again. Otherwise, you may get the previously processed version.<\/li>\n\n\n\n<li><strong>Combine tasks.<\/strong> You can remove the background, resize, convert to WebP or AVIF, and upscale the image in a single request.<\/li>\n\n\n\n<li><strong>Keep track of your images.<\/strong> Anything you add to returndatalist comes back unchanged in the response, so you can easily match the results with your own data (a product ID, for example).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Removing backgrounds doesn\u2019t have to be a manual job. With the bg_remove parameter, a single API request does it for you, whether you have one image or thousands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pick the example that fits your project, add your API key, and you\u2019re ready to go. And once your backgrounds are clean, you can use the same API to resize, compress, or upscale your images.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Want to see the results before writing any code?<\/strong><strong><br><\/strong>Try our <a href=\"https:\/\/shortpixel.com\/free-remove-background-image\">free online background remover<\/a>. And if you\u2019re still deciding which service to use, check out our list of the <a href=\"https:\/\/shortpixel.com\/blog\/5-best-background-removal-apis-with-php-examples\/\">best background removal APIs with PHP examples<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>FAQs<\/strong><\/h3>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1791985304874\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Can I replace the background instead of making it transparent?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. Set bg_remove to a hex color like #ffffffff for a solid background, or to an image URL to use that image as the new background.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1791985354465\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Does background removal cost extra?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>No. It\u2019s included in all plans. An optimized image uses 1 credit, with or without background removal, while generating WebP or AVIF versions at the same time uses 3 credits.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1791985375148\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Can I remove the background from images stored on my computer?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. Use the post-reducer.php endpoint to upload the files with your request.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1791985384681\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>How many images can I process in one request?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>With reducer.php, you can send up to 100 URLs per request.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1791985403730\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>What does status code 1 mean?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>It means the image was scheduled for processing, but it isn\u2019t ready yet. Send the same request again after a few seconds to get the result. You can also increase the wait parameter (up to 30 seconds) so the API waits longer before responding.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1791985414530\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Can I use the API key directly in my website\u2019s JavaScript?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>It\u2019s not a good idea, because anyone can see and copy it. Make the API calls from your server instead.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1791985427547\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>What happens if I send an invalid<\/strong> <strong>bg_remove<\/strong> <strong>value?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The API returns error code -207, which means invalid parameters for background removal.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<div class=\"wp-block-group has-border-color has-palette-color-4-border-color has-palette-color-6-background-color has-background is-vertical is-content-justification-left is-layout-flex wp-container-core-group-is-layout-02a0377d wp-block-group-is-layout-flex\" style=\"border-width:1px;border-radius:20px;margin-top:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--60);padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)\">\n<h3 id=\"cta-heading\" class=\"wp-block-heading\" style=\"margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\"><strong>Remove image backgrounds for free!<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Easily remove backgrounds, optimize your pictures and generate WebP\/AVIF in bulk using the ShortPixel API<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/shortpixel.com\/api-docs\" target=\"_blank\" rel=\"noreferrer noopener\">Get Started<\/a><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Removing the background from one photo is quick. Removing it from hundreds of product photos is not. That\u2019s where an API comes in. With the ShortPixel API, background removal comes down to adding the bg_remove parameter to a standard optimization request. You can make the background transparent, swap it for a solid color, or place [&hellip;]<\/p>\n","protected":false},"author":37,"featured_media":15022,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[11],"tags":[],"class_list":["post-15020","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-image-optimization"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts\/15020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/comments?post=15020"}],"version-history":[{"count":1,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts\/15020\/revisions"}],"predecessor-version":[{"id":15021,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts\/15020\/revisions\/15021"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/media\/15022"}],"wp:attachment":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/media?parent=15020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/categories?post=15020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/tags?post=15020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}