Image · Alibaba

Qwen 2 API

Qwen 2 supports text-to-image and image editing.

جاهز للتشغيل · 2 variants · ابتداءً من $0.060
runapi.ai
curl -X POST https://runapi.ai/api/v1/qwen_2/edit_image \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen-2-text-to-image",
  "image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
  "prompt": "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
}'
import { Qwen2Client } from "@runapi.ai/qwen-2";

const client = new Qwen2Client();
const result = await client.editImage.run({
    model: "qwen-2-text-to-image",
    image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
    prompt: "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\Qwen2\Qwen2Client;

$client = new Qwen2Client();
$result = $client->editImage->run([
        'model' => 'qwen-2-text-to-image',
        'image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
        'prompt' => 'Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.',
]);
require "runapi/qwen_2"

client = RunApi::Qwen2::Client.new
result = client.edit_image.run(
    model: "qwen-2-text-to-image",
    image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
    prompt: "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
)
npx skills add runapi-ai/qwen-2 -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/qwen-2 v1
OVERVIEW

Qwen 2 supports text-to-image and image editing.

  • عدة إصدارات لمستويات مختلفة من السرعة / الجودة
  • يتضمن model skill التوثيق والـschemas وملاحظات الإعداد
  • يعمل مع workflows موجهة لتطوير التطبيقات
  • لا يتم احتساب رسوم على عمليات التوليد الفاشلة
VARIANTS

قارن جميع إصدارات API

Variant Billing From
qwen-2-edit-image call $0.060 عرض →
qwen-2-text-to-image call $0.060 عرض →
SKILLS

ثبّت skill Qwen 2 لتطوير التطبيقات

حمّل توثيق النموذج والـschemas وملاحظات الأسعار وخطوات الإعداد إلى مساحة عمل الكود.

# Install the model skill for app development workflows
npx skills add runapi-ai/qwen-2 -g
Installs docs, schemas, pricing context, and setup notes into your developer workspace.
Or use this setup request in your coding tool:
Install the Qwen 2 skill for this app:

1. Add runapi-ai/qwen-2 with the skills installer.
2. Load SKILL.md in this workspace.
3. Use its docs, schemas, pricing notes, and setup steps when adding model features.
4. Confirm the install path when done.
كيف يعمل

من model skill إلى أول نتيجة في أربع خطوات

01

اختر النموذج

اختر النموذج والإصدار المناسبين لنوع المخرجات ومستوى الجودة وزمن الاستجابة المستهدف.

02

الإعداد

اضبط مفتاح RunAPI وثبّت model skill في مساحة عمل الكود.

03

التنفيذ

استخدم تعليمات المهارة لإضافة ميزة النموذج داخل تطبيقك.

04

الاستلام

استعلم عبر task ID أو استخدم البث عند دعمه أو عالج webhook callback.

CONTEXT

ما هي Qwen 2 API؟

Qwen 2 is Alibaba's visual model from the Qwen family, supporting image generation and editing. Through RunAPI, all Qwen 2 endpoints share unified billing and API access.

Provider
Alibaba
Modality
Image
لماذا RunAPI

لماذا تستخدم Qwen 2 API عبر RunAPI

مصادقة واحدة لكل مزود

مفتاح RunAPI واحد يفتح الوصول إلى الكتالوج بالكامل. لا حسابات منفصلة، ولا تدوير مفاتيح لكل تكامل.

تسعير وفوترة موحّدان

تسعير لكل استدعاء بالدولار الأمريكي، ويُفوتر شهريًا. لا تُحتسب التوليدات الفاشلة.

Skill مع schemas

تأتي الـschemas المعرّفة وملاحظات الإعداد داخل model skill حتى يبدأ التنفيذ من العقد الصحيح.

FAQ

أسئلة شائعة

What endpoints does Qwen 2 support?

Qwen 2 supports text-to-image and image editing.

What is the Tongyi Wanxiang foundation?

Tongyi Wanxiang is Alibaba's visual generation platform that powers Qwen 2. It provides the underlying image understanding and generation capabilities.

How does image editing work?

The image-edit endpoint accepts a source image and text instructions, applying targeted modifications to specific regions while preserving the rest of the image.

Does Qwen 2 handle CJK text in images?

Yes — Qwen 2 has strong multilingual text understanding, including Chinese, Japanese, and Korean, for both prompt interpretation and visual content.

How does Qwen 2 compare to Z Image?

Qwen 2 supports text-to-image and image editing.

أي نسخة ينبغي أن أبدأ بها؟

اختر أرخص نسخة تفي بمعيار الجودة لديك. يبدأ معظم الفرق بالنسخة السريعة ثم ينتقلون إلى pro للإنتاج.

هل توجد خطة مجانية؟

تحصل الحسابات الجديدة على أول طلبات مجانية على كل نموذج. بعد ذلك، الدفع حسب كل طلب.

هل تدعمون البث المباشر للنتائج؟

حيث يتوفر البث المباشر، يوفّر RunAPI البث من البداية إلى النهاية.

كيف يتم احتساب الرسوم عند الفشل؟

لا يتم تحصيل رسوم على عمليات التوليد الفاشلة.

هل يتم تخزين المخرجات مؤقتًا؟

يتم حفظ المخرجات المولدة ويمكن استرجاعها بواسطة task ID. لا يتم تخزين المدخلات مؤقتًا.

هل يمكنني الاستخدام تجاريًا؟

نعم — يشمل كل إصدار الاستخدام التجاري ما لم يقيّده ترخيص النموذج صراحةً، ويُشار إلى ذلك في صفحة الإصدار.

ماذا عن حدود المعدل؟

تتدرج حدود المعدل لكل مفتاح وفق فئة الاستخدام. راجع صفحة الأسعار للاطلاع على الحدود الحالية.

أين يمكنني الإبلاغ عن المشاكل؟

افتح issue في مستودع GitHub العام أو راسل الدعم عبر البريد الإلكتروني.

ابدأ الآن

ابدأ البناء باستخدام Qwen 2 API.