apyhub
IMAGE PROCESSING

Colorize Image API

What it does

Image Colorizer turns a grayscale or desaturated image into a colorized version. Send a binary image file up to 20 MB, choose a palette, and control how strongly the palette is applied.

The service accepts one required file in the request body. You can set palette to natural, warm, cool, or sepia, and tune strength from 0 to 1. The default palette is natural, and the default strength is 0.72, which gives you a balanced result without overcooking the image.

Use Image Colorizer when you need to restore archived photos, produce stylized variants for editorial work, or create quick visual previews from black-and-white assets. It is useful anywhere you need a color output from a source image without building your own image-processing pipeline.

The response is a binary image, so you can store it, forward it, or pass it into the next step of your workflow.

POST
Colorize a grayscale image with CPU palettes
http://localhost:8080/dosvak/colorize

QUICKSTART

GUIDE

Quickstart

Upload a grayscale or desaturated image to colorize it.

curl -X POST "http://localhost:8080/dosvak/colorize" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.png"

What you'll get back

Returns a binary file (string with format: binary) containing the colorized 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*
Grayscale or desaturated image

About this endpoint

What it does

Colorizes a grayscale or desaturated image using a CPU palette. It takes an uploaded image file and optional palette/strength query parameters, then returns the processed image as a binary response.

Query Parameter(s)

AttributeTypeMandatoryDescription
paletteENUMNoPalette to use for colorization. Allowed values: natural, warm, cool, sepia. Default: natural.
strengthNumberNoColorization strength. Minimum: 0, maximum: 1. Default: 0.72.

Request Body

ParameterTypeMandatoryDescription
fileStringYesGrayscale or desaturated image. Binary file upload. Maximum size: 20 MB.

Response

Returns a binary file response containing the colorized image. The output schema is a binary string, so there is no JSON object wrapper or named response fields.

Query parameters

Name
Type
Description
paletteOPTIONAL
string
natural · warm · cool · sepia
DEFAULT natural
strengthOPTIONAL
number
DEFAULT 0.72

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.