apyhub

Retouching and Object Removal from Image API

What it does

Image Inpainting lets you remove masked objects or blemishes from an image and get a reconstructed version back. Send a source image plus a black-and-white mask image, and the service fills in the masked regions based on the surrounding pixels.

Use the method query parameter to choose the inpainting algorithm: telea or ns. You can also set radius to control how far the fill reaches, from 1 to 25, with a default of 5. The input image can be up to 20 MB.

The response is a binary image file, so it fits directly into workflows that need cleaned-up assets without manual retouching. Common uses include removing logos, fixing small defects, deleting stray objects from product photos, and preparing images for publishing or archival.

POST
Remove masked objects or blemishes
http://localhost:8080/dosvak/inpaint

QUICKSTART

GUIDE

Quickstart

Inpaint an image by uploading the source image and mask file, using the default telea method.

curl -X POST "http://localhost:8080/dosvak/inpaint" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/source-image.png" \
  -F "mask=@/path/to/mask.png" \
  -F "method=telea" \
  -F "radius=5"

What you'll get back

Returns a binary file (string with format: binary) — the inpainted image result.

<binary image data>
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*
Source image
Black/white mask image; non-black pixels are removed

About this endpoint

What it does

Removes masked areas from an uploaded image by taking a source image and a black/white mask image, then returning the processed image as binary output.

Query Parameter(s)

AttributeTypeMandatoryDescription
methodStringNoInpainting method. Allowed values: telea, ns. Default: telea.
radiusIntegerNoRadius used by the inpainting algorithm. Minimum: 1, maximum: 25. Default: 5.

Request Body

ParameterTypeMandatoryDescription
fileStringYesSource image. Binary file upload. Max size: 20 MB.
maskStringYesBlack/white mask image. Binary file upload; non-black pixels are removed.

Response

Returns a binary file as the processed image. The output schema is a binary string, so the success response is not a JSON object and does not include named JSON fields.

Query parameters

Name
Type
Description
methodOPTIONAL
string
telea · ns
DEFAULT telea
radiusOPTIONAL
integer
DEFAULT 5

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.