ImageUpscale
curl --request POST \
--url https://openapi.monica.im/v1/image/tool/upscale \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image": "https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png",
"scale": 2
}
'import requests
url = "https://openapi.monica.im/v1/image/tool/upscale"
payload = {
"image": "https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png",
"scale": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image: 'https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png',
scale: 2
})
};
fetch('https://openapi.monica.im/v1/image/tool/upscale', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.monica.im/v1/image/tool/upscale",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image' => 'https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png',
'scale' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.monica.im/v1/image/tool/upscale"
payload := strings.NewReader("{\n \"image\": \"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png\",\n \"scale\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://openapi.monica.im/v1/image/tool/upscale")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image\": \"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png\",\n \"scale\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.monica.im/v1/image/tool/upscale")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image\": \"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png\",\n \"scale\": 2\n}"
response = http.request(request)
puts response.read_body{
"image": "https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/upscale/f28110fa-334f-4131-8c84-7b936d2b3a8e/2pyRxuoYSHmXNvQGgHRARMt3OHi.png"
}Image tools
Upscale
POST
/
v1
/
image
/
tool
/
upscale
ImageUpscale
curl --request POST \
--url https://openapi.monica.im/v1/image/tool/upscale \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image": "https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png",
"scale": 2
}
'import requests
url = "https://openapi.monica.im/v1/image/tool/upscale"
payload = {
"image": "https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png",
"scale": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image: 'https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png',
scale: 2
})
};
fetch('https://openapi.monica.im/v1/image/tool/upscale', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.monica.im/v1/image/tool/upscale",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image' => 'https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png',
'scale' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.monica.im/v1/image/tool/upscale"
payload := strings.NewReader("{\n \"image\": \"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png\",\n \"scale\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://openapi.monica.im/v1/image/tool/upscale")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image\": \"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png\",\n \"scale\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.monica.im/v1/image/tool/upscale")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image\": \"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/generation-sdxl/80ddf974-9253-48fa-bc34-9f86845a1037/2pyPWQwVKYdCr3RGP3Cbrz41Km0.png\",\n \"scale\": 2\n}"
response = http.request(request)
puts response.read_body{
"image": "https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/upscale/f28110fa-334f-4131-8c84-7b936d2b3a8e/2pyRxuoYSHmXNvQGgHRARMt3OHi.png"
}Follow the quickstart guide to get your own API Key.
2048x2048 resolution and output images up to 4096x4096 resolution. When the input resolution exceeds 2048, the scale can only be 2.
See the pricing page for pricing.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Success
URL of the upscale image.
Example:
"https://monica-public-dev.s3.us-east-1.amazonaws.com/ugc-files/image-gen/upscale/f28110fa-334f-4131-8c84-7b936d2b3a8e/2pyRxuoYSHmXNvQGgHRARMt3OHi.png"