{
  "aboutHtml": "<p>GLM-Image نموذج Zhipu لتحويل النص إلى صورة، وهو متاح بالمحدِّد الدقيق glm-image. استخدم POST /v1/images/generations مع model وprompt. صِف الموضوع ومحيطه والمعالجة البصرية والتكوين الذي تريد إنتاجه. والمدخل المدعوم لهذا الملف هو وصف مكتوب للصورة، لذا ينبغي أن ينقل prompt المظهر والترتيب المهمين مباشرة.</p><p>لتكوين منتج، صِف العنصر وزاوية الكاميرا والخلفية والإضاءة ومواضع العناصر المساندة. ولرسم توضيحي، حدّد الفعل الرئيسي ولوحة الألوان وأسلوب الرسم. قد يطلب موجز مفيد كوبًا خزفيًا على سطح طاولة فاتح، ومنظرًا جانبيًا، وضوء نافذة ناعمًا، ومساحة خالية فوق الموضوع لعنوان منفصل. صِف المساحة المقصودة والتسلسل البصري بدل الاعتماد على تعليمة عامة مثل «اصنع إعلانًا».</p><p>المقاس الافتراضي هو 1280x1280. وقيم size الموثّقة لهذا النموذج تحديدًا هي 1280x1280 و1568x1056 و1056x1568 و1472x1088 و1088x1472 و1728x960 و960x1728. اختر مقاسًا أفقيًا أو عموديًا يناسب موضع الاستخدام قبل إرسال الموجز. أبقِ هذه السلاسل الدقيقة في حقل size؛ فهي تحدد البكسلات وليست اسم دقة عرض.</p><p>يدعم GLM-Image الخيار quality=hd، وهو إعداد الجودة الافتراضي له. القيمة المنطقية watermark_enabled افتراضيًا true، وتتحكم في إعداد العلامة المائية الموثّق. وإذا قدّمت user_id، فالطول الموثّق هو 6–128 محرفًا. تصف عناصر التحكم هذه أجزاء مختلفة من الطلب: يحدد size الإطار، ويختار quality إعداد التصيير المدعوم، ويحدد watermark_enabled سلوك العلامة المائية.</p><p>التوليد متزامن: تتضمن الاستجابة المكتملة created ومصفوفة data بعناوين URL للصور. احتفظ بكل عنصر data مُعاد واسترجع كل صورة تنوي استخدامها. راجع التكوين الفعلي وتفاصيل الموضوع وأي كتابة مرسومة بمقارنتها بالموجز، ثم احتفظ بالصورة المختارة مع prompt وإعداداتها. توفّر استجابة الصورة المكتملة النتيجة مباشرة؛ ولا يقدّم هذا الملف مهمة توليد منفصلة لاستطلاع حالتها.</p>",
  "aboutText": "GLM-Image نموذج Zhipu لتحويل النص إلى صورة، وهو متاح بالمحدِّد الدقيق glm-image. استخدم POST /v1/images/generations مع model وprompt. صِف الموضوع ومحيطه والمعالجة البصرية والتكوين الذي تريد إنتاجه. والمدخل المدعوم لهذا الملف هو وصف مكتوب للصورة، لذا ينبغي أن ينقل prompt المظهر والترتيب المهمين مباشرة.\n\nلتكوين منتج، صِف العنصر وزاوية الكاميرا والخلفية والإضاءة ومواضع العناصر المساندة. ولرسم توضيحي، حدّد الفعل الرئيسي ولوحة الألوان وأسلوب الرسم. قد يطلب موجز مفيد كوبًا خزفيًا على سطح طاولة فاتح، ومنظرًا جانبيًا، وضوء نافذة ناعمًا، ومساحة خالية فوق الموضوع لعنوان منفصل. صِف المساحة المقصودة والتسلسل البصري بدل الاعتماد على تعليمة عامة مثل «اصنع إعلانًا».\n\nالمقاس الافتراضي هو 1280x1280. وقيم size الموثّقة لهذا النموذج تحديدًا هي 1280x1280 و1568x1056 و1056x1568 و1472x1088 و1088x1472 و1728x960 و960x1728. اختر مقاسًا أفقيًا أو عموديًا يناسب موضع الاستخدام قبل إرسال الموجز. أبقِ هذه السلاسل الدقيقة في حقل size؛ فهي تحدد البكسلات وليست اسم دقة عرض.\n\nيدعم GLM-Image الخيار quality=hd، وهو إعداد الجودة الافتراضي له. القيمة المنطقية watermark_enabled افتراضيًا true، وتتحكم في إعداد العلامة المائية الموثّق. وإذا قدّمت user_id، فالطول الموثّق هو 6–128 محرفًا. تصف عناصر التحكم هذه أجزاء مختلفة من الطلب: يحدد size الإطار، ويختار quality إعداد التصيير المدعوم، ويحدد watermark_enabled سلوك العلامة المائية.\n\nالتوليد متزامن: تتضمن الاستجابة المكتملة created ومصفوفة data بعناوين URL للصور. احتفظ بكل عنصر data مُعاد واسترجع كل صورة تنوي استخدامها. راجع التكوين الفعلي وتفاصيل الموضوع وأي كتابة مرسومة بمقارنتها بالموجز، ثم احتفظ بالصورة المختارة مع prompt وإعداداتها. توفّر استجابة الصورة المكتملة النتيجة مباشرة؛ ولا يقدّم هذا الملف مهمة توليد منفصلة لاستطلاع حالتها.",
  "editorialOverlay": {
    "copy_fields": null,
    "copy_sha256": null,
    "copy_source": null,
    "html_sha256": "1f8b1876cb6470330fffc4fadd15bc95e682fee09e3e3140e093cb1381a00d3c",
    "module_sha256": "ee9dc1c50b1e6a8fb7fa062030fcb4646b9aaaeb08be513b723a5a92a7290f06",
    "raw_model_unchanged": true,
    "schema": "ailoot-native-model-editorial-v1"
  },
  "locale": "ar",
  "methods": [
    {
      "html": "<div class=\"sheet-head\"><span class=\"mav\" aria-hidden=\"true\">•</span><h2 id=\"sheet-title\">glm-image</h2><button class=\"icon-btn\" type=\"button\" data-close-sheet aria-label=\"إغلاق\">×</button></div><div class=\"idline\"><span>ZHIPU /</span><code>glm-image</code><button type=\"button\" id=\"copy-id\">نسخ ID</button></div><nav class=\"card-jump-nav\" aria-label=\"أقسام بطاقة النموذج\"><button type=\"button\" data-card-jump=\"overview\">البداية</button><button type=\"button\" data-card-jump=\"methods\">المدخلات والطرائق</button><button type=\"button\" data-card-jump=\"pricing\">الباقات</button><button type=\"button\" data-card-jump=\"examples\">أمثلة</button><button type=\"button\" data-card-jump=\"results\">النتائج</button><button type=\"button\" data-card-jump=\"aliases\">الأسماء البديلة</button></nav><div class=\"card-method-tabs\" role=\"tablist\" aria-label=\"طرائق API\"><button type=\"button\" role=\"tab\" tabindex=\"0\" aria-controls=\"card-method-content\" aria-selected=\"true\" id=\"card-method-tab-0\" data-card-method=\"Ultra|images|/v1/images/generations|glm-image\">الصور</button></div><div id=\"card-method-content\" role=\"tabpanel\" aria-labelledby=\"card-method-tab-0\"><section class=\"card-section\" data-card-section=\"overview\"><h3 tabindex=\"-1\">البداية</h3><p class=\"mdesc-full\">يحوّل GLM-Image موجزًا بصريًا مكتوبًا إلى صور. استخدم المحدِّد الدقيق glm-image للرسوم التوضيحية وتصورات المشاهد وتكوينات المنتجات، واختر من المقاسات المربعة والأفقية والعمودية الموثّقة له. يقبل هذا الملف النص ويعيد نتائج الصور في استجابة متزامنة.</p><dl class=\"card-io\" data-card-io><div><dt>المدخلات المقبولة</dt><dd>النص</dd></div><div><dt>النتائج</dt><dd>الصور</dd></div></dl><details class=\"card-about\"><summary>عن النموذج</summary><p class=\"note-s\" data-model-method-boundary>يغطي هذا الوصف قدرات النموذج. وترد أدناه المدخلات والمخرجات والخيارات المتاحة في Ailoot للطريقة المحددة.</p><div class=\"mabout\" id=\"m-about\"><p>GLM-Image نموذج Zhipu لتحويل النص إلى صورة، وهو متاح بالمحدِّد الدقيق glm-image. استخدم POST /v1/images/generations مع model وprompt. صِف الموضوع ومحيطه والمعالجة البصرية والتكوين الذي تريد إنتاجه. والمدخل المدعوم لهذا الملف هو وصف مكتوب للصورة، لذا ينبغي أن ينقل prompt المظهر والترتيب المهمين مباشرة.</p><p>لتكوين منتج، صِف العنصر وزاوية الكاميرا والخلفية والإضاءة ومواضع العناصر المساندة. ولرسم توضيحي، حدّد الفعل الرئيسي ولوحة الألوان وأسلوب الرسم. قد يطلب موجز مفيد كوبًا خزفيًا على سطح طاولة فاتح، ومنظرًا جانبيًا، وضوء نافذة ناعمًا، ومساحة خالية فوق الموضوع لعنوان منفصل. صِف المساحة المقصودة والتسلسل البصري بدل الاعتماد على تعليمة عامة مثل «اصنع إعلانًا».</p><p>المقاس الافتراضي هو 1280x1280. وقيم size الموثّقة لهذا النموذج تحديدًا هي 1280x1280 و1568x1056 و1056x1568 و1472x1088 و1088x1472 و1728x960 و960x1728. اختر مقاسًا أفقيًا أو عموديًا يناسب موضع الاستخدام قبل إرسال الموجز. أبقِ هذه السلاسل الدقيقة في حقل size؛ فهي تحدد البكسلات وليست اسم دقة عرض.</p><p>يدعم GLM-Image الخيار quality=hd، وهو إعداد الجودة الافتراضي له. القيمة المنطقية watermark_enabled افتراضيًا true، وتتحكم في إعداد العلامة المائية الموثّق. وإذا قدّمت user_id، فالطول الموثّق هو 6–128 محرفًا. تصف عناصر التحكم هذه أجزاء مختلفة من الطلب: يحدد size الإطار، ويختار quality إعداد التصيير المدعوم، ويحدد watermark_enabled سلوك العلامة المائية.</p><p>التوليد متزامن: تتضمن الاستجابة المكتملة created ومصفوفة data بعناوين URL للصور. احتفظ بكل عنصر data مُعاد واسترجع كل صورة تنوي استخدامها. راجع التكوين الفعلي وتفاصيل الموضوع وأي كتابة مرسومة بمقارنتها بالموجز، ثم احتفظ بالصورة المختارة مع prompt وإعداداتها. توفّر استجابة الصورة المكتملة النتيجة مباشرة؛ ولا يقدّم هذا الملف مهمة توليد منفصلة لاستطلاع حالتها.</p></div></details></section><section class=\"card-section\" data-card-section=\"methods\"><h3 tabindex=\"-1\">متاح في Ailoot · المدخلات والطرائق</h3><details class=\"card-method\" open><summary><b>Ailoot Ultra · Images</b> <code>POST /v1/images/generations</code></summary><dl class=\"method-capabilities\"><div><dt>الإدخال</dt><dd><code>text</code></dd></div><div><dt>الإخراج</dt><dd><code>image</code></dd></div><div><dt>صيغة الإخراج</dt><dd>ملف صورة</dd></div></dl><div class=\"tw\" data-card-parameters data-typed-parameters><table><thead><tr><th>الحقل</th><th>النوع</th><th>المتطلب</th><th>القيم والحدود</th><th>القيمة الافتراضية</th></tr></thead><tbody><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>string</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>مطلوب</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span><div>glm-image</div></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"unspecified\"><span class=\"card-cell-label\">القيمة الافتراضية</span>—</td></tr><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">prompt</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>string</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>مطلوب</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"unspecified\"><span class=\"card-cell-label\">القيمة الافتراضية</span>—</td></tr><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">size</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>string</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>اختياري</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span><div>1280x1280, 1568x1056, 1056x1568, 1472x1088, 1088x1472, 1728x960, 960x1728</div></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"known\"><span class=\"card-cell-label\">القيمة الافتراضية</span>1280x1280</td></tr><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">user_id</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>string</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>اختياري</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"unspecified\"><span class=\"card-cell-label\">القيمة الافتراضية</span>—</td></tr><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">quality</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>string</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>اختياري</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span><div>hd, standard</div></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"unspecified\"><span class=\"card-cell-label\">القيمة الافتراضية</span>—</td></tr><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">watermark_enabled</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>boolean</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>اختياري</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"known\"><span class=\"card-cell-label\">القيمة الافتراضية</span>true</td></tr><tr><th data-cell-label=\"الحقل\" scope=\"row\"><span class=\"card-cell-label\">الحقل</span><code class=\"card-field-name\">stream</code></th><td data-cell-label=\"النوع\" data-field-type><span class=\"card-cell-label\">النوع</span><code>boolean</code></td><td data-cell-label=\"المتطلب\"><span class=\"card-cell-label\">المتطلب</span>اختياري</td><td data-cell-label=\"القيم والحدود\"><span class=\"card-cell-label\">القيم والحدود</span><div>false</div></td><td data-cell-label=\"القيمة الافتراضية\" data-default=\"unspecified\"><span class=\"card-cell-label\">القيمة الافتراضية</span>—</td></tr></tbody></table></div><details class=\"note-s\" data-method-contract><summary>معلمات الطريقة ودورة حياتها</summary><div class=\"tw\" data-card-table=\"contract\"><table><thead><tr><th>المعلمة</th><th>المواصفات</th></tr></thead><tbody><tr><th data-cell-label=\"المعلمة\" scope=\"row\"><span class=\"card-cell-label\">المعلمة</span><code>content_type</code></th><td data-cell-label=\"المواصفات\"><span class=\"card-cell-label\">المواصفات</span>application/json</td></tr><tr><th data-cell-label=\"المعلمة\" scope=\"row\"><span class=\"card-cell-label\">المعلمة</span><code>required</code></th><td data-cell-label=\"المواصفات\"><span class=\"card-cell-label\">المواصفات</span>model, prompt</td></tr><tr><th data-cell-label=\"المعلمة\" scope=\"row\"><span class=\"card-cell-label\">المعلمة</span><code>optional</code></th><td data-cell-label=\"المواصفات\"><span class=\"card-cell-label\">المواصفات</span>size, user_id, quality, watermark_enabled, stream</td></tr><tr><th data-cell-label=\"المعلمة\" scope=\"row\"><span class=\"card-cell-label\">المعلمة</span><code>material_types</code></th><td data-cell-label=\"المواصفات\"><span class=\"card-cell-label\">المواصفات</span>text</td></tr><tr><th data-cell-label=\"المعلمة\" scope=\"row\"><span class=\"card-cell-label\">المعلمة</span><code>conditions</code></th><td data-cell-label=\"المواصفات\"><span class=\"card-cell-label\">المواصفات</span>Use stream:false or omit stream. The complete buffered JSON result contains all generated images.</td></tr></tbody></table></div><p>دورة الحياة: <code>synchronous_result_then_owned_library</code></p><p class=\"note-s\"><code>GET /v1/media/assets</code></p><p class=\"note-s\"><code>GET /v1/media/assets/{asset_id}</code></p></details></details></section><section class=\"card-section\" data-card-section=\"pricing\"><h3 tabindex=\"-1\">الباقات</h3><div class=\"card-result-process\" data-billing-basis><h5>كيفية احتساب الرسوم النهائية</h5><p class=\"note-s\">تقدّر التعرفات المعروضة التكلفة قبل التوليد. تُحسب الرسوم النهائية من التكلفة المسجّلة لعملية التوليد الأصلية. مدة المخرجات المقاسة والكميات المتوقعة ليست الكمية النهائية الخاضعة للفوترة.</p></div><div data-native-semantic-method=\"v1\" data-tariff-reference-only><p class=\"note-s\" data-rate-support-note>مراجع التسعير لا تضيف خيارات للطلب. المعلمات المدعومة مذكورة للطريقة المحددة.</p><dl data-price-conditions><dt>الوضع السريع</dt><dd>غير محدد <span class=\"note-s\">عند اختيار الوضع السريع</span></dd><dt>الوضع المرن</dt><dd>غير محدد <span class=\"note-s\">عند اختيار وضع flex</span></dd><dt>أقصى جهد للاستدلال</dt><dd>غير محدد <span class=\"note-s\">عندما يُطبَّق الضبط الافتراضي default مع أقصى جهد للاستدلال</span></dd></dl></div><div data-declared-tariff-pricing><h4>تعرفات تقديرية للمقارنة</h4><h4>الأسعار حسب الإعدادات</h4><p class=\"note-s\">طابق كل رسم مع الشروط المعروضة. طبّق تعرفة واحدة لكل مجموعة من الإعدادات البديلة.</p><div class=\"tw\" data-pricing-profiles><table><thead><tr><th>الإعدادات</th><th>جدول التعرفة</th><th>الكمية المتوقعة</th><th>الرسوم</th></tr></thead><tbody><tr><th data-cell-label=\"الإعدادات\" scope=\"row\"><span class=\"card-cell-label\">الإعدادات</span>التعرفات الأساسية للرموز</th><td data-cell-label=\"جدول التعرفة\"><span class=\"card-cell-label\">جدول التعرفة</span>التعرفة الأساسية</td><td data-cell-label=\"الكمية المتوقعة\"><span class=\"card-cell-label\">الكمية المتوقعة</span>—</td><td data-cell-label=\"الرسوم\"><span class=\"card-cell-label\">الرسوم</span><div><span>الإدخال · رموز الإدخال · تقدير للمقارنة فقط</span> <b>—</b> <span class=\"price-unit\">/ 1K من الرموز</span></div><div><span>الإخراج · رموز الإخراج · تقدير للمقارنة فقط</span> <b>—</b> <span class=\"price-unit\">/ 1K من الرموز</span></div><div><span>الإدخال · قراءة ذاكرة التخزين المؤقت · تقدير للمقارنة فقط</span> <b>—</b> <span class=\"price-unit\">/ 1K من الرموز</span></div><div><span>الإدخال · الكتابة إلى ذاكرة التخزين المؤقت · تقدير للمقارنة فقط</span> <b>—</b> <span class=\"price-unit\">/ 1K من الرموز</span></div><div><span>الإدخال · الكتابة إلى ذاكرة التخزين المؤقت، 1 ساعة · تقدير للمقارنة فقط</span> <b>—</b> <span class=\"price-unit\">/ 1K من الرموز</span></div></td></tr><tr><th data-cell-label=\"الإعدادات\" scope=\"row\"><span class=\"card-cell-label\">الإعدادات</span>Estimated generation cost</th><td data-cell-label=\"جدول التعرفة\"><span class=\"card-cell-label\">جدول التعرفة</span>—</td><td data-cell-label=\"الكمية المتوقعة\"><span class=\"card-cell-label\">الكمية المتوقعة</span>تقدير لتوليد واحد</td><td data-cell-label=\"الرسوم\"><span class=\"card-cell-label\">الرسوم</span><div><span>الإدخال · تكلفة التوليد التقديرية · تقدير للمقارنة فقط</span> <b>$0.09</b> <span class=\"price-unit\">تقدير قبل الإنشاء</span></div><p class=\"note-s\">This estimate is not an additional charge or a fixed rate for the completed generation.</p></td></tr></tbody></table></div></div><p class=\"note-s\">تحجز Ailoot مبلغًا تقديريًا قبل الطلب. وبعد ظهور النتيجة، تُسوّي الرسوم النهائية بناءً على الاستخدام المقاس. وتستخدم تسوية البث سجل الاستخدام النهائي. <a href=\"/docs/ar/billing/reserve/\">كيفية عمل حجز المبلغ وتسوية الرسوم →</a></p></section><section class=\"card-section\" data-card-section=\"examples\"><h3 tabindex=\"-1\">أمثلة للطلبات</h3><h4>Ailoot Ultra · Images</h4><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"خيارات الشيفرة\"><button class=\"cg-tab\" id=\"model-code-11-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-11-panel-0\" aria-selected=\"true\" tabindex=\"0\">curl · أنشئ مرة واحدة واحتفظ بالنتيجة كاملة</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"نسخ الشيفرة\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-11-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-11-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\nexport AILOOT_API_KEY\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json,os\nfrom pathlib import Path\np=json.loads(&#39;{&quot;model&quot;: &quot;glm-image&quot;, &quot;prompt&quot;: &quot;A calm studio product photograph with a plain background.&quot;}&#39;)\n\nPath(&quot;request.json&quot;).write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @request.json -D response-headers.txt -o result.json\n# Submit once. Retain the complete result, original identifiers and every response header.\n</code></pre></div></div></div></section><section class=\"card-section\" data-card-section=\"results\"><h3 tabindex=\"-1\">استلام النتائج وحفظها</h3><h4>Ailoot Ultra · Images</h4><p class=\"note-s\">نزّل كل صورة مُرجعة أو احفظ محتواها بصيغة Base64</p><ul class=\"card-result-paths\"><li><code>GET /v1/media/assets</code></li><li><code>GET /v1/media/assets/{asset_id}</code></li></ul><div class=\"card-result-process\" data-all-results><h5>الاحتفاظ بكل النتائج المكتملة</h5><p class=\"note-s\">احفظ كل صورة مكتملة؛ نزّلها من كل URL مُرجع، أو فك ترميز محتواها بصيغة Base64.</p><p class=\"note-s\">Retain every returned image and field. Use owned content_url values and actual asset_id records; refresh the same asset when a link expires.</p></div><div class=\"card-result-process\" data-unknown-recovery><h5>عند الحاجة إلى التحقق من الاستجابة الأصلية</h5><p class=\"note-s\">Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.</p></div></section><section class=\"card-section\" data-card-section=\"aliases\"><h3 tabindex=\"-1\">الأسماء البديلة</h3><h4>الأسماء البديلة للنموذج</h4><p class=\"note-s\"><span data-model-alias-route=\"Ultra\"><b>Ailoot Ultra</b> <a href=\"#m=glm-image&amp;route=Ultra&amp;caller=glm-image&amp;fmt=images\"><code>glm-image</code></a></span></p><h4>الأسماء البديلة لمسارات الطرائق</h4><p class=\"note-s\">استخدم مسارات الطرائق المعروضة أعلاه.</p><h4>معرّفات النماذج ذات الصلة IDs</h4><p class=\"note-s\"><a href=\"#m=glm-image&amp;route=Ultra&amp;caller=glm-image&amp;fmt=images\"><code>glm-image</code></a></p></section></div>",
      "method_identity": {
        "effective_request_model_id": "glm-image",
        "fmt": "images",
        "http": "POST",
        "path": "/v1/images/generations",
        "request_model_id": "glm-image",
        "route_label": "Ultra"
      },
      "method_key": "Ultra|images|/v1/images/generations|glm-image",
      "ordinal": 0,
      "rawMethod": {
        "available": null,
        "billing_basis": {
          "basis": "original_invoice_usd",
          "description": "The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.",
          "forecast_quantity_is_estimate": true,
          "physical_output_is_billable_quantity": false,
          "version": "original_invoice_usd_v1"
        },
        "cache_read": null,
        "cache_write": null,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Retain the complete response, all actual results, original identifiers, usage and response headers.",
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "example_body": {
              "model": "glm-image",
              "prompt": "A calm studio product photograph with a plain background."
            },
            "lifecycle": {
              "assets": [
                {
                  "http": "GET",
                  "path": "/v1/media/assets",
                  "query": {
                    "cursor": "actual returned next_cursor, when present",
                    "family": "image"
                  }
                },
                {
                  "http": "GET",
                  "path": "/v1/media/assets/{asset_id}"
                }
              ],
              "cancel_endpoint": null,
              "create": {
                "http": "POST",
                "path": "/v1/images/generations"
              },
              "mode": "synchronous_result_then_owned_library",
              "operation_id_is_not_task_id": true,
              "owned_content": {
                "http": "GET",
                "path": "/v1/media/assets/{asset_id}/content",
                "url_source": "Use the exact returned content_url. Refresh an expired link by reading the same existing asset."
              },
              "status": [],
              "unknown": "Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.",
              "unknown_no_replay": true
            },
            "outputs": {
              "all_results": "Retain every returned image and field. Use owned content_url values and actual asset_id records; refresh the same asset when a link expires.",
              "family": "image",
              "format": "JSON with all URL or base64 outputs"
            },
            "parameters": [
              {
                "default_known": false,
                "enum": [
                  "glm-image"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "default_known": false,
                "enum_known": false,
                "name": "prompt",
                "required": true,
                "type": "string"
              },
              {
                "default": "1280x1280",
                "default_known": true,
                "enum": [
                  "1280x1280",
                  "1568x1056",
                  "1056x1568",
                  "1472x1088",
                  "1088x1472",
                  "1728x960",
                  "960x1728"
                ],
                "enum_known": true,
                "name": "size",
                "required": false,
                "type": "string"
              },
              {
                "default_known": false,
                "enum_known": false,
                "name": "user_id",
                "required": false,
                "type": "string"
              },
              {
                "default_known": false,
                "enum": [
                  "hd",
                  "standard"
                ],
                "enum_known": true,
                "name": "quality",
                "required": false,
                "type": "string"
              },
              {
                "default": true,
                "default_known": true,
                "enum_known": false,
                "name": "watermark_enabled",
                "required": false,
                "type": "boolean"
              },
              {
                "default_known": false,
                "enum": [
                  false
                ],
                "enum_known": true,
                "name": "stream",
                "required": false,
                "type": "boolean"
              }
            ],
            "request_schema": {
              "additionalProperties": true,
              "properties": {
                "model": {
                  "enum": [
                    "glm-image"
                  ],
                  "type": "string"
                },
                "prompt": {
                  "type": "string"
                },
                "quality": {
                  "enum": [
                    "hd",
                    "standard"
                  ],
                  "type": "string"
                },
                "size": {
                  "default": "1280x1280",
                  "enum": [
                    "1280x1280",
                    "1568x1056",
                    "1056x1568",
                    "1472x1088",
                    "1088x1472",
                    "1728x960",
                    "960x1728"
                  ],
                  "type": "string"
                },
                "stream": {
                  "enum": [
                    false
                  ],
                  "type": "boolean"
                },
                "user_id": {
                  "type": "string"
                },
                "watermark_enabled": {
                  "default": true,
                  "type": "boolean"
                }
              },
              "required": [
                "model",
                "prompt"
              ],
              "type": "object"
            },
            "schema_template": {
              "body": {
                "model": "glm-image",
                "prompt": "A calm studio product photograph with a plain background."
              },
              "content_type": "application/json"
            }
          },
          "input": {
            "conditions": [
              "Use stream:false or omit stream. The complete buffered JSON result contains all generated images."
            ],
            "content_type": "application/json",
            "material_types": [
              "text"
            ],
            "optional": [
              "size",
              "user_id",
              "quality",
              "watermark_enabled",
              "stream"
            ],
            "required": [
              "model",
              "prompt"
            ]
          },
          "lifecycle": {
            "assets": [
              {
                "http": "GET",
                "path": "/v1/media/assets",
                "query": {
                  "cursor": "actual returned next_cursor, when present",
                  "family": "image"
                }
              },
              {
                "http": "GET",
                "path": "/v1/media/assets/{asset_id}"
              }
            ],
            "cancel_endpoint": null,
            "create": {
              "http": "POST",
              "path": "/v1/images/generations"
            },
            "mode": "synchronous_result_then_owned_library",
            "operation_id_is_not_task_id": true,
            "owned_content": {
              "http": "GET",
              "path": "/v1/media/assets/{asset_id}/content",
              "url_source": "Use the exact returned content_url. Refresh an expired link by reading the same existing asset."
            },
            "status": [],
            "unknown": "Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.",
            "unknown_no_replay": true
          },
          "method": {
            "http": "POST",
            "path": "/v1/images/generations"
          },
          "method_aliases": [],
          "output": {
            "all_results": "Retain every returned image and field. Use owned content_url values and actual asset_id records; refresh the same asset when a link expires.",
            "family": "image",
            "format": "JSON with all URL or base64 outputs"
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.09",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.09",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\nexport AILOOT_API_KEY\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\np=json.loads('{\"model\": \"glm-image\", \"prompt\": \"A calm studio product photograph with a plain background.\"}')\n\nPath(\"request.json\").write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.json\n# Submit once. Retain the complete result, original identifiers and every response header.\n",
            "label": "curl · create once and retain the complete result",
            "language": "bash"
          }
        ],
        "family": "openai",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "images",
        "http": "POST",
        "img_in": null,
        "img_out": null,
        "in": null,
        "input": [
          "text"
        ],
        "label": "Images",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "out": null,
        "output": [
          "image"
        ],
        "path": "/v1/images/generations",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "original_invoice_usd",
          "cache_read_price": null,
          "cache_write_1h_price": null,
          "cache_write_price": null,
          "fast_multiplier": null,
          "flex_multiplier": null,
          "image_input_price": null,
          "image_output_price": null,
          "input_price": null,
          "intervals": null,
          "max_reasoning_effort_multiplier": null,
          "output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.09",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.09",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "request_model_id": "glm-image",
        "route_label": "Ultra",
        "status_reads": [],
        "tiers": [],
        "unit": "image",
        "units": [
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          },
          {
            "amount": "0.09",
            "amount_unit": "usd_per_exact_native_unit",
            "billing_input": false,
            "estimate_only": true,
            "key": "forecast_usd",
            "label": "Estimated generation cost",
            "native_amount_usd_per_unit": "0.09",
            "native_quantity": 1,
            "public_unit_label": "estimate before generation",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "request_estimate"
          }
        ]
      }
    }
  ],
  "model_id": "glm-image",
  "nativeProvenance": {
    "input_facts_canonical_sha256": "b0436bc3c22f8ddddfc8ed640fb45aeccebe9baa854bafcc0c8c8927f4618f03",
    "input_html_sha256": "a0239217dbdbf3510492fb8d98469dfd5a41a30a51ed5cfdbf0f8d567952b0c6",
    "private_audit_sha256": "93ef8aaf73f989c38c81bcec4771e1314317fb12aa1fbc7b3b16f7cc0dba9243",
    "role": "historical-normalized-input-audit-hashes",
    "schema": "ailoot-native-model-provenance-v2"
  },
  "page": {
    "canonical": "https://ailoot.ai/models/ar/glm-image/",
    "description": "يحوّل GLM-Image موجزًا بصريًا مكتوبًا إلى صور. استخدم المحدِّد الدقيق glm-image للرسوم التوضيحية وتصورات المشاهد وتكوينات المنتجات، واختر من المقاسات المربعة والأفقية والعمودية الموثّقة له. يقبل هذا الملف النص ويعيد نتائج الصور في استجابة متزامنة.",
    "locale": "ar",
    "md_url": "https://ailoot.ai/models/ar/glm-image/index.md",
    "title": "glm-image — Ailoot",
    "url": "https://ailoot.ai/models/ar/glm-image/"
  },
  "rawModel": {
    "about": "GLM-Image نموذج Zhipu لتحويل النص إلى صورة، وهو متاح بالمحدِّد الدقيق glm-image. استخدم POST /v1/images/generations مع model وprompt. صِف الموضوع ومحيطه والمعالجة البصرية والتكوين الذي تريد إنتاجه. والمدخل المدعوم لهذا الملف هو وصف مكتوب للصورة، لذا ينبغي أن ينقل prompt المظهر والترتيب المهمين مباشرة.\n\nلتكوين منتج، صِف العنصر وزاوية الكاميرا والخلفية والإضاءة ومواضع العناصر المساندة. ولرسم توضيحي، حدّد الفعل الرئيسي ولوحة الألوان وأسلوب الرسم. قد يطلب موجز مفيد كوبًا خزفيًا على سطح طاولة فاتح، ومنظرًا جانبيًا، وضوء نافذة ناعمًا، ومساحة خالية فوق الموضوع لعنوان منفصل. صِف المساحة المقصودة والتسلسل البصري بدل الاعتماد على تعليمة عامة مثل «اصنع إعلانًا».\n\nالمقاس الافتراضي هو 1280x1280. وقيم size الموثّقة لهذا النموذج تحديدًا هي 1280x1280 و1568x1056 و1056x1568 و1472x1088 و1088x1472 و1728x960 و960x1728. اختر مقاسًا أفقيًا أو عموديًا يناسب موضع الاستخدام قبل إرسال الموجز. أبقِ هذه السلاسل الدقيقة في حقل size؛ فهي تحدد البكسلات وليست اسم دقة عرض.\n\nيدعم GLM-Image الخيار quality=hd، وهو إعداد الجودة الافتراضي له. القيمة المنطقية watermark_enabled افتراضيًا true، وتتحكم في إعداد العلامة المائية الموثّق. وإذا قدّمت user_id، فالطول الموثّق هو 6–128 محرفًا. تصف عناصر التحكم هذه أجزاء مختلفة من الطلب: يحدد size الإطار، ويختار quality إعداد التصيير المدعوم، ويحدد watermark_enabled سلوك العلامة المائية.\n\nالتوليد متزامن: تتضمن الاستجابة المكتملة created ومصفوفة data بعناوين URL للصور. احتفظ بكل عنصر data مُعاد واسترجع كل صورة تنوي استخدامها. راجع التكوين الفعلي وتفاصيل الموضوع وأي كتابة مرسومة بمقارنتها بالموجز، ثم احتفظ بالصورة المختارة مع prompt وإعداداتها. توفّر استجابة الصورة المكتملة النتيجة مباشرة؛ ولا يقدّم هذا الملف مهمة توليد منفصلة لاستطلاع حالتها.",
    "alias_of": null,
    "aliases": [],
    "author": "ZHIPU",
    "ctx": null,
    "formats": [
      "images"
    ],
    "id": "glm-image",
    "input": [
      "text"
    ],
    "kind": "image",
    "max_out": null,
    "methods": [
      {
        "available": null,
        "billing_basis": {
          "basis": "original_invoice_usd",
          "description": "The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.",
          "forecast_quantity_is_estimate": true,
          "physical_output_is_billable_quantity": false,
          "version": "original_invoice_usd_v1"
        },
        "cache_read": null,
        "cache_write": null,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Retain the complete response, all actual results, original identifiers, usage and response headers.",
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "example_body": {
              "model": "glm-image",
              "prompt": "A calm studio product photograph with a plain background."
            },
            "lifecycle": {
              "assets": [
                {
                  "http": "GET",
                  "path": "/v1/media/assets",
                  "query": {
                    "cursor": "actual returned next_cursor, when present",
                    "family": "image"
                  }
                },
                {
                  "http": "GET",
                  "path": "/v1/media/assets/{asset_id}"
                }
              ],
              "cancel_endpoint": null,
              "create": {
                "http": "POST",
                "path": "/v1/images/generations"
              },
              "mode": "synchronous_result_then_owned_library",
              "operation_id_is_not_task_id": true,
              "owned_content": {
                "http": "GET",
                "path": "/v1/media/assets/{asset_id}/content",
                "url_source": "Use the exact returned content_url. Refresh an expired link by reading the same existing asset."
              },
              "status": [],
              "unknown": "Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.",
              "unknown_no_replay": true
            },
            "outputs": {
              "all_results": "Retain every returned image and field. Use owned content_url values and actual asset_id records; refresh the same asset when a link expires.",
              "family": "image",
              "format": "JSON with all URL or base64 outputs"
            },
            "parameters": [
              {
                "default_known": false,
                "enum": [
                  "glm-image"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "default_known": false,
                "enum_known": false,
                "name": "prompt",
                "required": true,
                "type": "string"
              },
              {
                "default": "1280x1280",
                "default_known": true,
                "enum": [
                  "1280x1280",
                  "1568x1056",
                  "1056x1568",
                  "1472x1088",
                  "1088x1472",
                  "1728x960",
                  "960x1728"
                ],
                "enum_known": true,
                "name": "size",
                "required": false,
                "type": "string"
              },
              {
                "default_known": false,
                "enum_known": false,
                "name": "user_id",
                "required": false,
                "type": "string"
              },
              {
                "default_known": false,
                "enum": [
                  "hd",
                  "standard"
                ],
                "enum_known": true,
                "name": "quality",
                "required": false,
                "type": "string"
              },
              {
                "default": true,
                "default_known": true,
                "enum_known": false,
                "name": "watermark_enabled",
                "required": false,
                "type": "boolean"
              },
              {
                "default_known": false,
                "enum": [
                  false
                ],
                "enum_known": true,
                "name": "stream",
                "required": false,
                "type": "boolean"
              }
            ],
            "request_schema": {
              "additionalProperties": true,
              "properties": {
                "model": {
                  "enum": [
                    "glm-image"
                  ],
                  "type": "string"
                },
                "prompt": {
                  "type": "string"
                },
                "quality": {
                  "enum": [
                    "hd",
                    "standard"
                  ],
                  "type": "string"
                },
                "size": {
                  "default": "1280x1280",
                  "enum": [
                    "1280x1280",
                    "1568x1056",
                    "1056x1568",
                    "1472x1088",
                    "1088x1472",
                    "1728x960",
                    "960x1728"
                  ],
                  "type": "string"
                },
                "stream": {
                  "enum": [
                    false
                  ],
                  "type": "boolean"
                },
                "user_id": {
                  "type": "string"
                },
                "watermark_enabled": {
                  "default": true,
                  "type": "boolean"
                }
              },
              "required": [
                "model",
                "prompt"
              ],
              "type": "object"
            },
            "schema_template": {
              "body": {
                "model": "glm-image",
                "prompt": "A calm studio product photograph with a plain background."
              },
              "content_type": "application/json"
            }
          },
          "input": {
            "conditions": [
              "Use stream:false or omit stream. The complete buffered JSON result contains all generated images."
            ],
            "content_type": "application/json",
            "material_types": [
              "text"
            ],
            "optional": [
              "size",
              "user_id",
              "quality",
              "watermark_enabled",
              "stream"
            ],
            "required": [
              "model",
              "prompt"
            ]
          },
          "lifecycle": {
            "assets": [
              {
                "http": "GET",
                "path": "/v1/media/assets",
                "query": {
                  "cursor": "actual returned next_cursor, when present",
                  "family": "image"
                }
              },
              {
                "http": "GET",
                "path": "/v1/media/assets/{asset_id}"
              }
            ],
            "cancel_endpoint": null,
            "create": {
              "http": "POST",
              "path": "/v1/images/generations"
            },
            "mode": "synchronous_result_then_owned_library",
            "operation_id_is_not_task_id": true,
            "owned_content": {
              "http": "GET",
              "path": "/v1/media/assets/{asset_id}/content",
              "url_source": "Use the exact returned content_url. Refresh an expired link by reading the same existing asset."
            },
            "status": [],
            "unknown": "Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.",
            "unknown_no_replay": true
          },
          "method": {
            "http": "POST",
            "path": "/v1/images/generations"
          },
          "method_aliases": [],
          "output": {
            "all_results": "Retain every returned image and field. Use owned content_url values and actual asset_id records; refresh the same asset when a link expires.",
            "family": "image",
            "format": "JSON with all URL or base64 outputs"
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.09",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.09",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\nexport AILOOT_API_KEY\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\np=json.loads('{\"model\": \"glm-image\", \"prompt\": \"A calm studio product photograph with a plain background.\"}')\n\nPath(\"request.json\").write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.json\n# Submit once. Retain the complete result, original identifiers and every response header.\n",
            "label": "curl · create once and retain the complete result",
            "language": "bash"
          }
        ],
        "family": "openai",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "images",
        "http": "POST",
        "img_in": null,
        "img_out": null,
        "in": null,
        "input": [
          "text"
        ],
        "label": "Images",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "out": null,
        "output": [
          "image"
        ],
        "path": "/v1/images/generations",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "original_invoice_usd",
          "cache_read_price": null,
          "cache_write_1h_price": null,
          "cache_write_price": null,
          "fast_multiplier": null,
          "flex_multiplier": null,
          "image_input_price": null,
          "image_output_price": null,
          "input_price": null,
          "intervals": null,
          "max_reasoning_effort_multiplier": null,
          "output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": false,
                "estimate_only": true,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "basis": "This estimate is not an additional charge or a fixed rate for the completed generation.",
            "dimensions": {
              "forecast_quantity": "one generation estimate"
            },
            "label": "Estimated generation cost",
            "units": [
              {
                "amount": "0.09",
                "amount_unit": "usd_per_exact_native_unit",
                "billing_input": false,
                "estimate_only": true,
                "key": "forecast_usd",
                "label": "Estimated generation cost",
                "native_amount_usd_per_unit": "0.09",
                "native_quantity": 1,
                "public_unit_label": "estimate before generation",
                "quantity": 1,
                "quantity_is_estimate": true,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "request_estimate"
              }
            ]
          }
        ],
        "request_model_id": "glm-image",
        "route_label": "Ultra",
        "status_reads": [],
        "tiers": [],
        "unit": "image",
        "units": [
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": false,
            "estimate_only": true,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          },
          {
            "amount": "0.09",
            "amount_unit": "usd_per_exact_native_unit",
            "billing_input": false,
            "estimate_only": true,
            "key": "forecast_usd",
            "label": "Estimated generation cost",
            "native_amount_usd_per_unit": "0.09",
            "native_quantity": 1,
            "public_unit_label": "estimate before generation",
            "quantity": 1,
            "quantity_is_estimate": true,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "request_estimate"
          }
        ]
      }
    ],
    "model_aliases": [
      {
        "canonical_model_id": "glm-image",
        "request_model_id": "glm-image",
        "route_label": "Ultra"
      }
    ],
    "name": "glm-image",
    "price": {
      "in": null,
      "in_label": null,
      "out": null,
      "out_label": null,
      "sort_in": null,
      "sort_out": null,
      "varies": true
    },
    "short": "يحوّل GLM-Image موجزًا بصريًا مكتوبًا إلى صور. استخدم المحدِّد الدقيق glm-image للرسوم التوضيحية وتصورات المشاهد وتكوينات المنتجات، واختر من المقاسات المربعة والأفقية والعمودية الموثّقة له. يقبل هذا الملف النص ويعيد نتائج الصور في استجابة متزامنة."
  },
  "renderer_schema": {
    "method_order": "Original DTO methods order; every exact route/format/path/caller survives.",
    "prices": "Original public DTO fields and original native display HTML; no flattened or normalized offers."
  },
  "representation": "exact-public-dto-and-native-renderer-html",
  "representationNotes": {
    "current_reference": {
      "about_json_pointer": "/aboutHtml",
      "methods": [
        {
          "contract_json_pointer": "/methods/0/rawMethod/contract",
          "html_json_pointer": "/methods/0/html",
          "method_ordinal": 0
        }
      ],
      "role": "current-semantic-reference"
    },
    "raw_input": {
      "examples_role": "historical-input-not-current-ready-examples",
      "json_pointers": [
        "/rawModel",
        "/methods/0/rawMethod"
      ],
      "role": "historical-owner-input"
    },
    "schema": "ailoot-native-model-representations-v1"
  },
  "schema": "ailoot-static-model-facts-v1",
  "schema_version": 1,
  "shortText": "يحوّل GLM-Image موجزًا بصريًا مكتوبًا إلى صور. استخدم المحدِّد الدقيق glm-image للرسوم التوضيحية وتصورات المشاهد وتكوينات المنتجات، واختر من المقاسات المربعة والأفقية والعمودية الموثّقة له. يقبل هذا الملف النص ويعيد نتائج الصور في استجابة متزامنة.",
  "source": {
    "audit_sha256": "2e00086bcbfc28e64d0cebe97aa47c17d8d5618963027f8ffb9dc6123d7d25b1",
    "bridge_map_sha256": "1125275768b9636fc8461bc7da5061239a81ddfe508e2557843ca42c58ab0036",
    "raw_model_json_sha256": "6ff7d65e69b6fcfe89103efcd4521b9e3b3545e8a586e3bda8df9d6087efdec0",
    "renderer_sha256": "081ee0fd5b6b1b60564b02c52d62547e01e922c8c0a16e91a0d055073e76a10e"
  },
  "sourceRevision": "a710171abf250f0110e79a3cd45ebb42060479796dfb527b0518e31013613010"
}
