Introducing

Genius Images sparkle

Genius images have more detail, more artistic quality, and follow your instructions in the prompt better than ever before!

A dolphin surfing a wave on a bike using a phone with a hat on
Exclusively for our DeepAI PRO Members. Join today.

Image Colorizer

Add color to old family photos and historic images, or bring an old film back to life with colorization.



API Docs
Recently generated images:
View All Images →

Image Colorizer API Documentation

Pricing: $5 per 100 API calls, or $5 per 500 for DeepAI Pro subscribers

Image Colorizer cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/colorizer 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/colorizer 

Image Colorizer Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/colorizer', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "YOUR_IMAGE_URL",
        })
    });
    
    const data = await resp.json();
    console.log(data);
})()


// Example posting file picker input image (Browser only):
document.getElementById('yourFileInputId').addEventListener('change', async function() {
       const formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/colorizer', {
           method: 'POST',
           headers: {
               'api-key': 'YOUR_API_KEY'
           },
           body: formData
       });

       const data = await resp.json();
       console.log(data);
});

// Example posting a local image file (Node.js only):
const fs = require('fs');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

       const resp = await fetch('https://api.deepai.org/api/colorizer', {
           method: 'POST',
           headers: {
               'api-key': 'YOUR_API_KEY'
           },
           body: formData
       });

       const data = await resp.json();
       console.log(data);
});

Image Colorizer Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/colorizer",
    data={
        'image': 'YOUR_IMAGE_URL',
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())


# Example posting a local image file:

import requests
r = requests.post(
    "https://api.deepai.org/api/colorizer",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Image Colorizer Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => 'YOUR_IMAGE_URL',
    }
)
puts r


# Example posting a local image file:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

Please sign up or login with your details

Forgot password? Click here to reset