Get started

Our API is a simple HTTP interface with various options:

  1. Get your API Key.
    Your first 100 API calls per month are on us (see Pricing).
  2. Use the following code samples to get started quickly
  3. Review the reference docs to adjust any parameters

Sample Code

                                            
$ curl -H 'Authorization: Bearer INSERT_YOUR_API_TOKEN_HERE'           \
       -F 'file_image=@/path/to/file.jpg'                              \
       -f https://imageupscaler.com/api/update_image.php?method={method}
                                            
                                        
                                            
// Requires "guzzle" to be installed (see guzzlephp.org)
// If you have problems with our SSL certificate with error 'Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://imageupscaler.com/api/update_image.php?method={method}'
// follow these steps to use the latest cacert certificate for cURL: https://github.com/guzzle/guzzle/issues/1935#issuecomment-371756738

$client = new GuzzleHttp\Client();
$res = $client->post('https://imageupscaler.com/api/update_image.php?method={method}', [
    'multipart' => [
        [
            'file_image' => '/path/to/file.jpg'
        ]
    ],
    'headers' => [
        'Content-Type' => 'multipart/form-data',
        'Authorization' => 'Bearer INSERT_YOUR_API_TOKEN_HERE',
	'User-Agent' => 'Mozilla/5.0'
    ]
]);

$fp = fopen("your_file.png", "wb");
fwrite($fp, $res->getBody());
fclose($fp);
                                            
                                        
                                            
// Requires "Apache HttpComponents" to be installed (see hc.apache.org)

Response response = Request.Post("https://imageupscaler.com/api/update_image.php?method={method}")
    .addHeader("Content-Type", "multipart/form-data")
    .addHeader("Authorization", "Bearer INSERT_YOUR_API_TOKEN_HERE")
    .addHeader("User-Agent", "Mozilla/5.0")
    .body(
        MultipartEntityBuilder.create()
        .addBinaryBody("file_image", new File("/path/to/file.jpg"))
        .build()
    ).execute();
response.saveContent(new File("your_file.png"));
                                            
                                        
                                            
// Requires "axios" and "form-data" to be installed (see https://www.npmjs.com/package/axios and https://www.npmjs.com/package/form-data)
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
const path = require('path');

const inputPath = '/path/to/file.jpg';
const formData = new FormData();
formData.append('file_image', fs.createReadStream(inputPath), path.basename(inputPath));

axios({
  method: 'post',
  url: 'https://imageupscaler.com/api/update_image.php?method={method}',
  data: formData,
  responseType: 'arraybuffer',
  headers: {
    ...formData.getHeaders(),
    'Content-Type': 'multipart/form-data',
    'Authorization': 'Bearer INSERT_YOUR_API_TOKEN_HERE',
    'User-Agent': 'Mozilla/5.0'
  },
  encoding: null
})
.then((response) => {
  if(response.status != 200) return console.error('Error:', response.status, response.statusText);
  fs.writeFileSync("your_file.png", response.data);
})
.catch((error) => {
    return console.error('Request failed:', error);
});
                                            
                                        
                                            
# Requires "requests" to be installed (see python-requests.org)
import requests

response = requests.post(
    'https://imageupscaler.com/api/update_image.php?method={method}',
    files={'file_image': open('/path/to/file.jpg', 'rb')},
    headers={'Authorization': 'Bearer INSERT_YOUR_API_TOKEN_HERE', 'User-Agent': 'Mozilla/5.0'},
)
if response.status_code == requests.codes.ok:
    with open('your_file.png', 'wb') as out:
        out.write(response.content)
else:
    print("Error:", response.status_code, response.text)
                                            
                                        
                                            
// Requires Alamofire 5 to be installed (see https://github.com/Alamofire/Alamofire)

guard let fileUrl = Bundle.main.url(forResource: "file", withExtension: "jpg"),
  let data = try? Data(contentsOf: fileUrl)
else { return false }

struct HTTPBinResponse: Decodable { let url: String }

AF.upload(
  multipartFormData: { builder in
    builder.append(
      data,
      withName: "file_image",
      fileName: "file.jpg",
      mimeType: "image/jpeg"
    )
  },
  to: URL(string: "https://imageupscaler.com/api/update_image.php?method={method}")!,
  headers: [
    "Content-Type": "multipart/form-data",
    "Authorization": "Bearer INSERT_YOUR_API_TOKEN_HERE",
    "User-Agent": "Mozilla/5.0"
  ]
).responseDecodable(of: HTTPBinResponse.self) { imageResponse in
  guard let imageData = imageResponse.data,
    let image = UIImage(data: imageData)
  else { return }

  self.imageView.image = image
}
                                            
                                        
                                            
// Requires AFNetworking to be installed (see https://github.com/AFNetworking/AFNetworking)

NSURL *fileUrl = [NSBundle.mainBundle URLForResource:@"file" withExtension:@"jpg"];
NSData *data = [NSData dataWithContentsOfURL:fileUrl];
if (!data) {
    return;
}

AFHTTPSessionManager *manager =
[[AFHTTPSessionManager alloc] initWithSessionConfiguration:
 NSURLSessionConfiguration.defaultSessionConfiguration];

manager.responseSerializer = [AFImageResponseSerializer serializer];
[manager.requestSerializer setValue:@"multipart/form-data"
                 forHTTPHeaderField:@"Content-Type"];
