apyhub
ARTIFICIAL INTELLIGENCE · IMAGE PROCESSING

Detect Image Blur API

What it does

Image Blur Detection checks whether an uploaded image is blurry and returns a sharpness score based on Laplacian variance. Send a binary image file, and you get back a boolean blur result plus the values used to make that decision.

Use it when you need to reject low-quality uploads, flag out-of-focus product photos, or gate images before OCR and downstream vision workflows. The response includes blurry, the numeric threshold, a confidence level of low, medium, or high, and laplacian_variance so you can inspect how sharp the image is. Higher Laplacian variance means a sharper image, and the threshold is 100.

This is a straightforward validation step for image pipelines: check capture quality before storage, surface feedback to users, or route blurry images for retake instead of processing them further.

POST
Detect image blur using Laplacian variance and return a sharpness score
https://api.eu.apyhub.com/dosvak/detect-image-blur

QUICKSTART

GUIDE

Quickstart

Upload an image file to check whether it appears blurry.

curl -X POST "https://api.eu.apyhub.com/dosvak/detect-image-blur" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg"

What you'll get back

Returns a JSON object with these top-level fields: blurry boolean, threshold integer, confidence string (low, medium, or high), and laplacian_variance number. blurry indicates whether the image is considered blurry; laplacian_variance is higher for sharper images, with a threshold of 100.

{
  "blurry": false,
  "threshold": 100,
  "confidence": "high",
  "laplacian_variance": 243.7
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Uploads an image file and analyzes it for blur using Laplacian variance. The response returns a JSON object with blur classification and supporting metrics.

Request Body

ParameterTypeMandatoryDescription
fileStringYesBinary image file to analyze.

Response

Returns a JSON object with four fields: blurry as a boolean, threshold as an integer, confidence as a string enum, and laplacian_variance as a number. Lower variance indicates a blurrier image; the schema notes that the threshold is 100.

ParameterTypeMandatoryDescription
blurryBooleanNoWhether the image is classified as blurry.
thresholdIntegerNoThe threshold used for blur classification.
confidenceENUMNoConfidence level of the result. Allowed values: low, medium, high.
laplacian_varianceNumberNoThe Laplacian variance score. Higher values indicate a sharper image; the schema notes that the threshold is 100.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.