API methods
The API address is https://deep-image.ai/rest_api/
There are two methods for the scheduling image processing and one for retrieving the results. With "process_result" method, image can be processed and if the result is available during 25 seconds, the url to the result will be returned. The second method - "process" - always schedules a processing job and the user has to wait for the result with "result" method.
Processing methods supports both form-data and json content types.
It's convenient method that returns the url to the result immediately if the processing time is less than 25 seconds. Otherwise it will return a job hash and the result will be available via "result" method.
API KEY
The URL of the input image
https://deep-image.ai/api-example.png
The desired width of the output image
300
The desired height of the output image
400%
The desired output format of the image
The desired output image quality
85
The maximum file size of the output image for JPEG or WEBP formats
10MB
Job processed successfuly
Error messages include 'Email has not been confirmed', 'User does not have access to this application', 'No such application'
Error messages include 'No x-api-key header is provided', 'No x-application-name header is provided', 'No more requests are available. Next requests available DATE'
Error messages include 'No user found for provided token', 'No plan found PLAN_NAME'
API rate limit has been reached
POST /rest_api/process_result HTTP/1.1
Host:
X-API-KEY: text
Content-Type: application/json
Accept: */*
Content-Length: 489
{
"url": "https://deep-image.ai/api-example.png",
"background": {
"remove": "auto",
"color": "#FFFFFF"
},
"width": 300,
"height": 300,
"enhancements": [
"denoise",
"light",
"color"
],
"light_parameters": {
"type": "hdr_light_advanced",
"level": 0.8
},
"color_parameters": {
"type": "hdr_light_advanced",
"level": 0.5
},
"output_format": "jpg",
"caption": {
"url": "http://ain.teonite.net/neuroapi-store/2023-02-07/d9a91e2e-9843-4d85-ae1a-e7baefc87746.png",
"position": "RB",
"target_width_percentage": 25,
"padding": 20,
"opacity": 85
}
}
{
"status": "complete",
"job": "44d46e9a-c3d5-11ed-af64-0242ac1f000f",
"result_url": "https://deep-image.ai/images/2023-03-16/2c29a22b-8ebd-461a-89b0-5feb3a33e2b1.jpg"
}
Schedules image processing job
API KEY
The URL of the input image
https://deep-image.ai/api-example.png
The desired width of the output image
300
The desired height of the output image
400%
The desired output format of the image
The desired output image quality
85
The maximum file size of the output image for JPEG or WEBP formats
10MB
Job scheduled successfuly
Error messages include 'Email has not been confirmed', 'User does not have access to this application', 'No such application'
Error messages include 'No x-api-key header is provided', 'No x-application-name header is provided', 'No more requests are available. Next requests available DATE'
Error messages include 'No user found for provided token', 'No plan found PLAN_NAME'
API rate limit has been reached
POST /rest_api/process HTTP/1.1
Host:
X-API-KEY: text
Content-Type: application/json
Accept: */*
Content-Length: 489
{
"url": "https://deep-image.ai/api-example.png",
"background": {
"remove": "auto",
"color": "#FFFFFF"
},
"width": 300,
"height": 300,
"enhancements": [
"denoise",
"light",
"color"
],
"light_parameters": {
"type": "hdr_light_advanced",
"level": 0.8
},
"color_parameters": {
"type": "hdr_light_advanced",
"level": 0.5
},
"output_format": "jpg",
"caption": {
"url": "http://ain.teonite.net/neuroapi-store/2023-02-07/d9a91e2e-9843-4d85-ae1a-e7baefc87746.png",
"position": "RB",
"target_width_percentage": 25,
"padding": 20,
"opacity": 85
}
}
{
"job": "44d46e9a-c3d5-11ed-af64-0242ac1f000f"
}
Returns account details including credits, username, email, API key, language preference, webhook settings, and billing address.
Successful retrieval of user account details.
GET /rest_api/me HTTP/1.1
Host: deep-image.ai
X-API-KEY: YOUR_API_KEY
Accept: */*
Successful retrieval of user account details.
{
"credits": 3872,
"username": "John Doe",
"email": "[email protected]",
"api_key": "xxxx",
"language": "en",
"webhooks": {},
"address": {
"tax": 277021597,
"companyName": "test",
"streetAddress": "test",
"city": "test",
"postalCode": 55555,
"country": "DE",
"countryName": "Germany",
"isCompany": true
}
}
Returns processing result
Not Found
Job Processing Failed
Unexpected Error
GET /rest_api/result/{hash} HTTP/1.1
Host: deep-image.ai
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"status": "complete",
"result_url": "https://neuroapi-store.s3.eu-central-1.amazonaws.com/2024-03-07/d894c96a-0dda-46cd-9197-10c596f7e27c.jpg",
"job": "a8784c00-dc6b-11ee-ad50-9ec3ba0205c0"
}
Delete result information
Not Found
Job Processing Failed
Unexpected Error
DELETE /rest_api/result/{hash} HTTP/1.1
Host: deep-image.ai
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"message": "Images of job xxx has been removed."
}
Last updated