[manager.requestSerializer setValue:@"Bearer INSERT_YOUR_API_TOKEN_HERE"
                 forHTTPHeaderField:@"Authorization"];
[manager.requestSerializer setValue:@"Mozilla/5.0"
                 forHTTPHeaderField:@"User-Agent"];

NSURLSessionDataTask *dataTask = [manager
      POST:@"https://imageupscaler.com/api/update_image.php?method={method}"
      parameters:nil
      constructingBodyWithBlock:^(id  _Nonnull formData) {
          [formData appendPartWithFileData:data
                                      name:@"file_image"
                                  fileName:@"file.jpg"
                                  mimeType:@"image/jpeg"];
      }
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          if ([responseObject isKindOfClass:UIImage.class] == false) {
              return;
          }

          self.imageView.image = responseObject;
      } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
          // Handle error here
      }];

[dataTask resume];
                                            
                                        
                                            
using (var client = new HttpClient())
using (var formData = new MultipartFormDataContent())
{
    formData.Headers.Add("Content-Type", "multipart/form-data");
    formData.Headers.Add("Authorization", "Bearer INSERT_YOUR_API_TOKEN_HERE");
    formData.Headers.Add("User-Agent", "Mozilla/5.0");
    formData.Add(new ByteArrayContent(File.ReadAllBytes("/path/to/file.jpg")), "file_image", "file.jpg");
    var response = client.PostAsync("https://imageupscaler.com/api/update_image.php?method={method}", formData).Result;

    if(response.IsSuccessStatusCode) {
        FileStream fileStream = new FileStream("your_file.png", FileMode.Create, FileAccess.Write, FileShare.None);
        response.Content.CopyToAsync(fileStream).ContinueWith((copyTask) =>{ fileStream.Close(); });
    } else {
        Console.WriteLine("Error: " + response.Content.ReadAsStringAsync().Result);
    }
}
                                            
                                        

API Reference

Requires either an API Key to be provided in the Authorization request header.

Server: https://imageupscaler.com/api/update_image.php?method={method}

Image Upscaler is an online service that upscales images and photos in 4 times. It uses Artificial Intelligence, which makes images bigger without making it blurry saving its quality at the same time

  • File size: up to 1,2 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _upscaled

Request url: https://imageupscaler.com/api/update_image.php?method=upscale-image-4x


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

Image Upscaler recognizes the faces of people in the image and blur them

  • File size: up to 5 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _face_blurred

Request url: https://imageupscaler.com/api/update_image.php?method=blur-face


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

The service processes image with a vintage filter

  • File size: up to 5 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _vintage_filter

Request url: https://imageupscaler.com/api/update_image.php?method=vintage-filter


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

It often becomes a situation that you have an image and its size is appropriate but the image has blur. It could be motion blur, defocus, or just manually blur. In this case you need to unblur the image. This solution is also based on Deep Learning CNN

  • File size: up to 5 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _deblurred

Request url: https://imageupscaler.com/api/update_image.php?method=deblurring


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

AI background remover gives a chance to save your time in comparison with manually foreground / background selection. Just upload your image and the AI puts the foreground on white background

  • File size: up to 5 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _removed_BG

Request url: https://imageupscaler.com/api/update_image.php?method=remove-background-from-image


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

Enhance intensity. It is a good solution if photo has been made in bad lighting conditions with lack of light

  • File size: up to 1,2 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _enhanced

Request url: https://imageupscaler.com/api/update_image.php?method=enhance-image


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

Color enhancement. It is a good solution when colors on your photo have not enough saturation or colors gamma doesn't correlate with your wishes

  • File size: up to 1,2 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _enhanced

Request url: https://imageupscaler.com/api/update_image.php?method=enhance-image-color


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

The apps and digital services we daily use often require uploading a small-sized photo. There are dozens of ways how to resize your pics so that they fit the demands. One of them is saving a picture in .JPEG format. After compressing you get a small-sized picture but the initial quality is also lost. The photo becomes less sharp because of the little squares around the objects. We call these squares JPEG artifacts.

Image Upscaler helps to clean up your picture from JPEG artifacts making the photo a real delight to the eye. The app simply works with your camera photos as well as with the images taken from Google.

This is a must-have for those who need high-quality photo content.

  • File size: up to 2,5 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _removed_artifacts

Request url: https://imageupscaler.com/api/update_image.php?method=jpeg-artifacts-removing


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

Image denoising to restore the true image

  • File size: up to 1,2 MB
  • Image source: File upload (binary or as base64 encoded string)
  • Picture format: .jpg, .jpeg, or .png
  • Prefix after processing: _denoised

Request url: https://imageupscaler.com/api/update_image.php?method=denoising


Request bodyrequired

file_imagestring($binary)

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)


Request headers:

Content-type:

multipart/form-data

Authorization:

Bearer {API token}

User-Agent:

Mozilla/5.0

Example response

success response example:


error response example:

Error codes

  • 100Request method not allowed
  • 101Auth token is incorrect
  • 102Limit of available uploaded image have exhausted
  • 103Subscription expired
  • 104Incorrect method of image processing
  • 105Image file is missing
  • 106Error type. File have correct extension but incorrect type, type not correlate with extension
  • 107File is too big. Check available size for current API method
  • 108Error during uploading file
  • 109Curl error
  • 110Process failed (error curl: ...)
  • 111Method temporary unavailable
  • 112This user hasn't active business subscription