curl --request POST \
--url https://api.maxapi.ai/ideogram/upscale \
--header 'Content-Type: multipart/form-data' \
--form image_file='@example-file' \
--form image_request=import requests
url = "https://api.maxapi.ai/ideogram/upscale"
files = { "image_file": ("example-file", open("example-file", "rb")) }
payload = { "image_request": "" }
response = requests.post(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('image_file', 'example-file');
form.append('image_request', '');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.maxapi.ai/ideogram/upscale', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/ideogram/upscale"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_request\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/ideogram/upscale")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_request\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();{
"data": [
{
"seed": 12345,
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"resolution": "1024x1024",
"url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
"is_image_safe": true
},
{
"seed": 12345,
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"resolution": "1024x1024",
"url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
"is_image_safe": true
}
],
"created": "2000-01-23T04:56:07.000Z"
}Upscale()
Use this endpoint to call the provider-compatible upscale() operation through MaxAPI.
curl --request POST \
--url https://api.maxapi.ai/ideogram/upscale \
--header 'Content-Type: multipart/form-data' \
--form image_file='@example-file' \
--form image_request=import requests
url = "https://api.maxapi.ai/ideogram/upscale"
files = { "image_file": ("example-file", open("example-file", "rb")) }
payload = { "image_request": "" }
response = requests.post(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('image_file', 'example-file');
form.append('image_request', '');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.maxapi.ai/ideogram/upscale', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/ideogram/upscale"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_request\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/ideogram/upscale")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_request\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();{
"data": [
{
"seed": 12345,
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"resolution": "1024x1024",
"url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
"is_image_safe": true
},
{
"seed": 12345,
"prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
"resolution": "1024x1024",
"url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
"is_image_safe": true
}
],
"created": "2000-01-23T04:56:07.000Z"
}Headers
Body
An image binary; only JPEG, WEBPs and PNGs are supported at this time 图像二进制;目前仅支持 JPEG、WEBP 和 PNG 格式
A request to generate a new image using a provided image and a prompt. 请求生成一张新图像,使用提供的图像和提示。大致和Generate相同。
"{\"resemblance\":50,\"magic_prompt_option\":\"AUTO\",\"prompt\":\"A%20serene%20tropical%20beach%20\",\"seed\":12345,\"detail\":50}"
Response
Request succeeded.
Hide child attributes
Hide child attributes
0 to 2147483647
The prompt used for the generation. This may be different from the original prompt. 用于生成的提示。这可能与原始提示不同。
The resolution of the final image. 最终图像的分辨率。
The direct link to the image generated. 生成的图像的直接链接。
Whether this request passes safety checks. If false, the url field will be empty. 该请求是否通过安全检查。如果为假,网址字段将为空。
The time the request was created. 请求创建的时间。