API.Market
Go to API.market
  • Welcome to API.market
  • What are API Products?
  • How to subscribe to a SaaS API Product?
  • Managing Subscriptions
  • Analytics & Logs
  • How can I cancel my Subscription?
  • How do I add payment details?
  • How does API.market charges me?
  • Error Codes
  • Seller Docs
    • API Seller Console
    • What is an API Product?
    • What is a Pricing Plan
    • Importing an API Source
    • Creating a Product using the Wizard
    • Testing Your APIs & Products
    • Analytics & Logs
    • Custom Usage
    • Overriding Custom Usage on Result Retrieval
  • FUNDAMENTALS
    • Convert Postman Collection to OpenAPI Yaml
    • Create OpenAPI spec using ChatGPT
  • About Us
  • API Product Docs
    • MagicAPI
      • Screenshot API
      • Domain Availability Checker API
      • WhoIS API
      • PDF Conversion API
      • Image Upscale API
      • DNS Checker API
      • Ageify API
      • Image Restoration API
      • Toon Me API
      • Coding Assistant
      • 🎭 FaceSwap API: Instantaneous replaces face with one another
      • 🏞️ Image Upload API
      • Deblurer API
      • Hair Changer API
      • 🤳🏻🤖AI Qr Code Generator API
      • Whisper API
      • Image Colorizer API
      • OpenJourney API
      • Object Remover API
      • Image Captioner API
      • Object Detector API
      • NSFW API
      • Crunchbase API
      • Pipfeed's Extract API Developer Documentation
      • Migrating from Capix FaceSwap API to magicapi/faceswap-capix API
    • BridgeML
      • Meta-Llama-3-8B-Instruct
      • Meta-Llama-3-70B-Instruct
      • Mistral-7B-Instruct-v0.1
      • Mixtral-8x22B-Instruct-v0.1
      • Meta-Llama-2-7b
      • Meta-Llama-2-13b
      • Meta-Llama-2-70b
      • Gemma-7b-it
      • NeuralHermes-2.5-Mistral-7B
      • BAAI/bge-large-en-v1.5
      • CodeLlama-70b-Instruct-hf
      • 🤖🧗Text-to-Image API
      • 📝🎧 Text to Audio API
    • Capix AI
      • FaceSwap Image and Video Face Swap API
      • MakeUp
      • Photolab.me
      • AI Picture Colorizer
      • AI Picture Upscaler
      • AI Background Remover
      • Object Remover
      • TTS Universal
      • Home GPT
      • AI & Plagiarism Checker
      • AI Story Generator
      • AI Essay Generator
      • Book Title Generator
    • Trueway
      • ⛕ 🗺️ Trueway Routing API
      • 🌐📍Trueway Geocoding API: Forward and Reverse Geocoding
      • 🛤️ ⏱️Trueway Matrix API: Travel Distance and Time
      • 🏛️ Trueway Places API
    • AILabTools
      • Cartoon-Yourself
    • SharpAPI
      • 📄 AI-Powered Resume/CV Parsing API
      • 🛩️ Airports Database & Flight Duration API
    • Text to Speech
      • Turn your text into Magical-sounding Audio
Powered by GitBook
On this page
  • About
  • CURL and Response
  • For /upscale2x/
  • For /upscale4x/
  • For /upscale8x/
  1. API Product Docs
  2. MagicAPI

Image Upscale API

Image Upscale API is a powerful tool designed to upscale the resolution and size of an image by 2x , 4x and 8x.

About

Our Image Upscaling API streamlines the process of enhancing image resolution and size by factors of 2x, 4x, and 8x using advanced Super-Resolution models. Tailored for developers, designers, and content creators, this API offers a convenient solution for improving image quality without compromising details.

Integrating our API into your workflow is seamless. Simply send a POST request to the respective endpoint—/upscale2x/, /upscale4x/, or /upscale8x/—with the URL of the image to be upscaled in the request body. The API then applies the chosen upscaling factor to enhance the image resolution.

The output format of the API response is a JPEG image, preserving the upscaled version of the input image. This standardized format ensures compatibility with a wide range of applications and platforms, facilitating easy integration into your projects.

Use cases for our Image Upscaling API encompass various scenarios, including:

  • Enhancing image quality for digital media platforms

  • Preparing images for high-definition displays or printing

  • Improving image details for machine learning training datasets

  • Enhancing visual content for marketing materials and presentations

By automating the image upscaling process, our API saves valuable time and resources, empowering you to deliver visually stunning content efficiently. Whether you're developing a photo editing application, optimizing website images, or enhancing machine learning datasets, our Image Upscaling API provides the functionality you need to achieve exceptional results. Elevate your image processing capabilities and unlock new possibilities with our Image Upscaling API.

CURL and Response

Request

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/magicapi/upscaler/upscale2x/' \
  -H 'accept: image/jpeg' \
  -H 'x-magicapi-key: API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://production-media.paperswithcode.com/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg"
}'
const fetch = require('node-fetch');

let url = 'https://api.magicapi.dev/api/v1/magicapi/upscaler/upscale2x/';

let options = {
  method: 'POST',
  headers: {'x-magicapi-key': 'SOME_STRING_VALUE', 'content-type': 'application/json'},
  body: '{"url":"https://production-media.paperswithcode.com/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg"}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
import http.client

conn = http.client.HTTPSConnection("api.magicapi.dev")

payload = "{\"url\":\"https://production-media.paperswithcode.com/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg\"}"

headers = {
    'x-magicapi-key': "SOME_STRING_VALUE",
    'content-type': "application/json"
    }

conn.request("POST", "/api/v1/magicapi/upscaler/upscale2x/", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"url\":\"https://production-media.paperswithcode.com/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg\"}");
Request request = new Request.Builder()
  .url("https://api.magicapi.dev/api/v1/magicapi/upscaler/upscale2x/")
  .post(body)
  .addHeader("x-magicapi-key", "SOME_STRING_VALUE")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.magicapi.dev/api/v1/magicapi/upscaler/upscale2x/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"url\":\"https://production-media.paperswithcode.com/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg\"}",
  CURLOPT_HTTPHEADER => [
    "content-type: application/json",
    "x-magicapi-key: SOME_STRING_VALUE"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Responses :

For /upscale2x/

For /upscale4x/

For /upscale8x/

PreviousPDF Conversion APINextDNS Checker API

Last updated 1 year ago

Original
Upscaled-2x
Original
Upscaled-2x
Original
Upscaled-2x
Original
Upscaled-4x
Original
Upscaled-4x
Original
Upscaled-4x
Original
Upscaled-8x
Original
Upscaled-8x
Original
Upscaled-8x