AI Image Deblur API

Version 2.197 (Release Notes ↗)

AI Image Deblurring and Photo Restoration

The PixLab Image Deblur API (DEBLUR) reduces motion blur and camera shake in photographs with one REST request. Upload a JPEG, PNG, or WebP image or provide its public URL. The processed image preserves the original width, height, and aspect ratio.

Image deblurring estimates clearer detail from blurred visual information. It differs from sharpening, which increases contrast around existing edges. To enlarge a photo instead, use the Image Upscale and Enhancement API.

Built for developers supporting marketing teams, ecommerce businesses, and creative agencies, DEBLUR brings photo restoration into existing publishing workflows. Call it from your backend to process campaign photography, supplier images, property listings, or customer uploads before review and publication. Python, JavaScript, PHP, and Ruby examples are included below.

Compare motion blur with clearer window edges, brickwork, and bicycle detail in the same scene. This is an illustrative comparison, not an API output sample; actual results depend on the source photo.

Motion Blur
Townhouse and bicycle with camera-shake blur softening window frames and brickwork
Clear Detail
Matching townhouse scene with defined window frames, bicycle spokes, and paving details

What DEBLUR provides:

  • A REST endpoint for backend services, automation workers, and scheduled jobs. No SDK is required.
  • Motion-blur reduction without a client-generated image mask.
  • Restoration at the original image dimensions, without cropping the scene.
  • Input through a public image URL or direct file upload, with output as Base64 JSON data, raw image bytes, or a file in your connected AWS S3 bucket.
  • JPEG, PNG, and WebP inputs up to 4,000,000 pixels and 10 MiB. Larger inputs are rejected rather than silently resized.

Bulk photo deblurring for catalogs and campaign libraries

Connect DEBLUR to your product information management (PIM), content management (CMS), or digital asset management (DAM) system through your own application. Each request processes one image. Queue catalog imports and campaign assets with bounded concurrency, within your account limits. For sustained high-volume processing, contact the PixLab support team with your daily volume and typical image dimensions.

Image deblurring for marketing, ecommerce, and real estate

  • Marketing teams: reduce camera shake in event photos, lifestyle imagery, and campaign assets before preparing social media posts, email newsletters, and landing pages.
  • Ecommerce and marketplaces: restore blurred supplier and seller photos for product detail pages and catalogs. Review labels, colors, and product features against the original before publishing.
  • Creative and digital agencies: add a photo-restoration step to client asset intake and content production, with an approval stage for brand-sensitive imagery.
  • Real estate and hospitality: reduce motion blur in property interiors, exterior views, and accommodation photos without changing their proportions.
  • SaaS and photo-editing tools: integrate image deblurring into upload flows and editing applications using the same REST request pattern.
  • Publishers and media archives: process scanned photographs and extracted video frames when reshooting is not possible, retaining the source for editorial review.

Output quality depends on the source image. Severe blur, compression, and missing detail can prevent faithful restoration. Keep the original and review faces, lettering, and repeated patterns before publishing the result.

Image processing and storage: Keep your source images for comparison. With a connected AWS S3 bucket, output can be written to your own storage. Review the PixLab Privacy Policy for processing and retention details.

To get started, create an API key in the PixLab Console ↗, submit a public image URL or upload a file, and consume the returned image data. See the Python, JavaScript, PHP, and Ruby samples below ↓.

Build a complete product-photo workflow with the Background Removal API for subject isolation and the Image Upscale API for larger gallery images. For authorized cleanup of text overlays on marketing assets, use the Text and Watermark Removal API.

Image Deblur API Pricing

PixLab offers monthly API plans for developers and businesses. Check your account for DEBLUR usage and rate limits before processing a large image collection.

  • Starter: Review the current monthly allowance and account limits for your integration.
  • Pro: Compare the available quota and throughput options as your image workload grows.
  • Business and Enterprise: High-volume options for larger workloads, support, and dedicated deployment discussions.

Plan your workload: each DEBLUR request processes one image. Account for daily volume and peak concurrency when choosing a plan.

Review the current PixLab monthly API plans → or open the PixLab Console ↗ to check your usage and account limits.

HTTP Methods

GET, POST

Use GET with a public image URL or POST to upload a local file. Each request processes one source image.

