Image Restoration API
The Image Restoration API effortlessly restores and enhances images, revitalizing old or damaged photos with advanced algorithms.
Last updated
curl -X 'POST' \
'https://api.magicapi.dev/api/v1/magicapi/restoration/restoration' \
-H 'accept: application/json' \
-H 'x-magicapi-key: API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"img": IMAGE_URL,
"scale": 0, // default value
"version": "v1.4" // default value
}'import requests
headers = {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/json',
}
data = '{\n "img": IMAGE_URL,\n "scale": 0, // default value\n "version": "v1.4" // default value\n}'
response = requests.post('https://api.magicapi.dev/api/v1/magicapi/restoration/restoration', headers=headers, data=data)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/magicapi/restoration/restoration');
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/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"img\": IMAGE_URL,\n \"scale\": 0, // default value\n \"version\": \"v1.4\" // default value\n}");
$response = curl_exec($ch);
curl_close($ch);import axios from 'axios';
const response = await axios.post(
'https://api.magicapi.dev/api/v1/magicapi/restoration/restoration',
'{\n "img": IMAGE_URL,\n "scale": 0, // default value\n "version": "v1.4" // default value\n}',
{
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/json'
}
}
);fetch('https://api.magicapi.dev/api/v1/magicapi/restoration/restoration', {
method: 'POST',
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/json'
},
body: '{\n "img": IMAGE_URL,\n "scale": 0, // default value\n "version": "v1.4" // default value\n}'
});{
"request_id": REQUEST_ID
}curl -X 'GET' \
'https://api.magicapi.dev/api/v1/magicapi/restoration/predictions/REQUEST_ID' \
-H 'accept: application/json' \
-H 'x-magicapi-key: API_KEY'import requests
headers = {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
}
response = requests.get('https://api.magicapi.dev/api/v1/magicapi/restoration/predictions/REQUEST_ID', headers=headers)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/magicapi/restoration/predictions/REQUEST_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'x-magicapi-key: API_KEY',
]);
$response = curl_exec($ch);
curl_close($ch);import axios from 'axios';
const response = await axios.get('https://api.magicapi.dev/api/v1/magicapi/restoration/predictions/REQUEST_ID', {
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY'
}
});fetch('https://api.magicapi.dev/api/v1/magicapi/restoration/predictions/REQUEST_ID', {
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY'
}
});{
"status": "succeeded",
"result": "RESULT_URL"
}