Skip to main content

Upscaler

This is one of our best upscaling pipelines, keeping the original composition intact while adding depth and clarity to an image.


import requests
import json

url = "https://api.imagepipeline.io/upscaler/v1"
headers = {
"API-Key": "Your API Key",
"Content-Type": "application/json"
}
data = {
"input_image": "https://example.com/image.jpg",
"direct_link": true,
"prompt": "Enhance image quality with more details",
"server_id": "optional-server-id",
"type": "deblur",
"webhook": "https://example.com/webhook",
"batch_id": "batch-123",
"file_prefix": "enhanced_",
"queued_image_urls": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())

JSON Parameters

ParameterTypeNotes
input_imagestringrequired. Public URL for the initial image.
direct_linkbooleanOptional. Fetches the friendly URL in PNG format.
promptstringrequired. Description of the enhancement or changes you want to apply to the image.
server_idstringOptional. Provide a server ID to use an enterprise subscription or for load-balancing.
typestringOptional. Choose between deblur and variation. Default is deblur.
webhookstringURL where the generated image will be sent.
batch_idstringAdds a batch ID for the image generation request.
file_prefixstringAdds a prefix to the generated files.
queued_image_urlsbooleanReturns the links of the images prematurely. The link will have the image once the task is run successfully.

Status

Your response will include a status.

  • If the status = SUCCESS, you will also have download_urls that will have the links to your generated image based on the number of samples you have entered. The maximum number of samples that can be generated is 2.
  • If the status = PENDING, you will receive an id. You can use the status endpoint to fetch your image using the id.
  • If the status = FAILURE, you will receive only an error message.

Endpoint: [GET]

  • https://api.imagepipeline.io/upscaler/v1/status/{{id}}

Pass the API-Key as the authorization in the header.