Image Upscaler API

Enlarge and Enhance Images with AI Super-Resolution.

hero banner

Code Examples in Popular Languages

Integrate our Image Upscaler API easily into your apps with comprehensive code examples in popular languages to get started quickly.

CURL Request
curl --location 'https://theonlineconverter.com/api/v1/image-upscaler' \
--header 'Content-Type: application/json' \
--header 'x-api-key: enter_your_api_key' \
--form 'upscale_factor="2x"' \
--form 'face_upsample="true"' \
--form 'background_enhance="false"' \
--form 'file=@"/D:/data/Images/jpg/dummy.jpg"'
JavaScript Fetch
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "enter_your_api_key");

const formdata = new FormData();
formdata.append("upscale_factor", "2x");
formdata.append("face_upsample", "true");
formdata.append("background_enhance", "false");
formdata.append("file", fileInput.files[0], "/D:/data/Images/jpg/dummy.jpg");

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: formdata,
  redirect: "follow"
};

fetch("https://theonlineconverter.com/api/v1/image-upscaler", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
Ruby Net::HTTP
import requests
import json

url = "https://theonlineconverter.com/api/v1/image-upscaler"

payload = {'upscale_factor': '2x',
'face_upsample': 'true',
'background_enhance': 'false'}
files=[
  ('file',('dummy.jpg',open('/D:/data/Images/jpg/dummy.jpg','rb'),'image/jpeg'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
Python Requests
import requests
import json

url = "https://theonlineconverter.com/api/v1/image-upscaler"

payload = {'upscale_factor': '2x',
'face_upsample': 'true',
'background_enhance': 'false'}
files=[
  ('file',('dummy.jpg',open('/D:/data/Images/jpg/dummy.jpg','rb'),'image/jpeg'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
PHP Guzzle
<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'x-api-key' => 'enter_your_api_key'
];
$options = [
  'multipart' => [
    [
      'name' => 'upscale_factor',
      'contents' => '2x'
    ],
    [
      'name' => 'face_upsample',
      'contents' => 'true'
    ],
    [
      'name' => 'background_enhance',
      'contents' => 'false'
    ],
    [
      'name' => 'file',
      'contents' => Utils::tryFopen('/D:/data/Images/jpg/dummy.jpg', 'r'),
      'filename' => '/D:/data/Images/jpg/dummy.jpg',
      'headers'  => [
        'Content-Type' => '<Content-type header>'
      ]
    ]
]];
$request = new Request('POST', 'https://theonlineconverter.com/api/v1/image-upscaler', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
Java HttpURLConnection
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("upscale_factor","2x")
  .addFormDataPart("face_upsample","true")
  .addFormDataPart("background_enhance","false")
  .addFormDataPart("file","/D:/data/Images/jpg/dummy.jpg",
    RequestBody.create(MediaType.parse("application/octet-stream"),
    new File("/D:/data/Images/jpg/dummy.jpg")))
  .build();
Request request = new Request.Builder()
  .url("https://theonlineconverter.com/api/v1/image-upscaler")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("x-api-key", "enter_your_api_key")
  .build();
Response response = client.newCall(request).execute();
Go net/http
package main

import (
  "fmt"
  "bytes"
  "mime/multipart"
  "os"
  "path/filepath"
  "net/http"
  "io"
)

func main() {

  url := "https://theonlineconverter.com/api/v1/image-upscaler"
  method := "POST"

  payload := &bytes.Buffer{}
  writer := multipart.NewWriter(payload)
  _ = writer.WriteField("upscale_factor", "2x")
  _ = writer.WriteField("face_upsample", "true")
  _ = writer.WriteField("background_enhance", "false")
  file, errFile4 := os.Open("/D:/data/Images/jpg/dummy.jpg")
  defer file.Close()
  part4,
         errFile4 := writer.CreateFormFile("file",filepath.Base("/D:/data/Images/jpg/dummy.jpg"))
  _, errFile4 = io.Copy(part4, file)
  if errFile4 != nil {
    fmt.Println(errFile4)
    return
  }
  err := writer.Close()
  if err != nil {
    fmt.Println(err)
    return
  }


  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("x-api-key", "enter_your_api_key")

  req.Header.Set("Content-Type", writer.FormDataContentType())
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
C# HttpClient
var options = new RestClientOptions("https://theonlineconverter.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/image-upscaler", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-api-key", "enter_your_api_key");
request.AlwaysMultipartFormData = true;
request.AddParameter("upscale_factor", "2x");
request.AddParameter("face_upsample", "true");
request.AddParameter("background_enhance", "false");
request.AddFile("file", "/D:/data/Images/jpg/dummy.jpg");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);

Key Features & Capabilities

Our API is powered by a state-of-the-art AI model to deliver stunning, high-resolution results from low-quality sources.

Simple User Interface

AI Super-Resolution

Go beyond traditional resizing. Our AI model intelligently predicts and adds new pixel data to genuinely enhance detail and sharpness.

Simple Data Format

Increase Resolution by 2x or 4x

Choose your desired output size. Double or quadruple the pixel dimensions of your source image to prepare it for high-resolution displays and print.

Time

Enhance Details & Texture

The AI model is trained to recognize and reconstruct textures, patterns, and fine details, adding a level of clarity that simple scaling cannot achieve.

Secure Data

Noise & Artifact Reduction

Simultaneously cleans up JPEG compression artifacts and digital noise from the source image, resulting in a cleaner, sharper output.

Universal Access

Restore Old Photos

Breathe new life into old, low-resolution scanned photographs by increasing their size and recovering lost details for preservation and sharing.

Freedom

Secure & Confidential

All images are processed over encrypted connections. We guarantee confidentiality with a strict data privacy policy and do not store your files.

Frequently Asked Questions

Find answers to common questions about our Image Upscaler API to understand how our AI enhances your images.

Traditional resizing (bicubic interpolation) stretches existing pixels, which often results in a blurry or pixelated image. Our AI Super-Resolution analyzes the image and intelligently generates new, context-aware pixels to create genuine detail, resulting in a much sharper image.

It multiplies both the width and the height by that factor. For example, a 500x300 pixel image upscaled by 4x will become a 2000x1200 pixel image.

While it can improve almost any image, it works best on images that were originally of decent quality but are simply too small. It's excellent for upscaling web images, icons, and old digital photos.

Our AI can significantly improve sharpness and reduce blur, but it cannot create critical details that were completely lost in the original photo. It enhances what is there; it doesn't invent new content.

The output is typically a PNG file. This format is lossless, which ensures that all the new detail generated by the AI is preserved without any compression artifacts.

AI processing is more intensive than simple conversions. It typically takes several seconds to a minute, depending on the original image size and the selected scale factor.

Absolutely. We use end-to-end TLS encryption for all data transfers. Your image files are processed securely and are permanently deleted from our servers immediately after the job is complete.