> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# واجهة برمجة تطبيقات Qwen Image للتوليد والتحرير

> Qwen Image API guide - Ace Data Cloud

`POST https://api.acedata.cloud/qwen-image/images` تُكمل توليد الصور من النص وتحرير 1–3 صور مرجعية عبر الواجهة نفسها، وتدعم `qwen-image-3.0` و`qwen-image-3.0-pro`.

## اختيار النموذج

| النموذج | السيناريوهات المناسبة | السعر القياسي الرسمي |
| - | - | - |
| `qwen-image-3.0` | الإنشاء الدفعي، التكرار السريع | الإخراج \$0.030/صورة |
| `qwen-image-3.0-pro` | التخطيطات المعقدة، النتائج عالية الدقة | 1K $0.040/صورة؛ 2K $0.075/صورة |

تُحتسب تكلفة الصور المرجعية وفقًا لعدد المدخلات الفعلي، والسعر القياسي الرسمي هو \$0.003/صورة.

## التوليد المتزامن

```bash theme={null}
curl -X POST 'https://api.acedata.cloud/qwen-image/images' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen-image-3.0",
    "prompt": "A simple red circle centered on a clean white background.",
    "size": "1024*1024",
    "n": 1,
    "watermark": false
  }'
```

تتضمن الاستجابة الناجحة عنوان صورة CDN دائمًا، والاستخدام الفعلي وتكلفة هذه المرة:

```json theme={null}
{
  "success": true,
  "task_id": "565a7f55-72c6-43ed-b274-268ff046e5b4",
  "trace_id": "bb923cec-1550-43b4-8df2-288ac0977b4b",
  "data": [
    {"image_url": "https://cdn.acedata.cloud/assets/examples/qwen-image/40d5c76b-2f84-4b04-9ea0-b706417ae622-bac6a9e9de22.png"}
  ],
  "usage": {
    "input_image_count": 0,
    "output_image_count": 1,
    "output_image_type": "qima_output_1k",
    "output_width": 1024,
    "output_height": 1024
  },
  "cost": {"amount": 0.322, "currency": "credit", "list_amount": 0.35}
}
```

## تحرير الصور المرجعية

أضف `image_urls`، مع دعم 1–3 صور متاحة للوصول العام:

```json theme={null}
{
  "model": "qwen-image-3.0-pro",
  "prompt": "保留主体，将背景改成暖色电影海报风格",
  "image_urls": [
    "https://cdn.acedata.cloud/assets/examples/qwen-image/40d5c76b-2f84-4b04-9ea0-b706417ae622-bac6a9e9de22.png"
  ],
  "size": "2048*2048",
  "n": 1,
  "watermark": false
}
```

`prompt_extend_mode=agent` يُستخدم فقط لتوليد الصور من النص. نطاق `n` هو 1–6؛ ويجب أن تكون نسبة العرض إلى الارتفاع بين 1:8 و8:1.

## المهام غير المتزامنة

بعد تعيين `async: true` تُرجع الواجهة `task_id` فورًا. استخدم `/qwen-image/tasks` للاستعلام عن الحالة النهائية، أو مرّر `callback_url` لتلقي إشعار الإكمال. يُحتسب التوليد مرة واحدة فقط، ولا تُفرض تكلفة متكررة على استعلامات المهام.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.