Ming Image — Ebenenzerlegung
curl --request POST \
--url https://api.novita.ai/v1/images/edits \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": {},
"image": {},
"prompt": "<string>",
"output_format": "<string>",
"response_format": "<string>",
"size": "<string>",
"watermark": true
}
'import requests
url = "https://api.novita.ai/v1/images/edits"
payload = {
"model": {},
"image": {},
"prompt": "<string>",
"output_format": "<string>",
"response_format": "<string>",
"size": "<string>",
"watermark": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
model: {},
image: {},
prompt: '<string>',
output_format: '<string>',
response_format: '<string>',
size: '<string>',
watermark: true
})
};
fetch('https://api.novita.ai/v1/images/edits', 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.novita.ai/v1/images/edits",
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([
'model' => [
],
'image' => [
],
'prompt' => '<string>',
'output_format' => '<string>',
'response_format' => '<string>',
'size' => '<string>',
'watermark' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.novita.ai/v1/images/edits"
payload := strings.NewReader("{\n \"model\": {},\n \"image\": {},\n \"prompt\": \"<string>\",\n \"output_format\": \"<string>\",\n \"response_format\": \"<string>\",\n \"size\": \"<string>\",\n \"watermark\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.novita.ai/v1/images/edits")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"model\": {},\n \"image\": {},\n \"prompt\": \"<string>\",\n \"output_format\": \"<string>\",\n \"response_format\": \"<string>\",\n \"size\": \"<string>\",\n \"watermark\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/v1/images/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"model\": {},\n \"image\": {},\n \"prompt\": \"<string>\",\n \"output_format\": \"<string>\",\n \"response_format\": \"<string>\",\n \"size\": \"<string>\",\n \"watermark\": true\n}"
response = http.request(request)
puts response.read_body{
"created": 123,
"data": [
{
"b64_json": "<string>",
"data[0].revised_prompt": "<string>"
}
],
"output_format": "<string>",
"size": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"image_tokens": 123,
"text_tokens": 123
},
"output_tokens": 123,
"total_tokens": 123
},
"model": "<string>",
"id": "<string>"
}Image Editor
Ming Image — Ebenenzerlegung
POST
/
v1
/
images
/
edits
Ming Image — Ebenenzerlegung
curl --request POST \
--url https://api.novita.ai/v1/images/edits \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": {},
"image": {},
"prompt": "<string>",
"output_format": "<string>",
"response_format": "<string>",
"size": "<string>",
"watermark": true
}
'import requests
url = "https://api.novita.ai/v1/images/edits"
payload = {
"model": {},
"image": {},
"prompt": "<string>",
"output_format": "<string>",
"response_format": "<string>",
"size": "<string>",
"watermark": True
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
model: {},
image: {},
prompt: '<string>',
output_format: '<string>',
response_format: '<string>',
size: '<string>',
watermark: true
})
};
fetch('https://api.novita.ai/v1/images/edits', 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.novita.ai/v1/images/edits",
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([
'model' => [
],
'image' => [
],
'prompt' => '<string>',
'output_format' => '<string>',
'response_format' => '<string>',
'size' => '<string>',
'watermark' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.novita.ai/v1/images/edits"
payload := strings.NewReader("{\n \"model\": {},\n \"image\": {},\n \"prompt\": \"<string>\",\n \"output_format\": \"<string>\",\n \"response_format\": \"<string>\",\n \"size\": \"<string>\",\n \"watermark\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.novita.ai/v1/images/edits")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"model\": {},\n \"image\": {},\n \"prompt\": \"<string>\",\n \"output_format\": \"<string>\",\n \"response_format\": \"<string>\",\n \"size\": \"<string>\",\n \"watermark\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/v1/images/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"model\": {},\n \"image\": {},\n \"prompt\": \"<string>\",\n \"output_format\": \"<string>\",\n \"response_format\": \"<string>\",\n \"size\": \"<string>\",\n \"watermark\": true\n}"
response = http.request(request)
puts response.read_body{
"created": 123,
"data": [
{
"b64_json": "<string>",
"data[0].revised_prompt": "<string>"
}
],
"output_format": "<string>",
"size": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"image_tokens": 123,
"text_tokens": 123
},
"output_tokens": 123,
"total_tokens": 123
},
"model": "<string>",
"id": "<string>"
}ming-image-0.1-design-layer unterstützt ausschließlich die Zerlegung in Ebenen über das OpenAI-Protokoll zur Bildbearbeitung.
Anfrage-Header
string
erforderlich
Unterstützt:
multipart/form-datastring
erforderlich
Format der Bearer-Authentifizierung, zum Beispiel: Bearer {{API Key}}.
Anfragekörper
enum
erforderlich
Name des Modells. Verfügbare Werte:
ming-image-0.1-design-layerFiles
erforderlich
Eingabebild: 1 Bild. Das Formularfeld lautet
image[].ming-image-0.1-design-layer unterstützt nur 1 Eingabebild.string
erforderlich
Textbeschreibung des Bildes.
string
Standard:"png"
Format des Ausgabebildes. Muss
png oder webp sein.string
Standard:"b64_json"
Format, in dem das Bild zurückgegeben wird; der Standardwert ist
b64_json. Verfügbare Werte: url, b64_json. Hinweis: url ist 24 Stunden gültig.string
Standard:"auto"
Größe des Ausgabebildes. Der Standardwert
auto wählt die Größe automatisch anhand des Modells. Format: "{w}x{h}", zum Beispiel "1024x1024".boolean
Standard:false
Legt fest, ob dem KI-generierten Bild ein Wasserzeichen hinzugefügt wird.
true: Aktiviert das sichtbare Wasserzeichen und das implizite digitale Wasserzeichen auf KI-generierten Bildern gemäß den Richtlinienanforderungen. false: Deaktiviert alle Wasserzeichen.Antwort
integer
erforderlich
Unix-Zeitstempel (in Sekunden) zum Zeitpunkt der Erstellung der Antwort.
array
erforderlich
Array der zurückgegebenen Bilder mit mehreren Ebenen (zum Beispiel Vordergrundebene, Hintergrundebene usw.), mit einem Element pro Ebene.
Anzeigen Eigenschaften
Anzeigen Eigenschaften
string
Base64-kodierte Bilddaten der Ebene.
string
JSON-Zeichenfolge, die die Ebenenstruktur beschreibt und die Größe der Zeichenfläche sowie Informationen zu jedem Bereich angibt.
string
erforderlich
Format des Ausgabebildes (Ebenen werden immer als png ausgegeben).
string
nullobject
erforderlich
Statistiken zur Token-Nutzung.
Anzeigen Eigenschaften
Anzeigen Eigenschaften
integer
Gesamtzahl der Eingabe-Tokens (einschließlich der Tokens des hochgeladenen Bildes).
object
integer
Gesamtzahl der Ausgabe-Tokens (Summe über mehrere Ebenen, zum Beispiel 3 Ebenen × 4096 = 12288).
integer
Summe der Eingabe- und Ausgabe-Tokens.
string
erforderlich
Name des Modells, das die Anfrage tatsächlich verarbeitet hat.
string
erforderlich
Eindeutige Kennung dieser Anfrage.
Beispiel
Anfrage:
curl --location --request POST 'https://api.novita.ai/v1/images/edits' \
--header 'Authorization: Bearer {{API Key}}' \
--form 'model="ming-image-0.1-design-layer"' \
--form 'prompt="Split into three layers"' \
--form 'image[]=@"{The Path of Your Image File}"' \
--form 'size="1024x1024"'
Antwort:
{
"created": 1789642431,
"data": [
{
"b64_json": "...",
"revised_prompt": "{\"canvas\": [1024, 1024], \"regions\": [{\"category\": \"Image\", \"bbox\": [1.4, 3.3, 1023.0, 1022.0]}, {\"category\": \"BackgroundImage\", \"bbox\": [1.4, 3.3, 1023.0, 1022.0]}]}"
},
{
"b64_json": "..."
},
{
"b64_json": "..."
}
],
"output_format": "png",
"size": null,
"usage": {
"input_tokens": 4096,
"input_tokens_details": {
"image_tokens": 4096,
"text_tokens": 0
},
"output_tokens": 12288,
"total_tokens": 16384
},
"model": "Ming-Image-0.1-Design-Layer-StressTest",
"id": "218edba617896423893976485e4f35"
}
Zuletzt geändert am 21. September 2026