تخطّي إلى المحتوى

Recraft 20b

التكامل

معرّف النموذج recraft-20b
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/recraft-20b?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

هذا الطلب: ⁨‏0.022 $⁩ 22 رصيد API تشغيله في هذه الصفحة

الحصول على مفتاح API
Recraft من نص إلى صورة #image-generation#vector-art#typograph#style

نموذج نص إلى صورة مع العديد من الأنماط القابلة للاختيار، بما فيها الرسم المتجهي والرقمي، وتلميحات الألوان

Recraft · صورة

ستظهر نتيجتك الأولى هنا

أنشئ طلبًا أدناه وشغّله باستخدام مفتاح API الخاص بك. تُنسخ المخرجات إلى تخزيننا، وتُحفظ إلى الأبد أو لمدة 7 أيام مجانًا.

إنشاء طلب

تُنشأ عناصر التحكم من مخطط النموذج. يتحدّث الرمز والسعر عند تغييرها.

•مطلوب 88 / 1000
image_size الافتراضي square_hd
الافتراضي realistic_image

النمط المرئي المطبق على الصور المُولَّدة.

متقدم style_id · enable_safety_checker · colors

معرّف اختياري لمرجع نمط مخصص.

الافتراضي []

مصفوفة تحتوي على الألوان المفضلة.

POST /run/recraft-20b?wait=20 عرض السعر → ⁨‏0.022 $⁩
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/recraft-20b?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

تشغيل هذا الطلب

يبقى مفتاحك في هذا المتصفح: لا يُرسل إلا إلى Doitong API ويُحفظ في localStorage فقط إذا فعّلت خيار التذكّر. الحصول على مفتاح API

حول Recraft 20b

يولّد صورًا من موجّه يصل إلى 1000 محرف. توفر معلمة `style` قائمة طويلة من الخيارات للصور الواقعية والرسوم التوضيحية الرقمية والمتجهية، بينما تشير `style_id` إلى أسلوب مخصص. تقترح مصفوفة `colors` ألوانًا مفضلة، وتوفر `image_size` إعدادات مسبقة للأشكال المربعة والطولية والعرضية.

المعاملات

الاسمالنوع الافتراضيمسموح الوصف
promptمطلوب
النوعstring
≤ 1,000 حرف
image_sizeاختياري
النوعobject
الافتراضيsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
styleاختياري
النوعenum
الافتراضيrealistic_image
anyrealistic_imagedigital_illustrationvector_illustrationrealistic_image/b_and_wrealistic_image/enterpriserealistic_image/hard_flashrealistic_image/hdrrealistic_image/motion_blurrealistic_image/natural_lightrealistic_image/studio_portraitdigital_illustration/2d_art_posterdigital_illustration/2d_art_poster_2digital_illustration/3ddigital_illustration/80sdigital_illustration/engraving_color
+21 أخرىdigital_illustration/glowdigital_illustration/graindigital_illustration/hand_drawndigital_illustration/hand_drawn_outlinedigital_illustration/handmade_3ddigital_illustration/infantile_sketchdigital_illustration/kawaiidigital_illustration/pixel_artdigital_illustration/psychedelicdigital_illustration/seamlessdigital_illustration/voxeldigital_illustration/watercolorvector_illustration/cartoonvector_illustration/doodle_line_artvector_illustration/engravingvector_illustration/flat_2vector_illustration/kawaiivector_illustration/line_artvector_illustration/line_circuitvector_illustration/linocutvector_illustration/seamless
النمط المرئي المطبق على الصور المُولَّدة.
colorsاختياري
النوعobject[]
الافتراضي[]
مصفوفة تحتوي على الألوان المفضلة.
colors[].rاختياري
النوعinteger
الافتراضي0
0 – 255
قيمة المكوّن الأحمر.
colors[].gاختياري
النوعinteger
الافتراضي0
0 – 255
قيمة المكوّن الأخضر.
colors[].bاختياري
النوعinteger
الافتراضي0
0 – 255
قيمة المكوّن الأزرق.
style_idاختياري
النوعstring | null
معرّف اختياري لمرجع نمط مخصص.
enable_safety_checkerاختياري
النوعboolean
الافتراضيfalse
مفتاح فحص الأمان الذي يتطلب إعداد إيقافه تفويض الحساب. من دون هذا التفويض، يُفحص كل طلب بغض النظر عن الإعداد؛ وتفعّل true أداة الفحص.
مطلوب

المخرجات

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "recraft-20b",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 22,
    "usd": "0.022",
    "charged": 22,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200
      }
    ]
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ملفاتك، خيارككل outputs[].url هو نسخة على تخزيننا: تُحفظ إلى الأبد (مع الدفع لكل غيغابايت-شهر) أو لمدة 7 أيام مجانًا، وفق إعداد حسابك أو ?storage=.
البنية نفسها في كل نموذجtype وurl وcontent_type وwidth وheight وduration للصور والفيديو والصوت على حد سواء. output هو كائن النتائج الخاص بالنموذج.
حقول المخرجات
images
array of object {url, content_type, file_name, file_size}

لوكلاء الذكاء الاصطناعي: تتوفر هذه الصفحة بصيغة Markdown على https://doitong.com/ar/developers/models/recraft-20b.md. جميع النماذج والأدلة: https://doitong.com/developers/llms.txt