Quick Start
Rapid integration and API access.
We've developed a seamless transition process for the deployment of the product that will allow you to onboard without stress or delay. Our internal team will work with you to establish a specific timeline for complete deployment and will support you throughout the process.
Get your API keys
Your API requests are authenticated using API key. Any request that doesn't include an API key will return an error.
You need to replace API_KEY variable with your real API KEY from https://deep-image.ai/app/my-profile/api
You can get your API key in your profile after creating an account in Deep-image.ai.
Python library
We also provide python library which simplifies usage of the deep-image.ai API. You can get it here:
https://github.com/deep-image-ai/python-client
Make your first request
The API comes in two flavours: form-data and json.
When sending the image in json request, image can be put into url field and has to be base64 encoded.
Let's see example for denoising, deblurring, enhancing lighting and upscaling to width equals 2000px.
curl --request POST \
--url https://deep-image.ai/rest_api/process_result \
--header 'content-type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{
"url": "https://deep-image.ai/api-example.png",
"enhancements": ["denoise", "deblur", "light"],
"width": 2000
}'
curl --request POST
--url https://deep-image.ai/rest_api/process_result \
--header 'content-type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{
"url": "base64,UklGRl4UAABXRUJQVlA4WAoAAAAsAAAAPwAAPwAASUNDUKACAAAAAAKgbGNtcwRAAABtbnRyUkdCIFhZWiAH6AADAAwADgAdADVhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1kZXNjAAABIAAAAEBjcHJ0AAABYAAAADZ3dHB0AAABmAAAABRjaGFkAAABrAAAACxyWFlaAAAB2AAAABRiWFlaAAAB7AAAABRnWFlaAAACAAAAABRyVFJDAAACFAAAACBnVFJDAAACFAAAACBiVFJDAAACFAAAACBjaHJtAAACNAAAACRkbW5kAAACWAAAACRkbWRkAAACfAAAACRtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACQAAAAcAEcASQBNAFAAIABiAHUAaQBsAHQALQBpAG4AIABzAFIARwBCbWx1YwAAAAAAAAAB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0OjAzOjEzVDE0OjE2OjIzKzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNDowMzoxM1QxNDoxNjoyMyswMTowMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDpjaGFuZ2VkPSIvIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjY2MTk5YzNhLWM1YTItNGI1ZS04NGMyLTQ4NGU4NDI1NTk3YSIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iR2ltcCAyLjEwIChMaW51eCkiIHN0RXZ0OndoZW49IjIwMjQtMDMtMTNUMTQ6MTY6MzErMDE6MDAiLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4=",
"enhancements": ["denoise", "deblur", "light"],
"width": 2000
}'
curl --location \
--request POST \
--url https://deep-image.ai/rest_api/process_result \
--header 'x-api-key: API_KEY' \
--form 'file=@"LOCAL_FILE_PATH"' \
--form parameters="{\"width\": 1000}"
const axios = require('axios');
// API endpoint
const apiUrl = 'https://deep-image.ai/rest_api/process_result';
// Request headers
const headers = {
'Content-Type': 'application/json',
'X-API-Key': 'API_KEY', // Replace 'API_KEY' with your actual API key
};
// Request data
const requestData = {
enhancements: ['denoise', 'deblur', 'light'],
url: 'https://deep-image.ai/api-example.png',
width: 2000,
};
// Make POST request using Axios
axios.post(apiUrl, requestData, { headers })
.then(response => {
console.log('Response:', response.data);
})
.catch(error => {
console.error('Error:', error.message);
});
import time
import json
from pathlib import Path
from urllib.request import urlretrieve
# using requests library
import requests
API_KEY = REPLACE_WITH_YOUR_API_KEY
headers = {
'x-api-key': API_KEY,
}
data = {
"enhancements": ["denoise", "deblur", "light"],
"width": 2000
}
data_dumped = {"parameters": json.dumps(data)}
with open(YOUR_LOCAL_FILE_TO_SEND, 'rb') as f:
response = requests.post('https://deep-image.ai/rest_api/process_result', headers=headers,
files={'image': f},
data=data_dumped)
if response.status_code == 200:
response_json = response.json()
if response_json.get('status') == 'complete':
p = Path(response_json['result_url'])
urlretrieve(response_json['result_url'], p.name)
elif response_json['status'] in ['received', 'in_progress']:
while response_json['status'] == 'in_progress':
response = requests.get(f'https://deep-image.ai/rest_api/result/{response_json["job"]}',
headers=headers)
response_json = response.json()
time.sleep(1)
if response_json['status'] == 'complete':
p = Path(response_json['result_url'])
urlretrieve(response_json['result_url'], p.name)
import os
import deep_image_ai_client
configuration = deep_image_ai_client.Configuration(
host="https://deep-image.ai"
)
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
with deep_image_ai_client.ApiClient(configuration) as api_client:
api_instance = deep_image_ai_client.DefaultApi(api_client)
process_payload = {
"url": "https://deep-image.ai/api-example.png",
"enhancements": ["denoise", "deblur", "light"],
"width": 2000
}
api_response = api_instance.rest_api_process_result_post(process_payload)
All data examples in this documentation are JSON based. You can replace above JSON data with that ones from the examples.
Last updated