دقة المخرج
يدعم 1k, 2k من مخطط الـ endpoint المنشور.
تحرير Qwen 2.1 باستخدام ما يصل إلى عشر صور مصدر وأقنعة
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": "أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة."
}'
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: "أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة.",
});
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":"أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة."}
)
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' => 'أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة.',
])
]);
$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":"أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة."});
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: "أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة."
)
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":"أنشئ صورة بطل منتج بدقة 4K لزجاجة ماء سوداء غير لامعة على سطح حجري بيج، بإضاءة جانبية ناعمة."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model qwen-2.1-edit-image \
--endpoint edit_image \
--wait
2 إصدارات متاحة
| المزوّد | Alibaba |
| معرّف النموذج | qwen-2.1-edit-image |
| النمط | صورة |
| أنواع المهام | Asynchronous |
| نقطة نهاية API | /api/v1/qwen_2_1/edit_image |
| وحدة الفوترة | استدعاء |
| معلمات الإدخال | aspect_ratio, background, callback_url, enable_prompt_expansion, mask_url, model, output_format, output_resolution, prompt, seed, source_image_urls |
| الدقة القصوى | 1k, 2k |
| نسب العرض إلى الارتفاع | auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21 |
| تنسيق الإخراج | png, webp, jpeg |
| حالة الكتالوج | قريبًا |
سجّل مجانًا وأنشئ مفتاح API لـ qwen-2.1-edit-image من لوحة التحكم.
أرسل طلب POST إلى /api/v1/qwen_2_1/edit_image باستخدام معرّف نموذج qwen-2.1-edit-image ومعلماتك.
استطلع المهمة أو اتبع الاستدعاء الراجع لاسترداد نتيجة qwen-2.1-edit-image المكتملة.
يدعم 1k, 2k من مخطط الـ endpoint المنشور.
اضبط 9 معاملاً موثَّقاً، بما يشمل aspect_ratio, background, enable_prompt_expansion, mask_url, output_format.
يعرض 1 endpoint(s) عامة: edit_image.
تقبل المهام غير المتزامنة عنوان URL للاستدعاء عند اكتمال المهمة.
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.
أنشئ تلقائيًا صور منتجات بأسلوب lifestyle لكتالوجات التجارة الإلكترونية التي تفتقر إلى تصوير استوديو.
ابتكر سريعًا مفاهيم للعوالم والشخصيات قبل الانتقال إلى العمل الفني النهائي.
أنشئ أعمال غلاف ورسومًا توضيحية فريدة للمدونات والمقالات على نطاق واسع.
مرّر معرّف النموذج الظاهر في دليل البدء السريع.
تتدرج حدود المعدل لكل مفتاح بحسب مستوى الاستخدام. راجع صفحة التسعير للاطلاع على الحدود الحالية.
نعم — المتغير مجرد خيار. بدّل عبر تغيير معامل model.
حيثما يتوفر البث، يقدّم RunAPI البث من البداية إلى النهاية.
افتح issue في مستودع GitHub العام أو راسل الدعم عبر البريد الإلكتروني.
لا. يكفي مفتاح RunAPI API للوصول إلى هذه النسخة وكل نموذج آخر في الكتالوج. لا تحتاج إلى حسابات لدى المزود الأساسي.