curl --request POST \
--url https://api.legnext.ai/api/v1/enhance-upscale \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"image_url": "<string>",
"aspect_ratio": "keep",
"content_type": "standard",
"crop_mode": "letterbox",
"face_enhancement_level": "moderate",
"imageNo": 1,
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notify_progress": true,
"output_format": "jpeg",
"target_resolution": "2K",
"webhook_endpoint": "<string>",
"webhook_schema": "<string>",
"webhook_secret": "<string>"
}
'import requests
url = "https://api.legnext.ai/api/v1/enhance-upscale"
payload = {
"image_url": "<string>",
"aspect_ratio": "keep",
"content_type": "standard",
"crop_mode": "letterbox",
"face_enhancement_level": "moderate",
"imageNo": 1,
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notify_progress": True,
"output_format": "jpeg",
"target_resolution": "2K",
"webhook_endpoint": "<string>",
"webhook_schema": "<string>",
"webhook_secret": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_url: '<string>',
aspect_ratio: 'keep',
content_type: 'standard',
crop_mode: 'letterbox',
face_enhancement_level: 'moderate',
imageNo: 1,
jobId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
notify_progress: true,
output_format: 'jpeg',
target_resolution: '2K',
webhook_endpoint: '<string>',
webhook_schema: '<string>',
webhook_secret: '<string>'
})
};
fetch('https://api.legnext.ai/api/v1/enhance-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://api.legnext.ai/api/v1/enhance-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_url' => '<string>',
'aspect_ratio' => 'keep',
'content_type' => 'standard',
'crop_mode' => 'letterbox',
'face_enhancement_level' => 'moderate',
'imageNo' => 1,
'jobId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'notify_progress' => true,
'output_format' => 'jpeg',
'target_resolution' => '2K',
'webhook_endpoint' => '<string>',
'webhook_schema' => '<string>',
'webhook_secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.legnext.ai/api/v1/enhance-upscale"
payload := strings.NewReader("{\n \"image_url\": \"<string>\",\n \"aspect_ratio\": \"keep\",\n \"content_type\": \"standard\",\n \"crop_mode\": \"letterbox\",\n \"face_enhancement_level\": \"moderate\",\n \"imageNo\": 1,\n \"jobId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"notify_progress\": true,\n \"output_format\": \"jpeg\",\n \"target_resolution\": \"2K\",\n \"webhook_endpoint\": \"<string>\",\n \"webhook_schema\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.legnext.ai/api/v1/enhance-upscale")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"<string>\",\n \"aspect_ratio\": \"keep\",\n \"content_type\": \"standard\",\n \"crop_mode\": \"letterbox\",\n \"face_enhancement_level\": \"moderate\",\n \"imageNo\": 1,\n \"jobId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"notify_progress\": true,\n \"output_format\": \"jpeg\",\n \"target_resolution\": \"2K\",\n \"webhook_endpoint\": \"<string>\",\n \"webhook_schema\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legnext.ai/api/v1/enhance-upscale")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_url\": \"<string>\",\n \"aspect_ratio\": \"keep\",\n \"content_type\": \"standard\",\n \"crop_mode\": \"letterbox\",\n \"face_enhancement_level\": \"moderate\",\n \"imageNo\": 1,\n \"jobId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"notify_progress\": true,\n \"output_format\": \"jpeg\",\n \"target_resolution\": \"2K\",\n \"webhook_endpoint\": \"<string>\",\n \"webhook_schema\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}Enhancement API — suspended
The Topaz-backed enhancement endpoint is not currently accepting tasks.
curl --request POST \
--url https://api.legnext.ai/api/v1/enhance-upscale \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"image_url": "<string>",
"aspect_ratio": "keep",
"content_type": "standard",
"crop_mode": "letterbox",
"face_enhancement_level": "moderate",
"imageNo": 1,
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notify_progress": true,
"output_format": "jpeg",
"target_resolution": "2K",
"webhook_endpoint": "<string>",
"webhook_schema": "<string>",
"webhook_secret": "<string>"
}
'import requests
url = "https://api.legnext.ai/api/v1/enhance-upscale"
payload = {
"image_url": "<string>",
"aspect_ratio": "keep",
"content_type": "standard",
"crop_mode": "letterbox",
"face_enhancement_level": "moderate",
"imageNo": 1,
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notify_progress": True,
"output_format": "jpeg",
"target_resolution": "2K",
"webhook_endpoint": "<string>",
"webhook_schema": "<string>",
"webhook_secret": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_url: '<string>',
aspect_ratio: 'keep',
content_type: 'standard',
crop_mode: 'letterbox',
face_enhancement_level: 'moderate',
imageNo: 1,
jobId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
notify_progress: true,
output_format: 'jpeg',
target_resolution: '2K',
webhook_endpoint: '<string>',
webhook_schema: '<string>',
webhook_secret: '<string>'
})
};
fetch('https://api.legnext.ai/api/v1/enhance-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://api.legnext.ai/api/v1/enhance-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_url' => '<string>',
'aspect_ratio' => 'keep',
'content_type' => 'standard',
'crop_mode' => 'letterbox',
'face_enhancement_level' => 'moderate',
'imageNo' => 1,
'jobId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'notify_progress' => true,
'output_format' => 'jpeg',
'target_resolution' => '2K',
'webhook_endpoint' => '<string>',
'webhook_schema' => '<string>',
'webhook_secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.legnext.ai/api/v1/enhance-upscale"
payload := strings.NewReader("{\n \"image_url\": \"<string>\",\n \"aspect_ratio\": \"keep\",\n \"content_type\": \"standard\",\n \"crop_mode\": \"letterbox\",\n \"face_enhancement_level\": \"moderate\",\n \"imageNo\": 1,\n \"jobId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"notify_progress\": true,\n \"output_format\": \"jpeg\",\n \"target_resolution\": \"2K\",\n \"webhook_endpoint\": \"<string>\",\n \"webhook_schema\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.legnext.ai/api/v1/enhance-upscale")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"<string>\",\n \"aspect_ratio\": \"keep\",\n \"content_type\": \"standard\",\n \"crop_mode\": \"letterbox\",\n \"face_enhancement_level\": \"moderate\",\n \"imageNo\": 1,\n \"jobId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"notify_progress\": true,\n \"output_format\": \"jpeg\",\n \"target_resolution\": \"2K\",\n \"webhook_endpoint\": \"<string>\",\n \"webhook_schema\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legnext.ai/api/v1/enhance-upscale")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_url\": \"<string>\",\n \"aspect_ratio\": \"keep\",\n \"content_type\": \"standard\",\n \"crop_mode\": \"letterbox\",\n \"face_enhancement_level\": \"moderate\",\n \"imageNo\": 1,\n \"jobId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"notify_progress\": true,\n \"output_format\": \"jpeg\",\n \"target_resolution\": \"2K\",\n \"webhook_endpoint\": \"<string>\",\n \"webhook_schema\": \"<string>\",\n \"webhook_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}{
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "<string>",
"secret": "<string>"
}
},
"detail": null,
"error": {
"code": 123,
"detail": "<unknown>",
"message": "<string>",
"raw_message": "<string>"
},
"input": {},
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logs": [
"<string>"
],
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"usage": {
"consume": 123,
"frozen": 123,
"type": "credit"
}
},
"model": "midjourney",
"output": {
"image_url": "<string>",
"image_urls": [
"<string>"
],
"seed": "<string>",
"available_actions": {}
},
"status": "pending",
"task_type": "diffusion"
}503 Service Unavailable. Do not
build new integrations against this endpoint.Authorizations
API key from the Legnext dashboard. Authorization: Bearer <key> is accepted as an alternative.
Body
- Option 1
- Option 2
Direct URL of the image to enhance (must start with http:// or https://). Either image_url or jobId+imageNo is required.
2048^https?://Output aspect ratio.
keep, 1:1, 16:9, 9:16, 4:5, 5:4, 3:2, 2:3, 4:3, 3:4 Content type hint for the enhancer.
photo, illustration, text, low_res, standard How to fit the target aspect ratio.
letterbox, crop Face enhancement preset.
off, none, subtle, moderate, strong Index of the image in the parent task's grid (0-3, left-to-right, top-to-bottom). Required when using jobId.
0 <= x <= 3ID of a previous Midjourney task whose grid image should be enhanced.
Output image format.
jpeg, jpg, png, tiff, tif Target resolution preset.
HD, FHD, 2K, 4K, 6K, 8K, 12K Response
Enhancement task accepted.
Show child attributes
Show child attributes
Reserved for future use; currently null in public API responses.
Show child attributes
Show child attributes
Echo of the task's input parameters (shape depends on task_type; mirrors the create-request body of the operation that created the task). Null in error responses.
Task UUID. Pass it to GET /v1/job/{job_id} to poll, or reference it as jobId in follow-up operations.
Operational log lines of the task (progress events, retries).
Timestamps and billing usage of the task (null in error responses).
Show child attributes
Show child attributes
Model family that executed the task.
midjourney Task result, present once status is completed (null before that). Image/video tasks return URLs; describe/shorten tasks return text prompts.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Lifecycle state. Terminal states: completed, failed. staged means the task is queued behind the account's concurrency limit; retry means it is being resubmitted after a transient provider error.
pending, staged, processing, retry, completed, failed Type of the task — the operation that created it.
diffusion, upscale, reroll, variation, inpaint, outpaint, pan, edit, remix, enhance, upload_paint, retexture, remove_background, shorten, describe, blend, video_diffusion, extend_video, video_upscale, enhance_upscale