Coming soon

Colorize

Add natural colours to a black-and-white photo
POST
/v1/ai/enhancement/colorize

About this tool

This tool is meant to add colours to a black-and-white photo. It is not switched on yet, because no model that keeps the picture faithful has passed our checks. If you try it now, you will see a message that it is not available. You can still choose the strength and the picture format for when it opens.
For example, you want to bring an old black-and-white family photo to life with colour.

How to use it

  1. Choose this tool.
  2. Add your photo with Upload or drag and drop.
  3. Optionally set how strong the effect should be and the picture format of the result.
  4. Press Generate.
  5. Download the result when the tool becomes available.

What you get back

For now you will see a message that the tool is not available yet. When it opens, you will get a new coloured picture to download.
TEST IT LIVE

Try Colorize in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
AI
Plan
Not in a plan yet
Method
POST
Endpoint
/v1/ai/enhancement/colorize
Tool ID
ai.enhancement.colorize
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Ai
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/ai/enhancement/colorize" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'files=@document.pdf' \
  -F 'on_unsupported=error' \
  -F 'strength=low' \
  -F 'output_format=png'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.ai.enhancement.colorize({
    "files": 'document.pdf',
    "on_unsupported": "error",
    "strength": "low",
    "output_format": "png"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->ai()->enhancement()->colorize([
    'files' => 'document.pdf',
    'on_unsupported' => 'error',
    'strength' => 'low',
    'output_format' => 'png',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Colorize black-and-white photos. **Currently returns 501 feature_unavailable**: No dedicated image-enhancement model is available through the provider, and general image-generation models regenerate pixels rather than faithfully enhancing them. The feature is enabled only after a model passes the fidelity benchmark.

Classification: ai. Deterministic stages: upload content sniffing, input normalisation (Sharp), output validation (Sharp), fidelity check against the input (Sharp).

Colorize works from text and settings, so no file is needed. Every input is optional.

Colorize is not part of a plan yet. It is being prepared and will appear in the plans when it is ready.

Send a POST request to /v1/ai/enhancement/colorize with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.