This endpoint colorizes a grayscale image provided by its URL.
POST /capix/colorizer/colorize/v1/
{
"image_url": "https://w0.peakpx.com/wallpaper/300/84/HD-wallpaper-vintage-view-of-old-main-street-trolleys-grayscale-town-tracks-street-vintage.jpg"
}
The response will contain the colorized version of the input image.
curl -X 'POST' \
'https://api.magicapi.dev/api/v1/capix/colorizer/colorize/v1/' \
-H 'accept: application/json' \
-H 'x-magicapi-key: API_KEY' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'image_url=IMAGE_URL'
import requests
headers = {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/x-www-form-urlencoded',
}
data = {
'image_url': 'IMAGE_URL',
}
response = requests.post('https://api.magicapi.dev/api/v1/capix/colorizer/colorize/v1/', headers=headers, data=data)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/capix/colorizer/colorize/v1/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'x-magicapi-key: API_KEY',
'Content-Type: application/x-www-form-urlencoded',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'image_url=IMAGE_URL');
$response = curl_exec($ch);
curl_close($ch);
import axios from 'axios';
const response = await axios.post(
'https://api.magicapi.dev/api/v1/capix/colorizer/colorize/v1/',
new URLSearchParams({
'image_url': 'IMAGE_URL'
}),
{
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY'
}
}
);
fetch('https://api.magicapi.dev/api/v1/capix/colorizer/colorize/v1/', {
method: 'POST',
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY'
},
body: new URLSearchParams({
'image_url': 'IMAGE_URL'
})
});