apyhub
ARTIFICIAL INTELLIGENCE

Restore and enhance detected face regions API

What it does

Face Restore enhances detected face regions in an image and returns the restored image as binary output. Send a single image file in the request body, and use the optional strength query parameter to control how strongly the face restoration is applied.

Use Face Restore when you need to clean up portraits, profile photos, or scanned images where faces are soft, degraded, or low quality. It is designed for image workflows where you want to improve facial detail without changing the rest of the file structure in your pipeline.

The API accepts one binary file upload up to 20 MB. The response is a binary image, so you can store it, pass it to another image step, or return it directly to a user interface. Because the output is just the restored image file, it fits neatly into automated moderation, media cleanup, and photo enhancement flows.

Tune strength between 0 and 1 to balance subtle enhancement against stronger restoration. Lower values keep the result closer to the original image; higher values apply more aggressive face enhancement.

POST
Restore and enhance detected face regions
http://localhost:8080/dosvak/face-restore

QUICKSTART

GUIDE

Quickstart

Upload an image to restore it with the default strength.

curl -X POST "http://localhost:8080/dosvak/face-restore" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg" \
  -F "strength=0.65"

What you'll get back

Returns a binary file (string with format: binary) containing the restored image.

<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*
Image file

About this endpoint

What it does

Restores and enhances detected face regions in an uploaded image. The endpoint accepts an image file and returns a binary output.

Query Parameter(s)

AttributeTypeMandatoryDescription
strengthNumberNoEnhancement strength from 0 to 1. Default: 0.65.

Request Body

ParameterTypeMandatoryDescription
fileStringYesImage file uploaded as binary. Maximum size: 20 MB.

Response

Returns a binary file as the success response. The output schema is a top-level binary string, so there is no JSON wrapper or named JSON fields in the response.

Query parameters

Name
Type
Description
strengthOPTIONAL
number
DEFAULT 0.65

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.