HTTP Parameters

Required

Fields Type Description
img URL Public URL of the image to deblur. To upload a local image directly from your application, send a multipart/form-data POST request instead. See POST Request Body.
key String Your PixLab API key ↗. You may send the key in the WWW-Authenticate HTTP header instead of this parameter.

Optional

Fields Type Description
compress Boolean JPEG outputs are compressed by default to reduce transfer size; PNG outputs remain lossless. Set this field to false to disable JPEG compression.
blob Boolean By default, DEBLUR returns a JSON object containing the Base64-encoded output image or a link to the result in your connected AWS S3 bucket. Set this parameter to true to return the raw image bytes instead. See HTTP Response ↓ and the code samples for details.

POST Request Body

Use POST to upload a local image in the file field or submit a public image URL as JSON. JPEG, PNG, and WebP inputs must not exceed 4,000,000 pixels or 10 MiB. No image mask or prompt is required.

Supported content types:

  • multipart/form-data
  • application/json

Use multipart/form-data to upload an image directly from your application; see the PixLab GitHub repository ↗ for a working example. For application/json, the image must already be available by URL. You can call the STORE endpoint first when temporary upload storage is needed.

HTTP Response

application/json

By default, DEBLUR returns a JSON object containing the Base64-encoded output image. If your AWS S3 bucket is connected through the PixLab Console ↗, the response can provide a direct link to the result in your bucket instead. When the blob parameter is set to true, the endpoint returns the raw image bytes rather than JSON.

Fields Type Description
status Integer HTTP 200 indicates success. Any other code indicates failure.
imgData Base64 Data Base64 encoded string of the output image data.
mimeType String MIME type of the output image, such as image/png.
extension String File extension of the output image, such as png or jpeg.
link URL Direct link to the output image in your own AWS S3 bucket, when S3 storage is connected through the PixLab Console ↗. This field is returned instead of imgData.
error String Error description when status != 200.
blob BLOB Raw image data returned instead of a JSON object when the blob parameter is set to true.

Code Samples


import base64
import os
from pathlib import Path

import requests

with open("photo.jpg", "rb") as image:
    response = requests.post(
        "https://api.pixlab.io/deblur",
        headers={"WWW-Authenticate": os.environ["PIXLAB_API_KEY"]},
        files={"file": ("photo.jpg", image, "image/jpeg")},
        timeout=(10, 120),
    )

response.raise_for_status()
result = response.json()
if result.get("status") != 200:
    raise RuntimeError(result.get("error", "Image processing failed"))

if result.get("link"):
    print("Image URL:", result["link"])
else:
    extension = result["extension"]
    if extension not in {"png", "jpeg", "jpg", "webp"}:
        raise ValueError("Unexpected output format")
    output = Path(f"deblur-output.{extension}")
    output.write_bytes(base64.b64decode(result["imgData"], validate=True))
    print(output)

Frequently Asked Questions

How do I deblur an image with the PixLab API?

Send a file upload or a public image URL to DEBLUR with your API key. No image mask is needed. Retrieve your key from the PixLab Console ↗.

What image formats and sizes are supported?

The API accepts JPEG, PNG, and WebP inputs up to 4,000,000 pixels and 10 MiB. Larger images are rejected rather than silently resized. Deblurring preserves the original dimensions. For enlargement, use the Image Upscale API →.

Can the API restore every blurry photo?

No. Severe blur, missing detail, and heavy compression can prevent faithful restoration. Keep the source image and review lettering, faces, and fine patterns. A clearer-looking result is not proof that every detail is correct.

Where can I check pricing and processing limits?

Check your account usage and rate limits in the PixLab Console. Submit one image per request and use bounded concurrency for bulk workloads. Review PixLab API pricing for subscription options.

How can the API return the processed image?

The endpoint can return Base64-encoded image data in JSON, raw image bytes when blob=true, or a direct link to output stored in your connected AWS S3 bucket.

Can marketing and ecommerce teams automate bulk photo deblurring?

Yes. Your developer can integrate DEBLUR into a product catalog, content management system, or digital asset workflow using one image per request. Queue images and keep concurrency within your account limits. Review product labels, brand elements, and important details before using restored photos in listings or campaigns.

← Return to API Endpoint Listing