apyhub

Portrait Photo Enhancement API

What it does

Portrait Beauty Enhancement takes a portrait image, applies image adjustments, and returns the enhanced image as binary output. Send a file in the request body, and tune contrast, smoothing, and brightness through query parameters.

Use it when you need consistent portrait retouching in an app or workflow: for example, improving profile photos, standardizing headshots before upload, or giving users a simple image polish step without manual editing. The request accepts one binary file in the body, with optional contrast, smoothing, and brightness values. Contrast ranges from 0.8 to 1.4, smoothing from 0 to 1, and brightness from 0.8 to 1.3.

The response is a binary image, so you can store it, pass it to another processing step, or return it directly to the client. It is a focused portrait enhancement endpoint rather than a general photo editor, which makes it easier to slot into media upload, avatar creation, and identity-style image pipelines.

POST
Apply portrait beauty enhancement
https://api.eu.apyhub.com/dosvak/portrait-beauty-enhancement

QUICKSTART

GUIDE

Quickstart

Upload a portrait image to enhance it with the default settings.

curl -X POST "https://api.eu.apyhub.com/dosvak/portrait-beauty-enhancement?contrast=1.04&smoothing=0.36&brightness=1.03" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/portrait.jpg"

What you'll get back

Returns a binary file (string with format: binary) containing the enhanced image. There is no JSON wrapper in the response.

<enhanced portrait image bytes>
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*
Portrait image

About this endpoint

What it does

Applies portrait beauty enhancement to an uploaded portrait image. The request sends a binary image file and optional tuning parameters, and the endpoint returns a binary file as the enhanced result.

Query Parameter(s)

AttributeTypeMandatoryDescription
contrastNumberNoControls contrast. Default: 1.04. Allowed range: 0.8 to 1.4.
smoothingNumberNoControls smoothing. Default: 0.36. Allowed range: 0 to 1.
brightnessNumberNoControls brightness. Default: 1.03. Allowed range: 0.8 to 1.3.

Request Body

ParameterTypeMandatoryDescription
fileStringYesPortrait image file. Binary upload. Max size: 20 MB.

Response

Returns a binary file (string with binary format) containing the enhanced portrait image.

Query parameters

Name
Type
Description
contrastOPTIONAL
number
DEFAULT 1.04
smoothingOPTIONAL
number
DEFAULT 0.36
brightnessOPTIONAL
number
DEFAULT 1.03

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.