Upscaler API
This is a public version of the Upscaler API
This is a public version of the Upscaler API
Operations about enhance images
Lists the images you sent through this API for upscaling, newest first, page by page. Each image shows its state and, when upscaling is finished, the upscaled version.
Page number
Number of results per page. Max: 100
import { request } from 'undici'
const { statusCode, body } = await request('https://api-upscaler.icons8.com/api/v1/enhance_images?page=1&perPage=10&token=YOUR_SECRET_TOKEN', {
headers: {
'Api-Key': 'YOUR_SECRET_TOKEN'
}
})
{
"total": 3,
"images": [
{
"id": "5f6cea5d1744ceffd92c7a28",
"enhancement": 2,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": null,
"status": 0,
"statusName": "queue"
},
{
"id": "5f6c73741744cea26cb2e5f0",
"enhancement": 2,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": null,
"status": 1,
"statusName": "processing"
},
{
"id": "5f6c73731744cea26cb2e5ec",
"enhancement": 2,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": {
"width": 2048,
"height": 2048,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/143/c5e90f18-a2ae-4084-be5d-875a255f045b.jpg"
},
"status": 2,
"statusName": "ready"
}
]
}Response
Upscales an image that the service downloads from a link to twice its size. The link must lead to a JPEG, PNG or WebP image. The work runs in the background, so the answer comes back at once, without a result. Check the image until it is ready.
import { request } from 'undici'
const { statusCode, body } = await request('https://api-upscaler.icons8.com/api/v1/enhance_image?image_url=&token=YOUR_SECRET_TOKEN', {
headers: {
'Api-Key': 'YOUR_SECRET_TOKEN'
}
})
{
"id": "5f6cea5d1744ceffd92c7a28",
"enhancement": 2,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": null,
"status": 0,
"statusName": "queue"
}Response
Upscales a JPEG, PNG or WebP file that you upload. The work runs in the background, so the answer comes back at once, without a result. Check the image until it is ready.
import { request } from 'undici'
const { statusCode, body } = await request('https://api-upscaler.icons8.com/api/v1/enhance_image?token=YOUR_SECRET_TOKEN', {
method: 'POST',
headers: {
'Content-Type': 'multipart/form-data',
'Api-Key': 'YOUR_SECRET_TOKEN'
},
body: undefined
})
{
"id": "5f6cea5d1744ceffd92c7a28",
"enhancement": 2,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": null,
"status": 0,
"statusName": "queue"
}Response
Shows the state of an image and, when upscaling is finished, the upscaled version. An image waits in the queue, then runs, then ends as ready, as max enhanced when it has reached the largest size the service makes, or as an error. On request, the answer also carries a copy of the result with a watermark. Only the images you sent through this API are found.
import { request } from 'undici'
const { statusCode, body } = await request('https://api-upscaler.icons8.com/api/v1/enhance_image/{id}?with_watermark=false&token=YOUR_SECRET_TOKEN', {
headers: {
'Api-Key': 'YOUR_SECRET_TOKEN'
}
})
{
"id": "5f6cea5d1744ceffd92c7a28",
"enhancement": 2,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": {
"width": 2048,
"height": 2048,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/143/c5e90f18-a2ae-4084-be5d-875a255f045b.jpg"
},
"status": 2,
"statusName": "ready"
}Response
Upscales an image once more, starting from its latest upscaled version, so each pass makes it larger. The pass runs in the background; until it is finished, the image still shows the previous result. An image that has reached 7680 pixels on a side cannot be upscaled again.
import { request } from 'undici'
const { statusCode, body } = await request('https://api-upscaler.icons8.com/api/v1/enhance_image/{id}?token=YOUR_SECRET_TOKEN', {
method: 'POST',
headers: {
'Api-Key': 'YOUR_SECRET_TOKEN'
}
})
{
"id": "5f6cea5d1744ceffd92c7a28",
"enhancement": 4,
"source": {
"width": 1024,
"height": 1024,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/584/32f5e562-bbbb-4d94-937a-f287df4eeb7f.jpg"
},
"enhanced": {
"width": 3000,
"height": 3000,
"type": ".jpg",
"url": "https://images-upscaler.icons8.com/143/c5e90f18-a2ae-4084-be5d-875a255f045b.jpg"
},
"status": 5,
"statusName": "maxEnhanced"
}Response
Deletes an image together with its original and its upscaled version. Only an image in the ready state can be deleted. After the delete, the image can no longer be found.
import { request } from 'undici'
const { statusCode, body } = await request('https://api-upscaler.icons8.com/api/v1/enhance_image/{id}?token=YOUR_SECRET_TOKEN', {
method: 'DELETE',
headers: {
'Api-Key': 'YOUR_SECRET_TOKEN'
}
})
{
"success": true
}Response