apyhub
FILE CONVERSION

Convert Image to Cartoon API

What it does

Cartoonize Image turns an uploaded image into a cartoon-style PNG. Send a binary image file and get a transformed image back, ready for use in avatars, profile assets, marketing graphics, or playful product mockups.

Use the mode query parameter to choose the visual treatment: stylized, soft, classic, or poster. Fine-tune the look with detail, color_smooth, and edge_strength to control how much texture is preserved, how flat the colours become, and how bold the outlines appear.

The input accepts a single image file up to 20 MB in the request body. The response is a binary PNG, so it fits cleanly into pipelines that store, forward, or display generated images without extra parsing.

Cartoonize Image is a good fit for apps that generate shareable avatars, e-commerce visuals, or lightweight image effects where you need a consistent cartoon render from user-uploaded photos.

POST
Convert an image into a cartoon-style PNG
https://api.eu.apyhub.com/dosvak/cartoonize-image

QUICKSTART

GUIDE

Quickstart

Upload an image to cartoonize it using the default stylized mode.

curl -X POST "https://api.eu.apyhub.com/dosvak/cartoonize-image?mode=stylized&detail=7&color_smooth=7&edge_strength=0.16" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg"

What you'll get back

Returns a binary file (string with format: binary) as the cartoonized image response.

(binary file)
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

Converts an uploaded image into a cartoon-style PNG. You send the source image file in the request body and can tune the cartoonization with query parameters; the response is the generated PNG as binary data.

Query Parameter(s)

AttributeTypeMandatoryDescription
modeENUMNoCartoon style mode. Allowed values: stylized, soft, classic, poster. Default: stylized.
detailIntegerNoDetail level. Minimum: 3, maximum: 11. Default: 7.
color_smoothIntegerNoColor smoothing level. Minimum: 1, maximum: 12. Default: 7.
edge_strengthNumberNoEdge strength. Minimum: 0, maximum: 1. Default: 0.16.

Request Body

ParameterTypeMandatoryDescription
fileStringYesImage file. Binary file upload. Maximum size: 20 MB.

Response

Returns binary data: the generated PNG image. The output schema is a binary string, so there is no JSON wrapper or response field structure to parse.

Query parameters

Name
Type
Description
modeOPTIONAL
string
stylized · soft · classic · poster
DEFAULT stylized
detailOPTIONAL
integer
DEFAULT 7
color_smoothOPTIONAL
integer
DEFAULT 7
edge_strengthOPTIONAL
number
DEFAULT 0.16

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.