Ausgabeauflösung
Unterstützt 1k, 2k laut veröffentlichtem Endpoint-Schema.
Qwen-2.1-Bearbeitung mit bis zu zehn Quellbildern und Masken
curl -X POST https://runapi.ai/api/v1/qwen_2_1/edit_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-2.1-edit-image",
"source_image_urls": [
"https://cdn.runapi.ai/public/samples/image.jpg"
],
"prompt": "Erstelle ein produktionsreifes Ergebnis mit diesem Modell."
}'
import { Qwen21Client } from "@runapi.ai/qwen-2-1";
const client = new Qwen21Client();
const result = await client.editImage.run({
model: "qwen-2.1-edit-image",
source_image_urls: ["https://cdn.runapi.ai/public/samples/image.jpg"],
prompt: "Erstelle ein produktionsreifes Ergebnis mit diesem Modell.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/qwen_2_1/edit_image",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"qwen-2.1-edit-image","source_image_urls":["https://cdn.runapi.ai/public/samples/image.jpg"],"prompt":"Erstelle ein produktionsreifes Ergebnis mit diesem Modell."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/qwen_2_1/edit_image");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen-2.1-edit-image',
'source_image_urls' => ['https://cdn.runapi.ai/public/samples/image.jpg'],
'prompt' => 'Erstelle ein produktionsreifes Ergebnis mit diesem Modell.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.editImage().run({"model":"qwen-2.1-edit-image","source_image_urls":["https://cdn.runapi.ai/public/samples/image.jpg"],"prompt":"Erstelle ein produktionsreifes Ergebnis mit diesem Modell."});
task.waitForResult();
require "runapi/qwen_2_1"
client = RunApi::Qwen21::Client.new
result = client.edit_image.run(
model: "qwen-2.1-edit-image",
source_image_urls: ["https://cdn.runapi.ai/public/samples/image.jpg"],
prompt: "Erstelle ein produktionsreifes Ergebnis mit diesem Modell."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.editImage.Run({"model":"qwen-2.1-edit-image","source_image_urls":["https://cdn.runapi.ai/public/samples/image.jpg"],"prompt":"Erstelle ein produktionsreifes Ergebnis mit diesem Modell."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model qwen-2.1-edit-image \
--endpoint edit_image \
--wait
2 Versionen verfügbar
| Anbieter | Alibaba |
| Modell-ID | qwen-2.1-edit-image |
| Modalität | Bild |
| Aufgabentypen | Asynchronous |
| API-Endpunkt | /api/v1/qwen_2_1/edit_image |
| Abrechnungseinheit | Aufruf |
| Eingabeparameter | aspect_ratio, background, callback_url, enable_prompt_expansion, mask_url, model, output_format, output_resolution, prompt, seed, source_image_urls |
| Maximale Auflösung | 1k, 2k |
| Seitenverhältnisse | auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21 |
| Ausgabeformat | png, webp, jpeg |
| Katalogstatus | Demnächst |
Registriere dich kostenlos und erstelle im Dashboard einen API-Schlüssel für qwen-2.1-edit-image.
Sende eine POST-Anfrage an /api/v1/qwen_2_1/edit_image mit der Modell-ID qwen-2.1-edit-image und deinen Parametern.
Rufe den Task ab oder folge dem Callback, um das fertige qwen-2.1-edit-image-Ergebnis abzurufen.
Unterstützt 1k, 2k laut veröffentlichtem Endpoint-Schema.
9 dokumentierte Parameter konfigurierbar, darunter aspect_ratio, background, enable_prompt_expansion, mask_url, output_format.
Stellt 1 öffentliche(n) Endpoint(s) bereit: edit_image.
Asynchrone Tasks akzeptieren eine Callback-URL für Fertigstellungsbenachrichtigungen.
seedInteger seed for reproducible results; omit for a random seed.
promptImage editing prompt. With mask_url, describes what to generate inside the white area of the mask.
mask_urlPublic mask image URL for local editing: white marks the area to change, black is kept. Requires exactly one source image and cannot be combined with a transparent background; aspect_ratio and enable_prompt_expansion are ignored.
backgroundBackground type. A transparent background requires output_format png or webp and cannot be combined with mask_url; describe only the subject in the prompt. (opaque, transparent)
aspect_ratioOutput aspect ratio. auto follows the first source image. Ignored when mask_url is set. (auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21)
callback_urlWebhook URL for asynchronous task updates.
output_formatOutput image format. jpeg cannot be combined with a transparent background. (png, webp, jpeg)
output_resolutionOutput image resolution. (1k, 2k)
source_image_urlsPublic source image URLs; one to ten images, in the order the prompt refers to them.
enable_prompt_expansionWhether RunAPI expands the prompt before generation. Ignored when mask_url is set.
Erstelle visuelle Assets aus Textprompts.
Transformiere bestehende Bilder mit Prompt-Anleitung.
Nutze SDKs für wiederholbare Generierung.
Übergib die im Quickstart angezeigte Modell-ID.
Ja. Preise werden pro Aufruf oder Einheit gemessen.
Ja. Die Variante ist ein Anfrageparameter. Ändere die Modell-ID, ohne Codeänderungen, erneute Authentifizierung oder separate Abrechnungseinrichtung. Alle Varianten nutzen denselben API Key und dasselbe Anfrageformat.
Wo Streaming verfügbar ist, streamt RunAPI durchgängig. LLM-Modelle unterstützen Streaming auf Token-Ebene. Medienmodelle liefern Ergebnisse über Async-Task-Polling oder Webhook-Callbacks.
Öffne ein Issue im öffentlichen GitHub-Repository oder schreibe an den Support unter [email protected]. Gib Task-ID und Modell-ID an, damit das Team die betreffende Generierung untersuchen kann.
Nein. Dein RunAPI API Key reicht für diese Variante und jedes andere Modell im Katalog. Du brauchst kein Konto beim zugrunde liegenden Anbieter.
Wir helfen bei Enterprise-Setup, Integrationen und technischen Fragen.
Kontakt aufnehmen