رفتن به محتوا

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"

این درخواست: ⁨‎$۰٫۰۲۲⁩ ۲۲ اعتبار API اجرای آن در این صفحه

دریافت کلید API
Recraft متن به تصویر #image-generation#vector-art#typograph#style

مدل متن‌به‌تصویر با سبک‌های قابل انتخاب فراوان، ازجمله تصویرسازی برداری و دیجیتال، و راهنمایی رنگ

Recraft · تصویر

اولین نتیجه شما اینجا قرار می‌گیرد

درخواست را در زیر بسازید و با کلید API خود اجرا کنید. خروجی‌ها در فضای ذخیره‌سازی ما کپی می‌شوند و برای همیشه یا به‌مدت ۷ روز رایگان نگه‌داری می‌شوند.

ساخت درخواست

کنترل‌ها از شِمای مدل تولید می‌شوند. با تغییر آن‌ها، کد و قیمت به‌روزرسانی می‌شوند.

•الزامی 88 / 1000
image_size پیش‌فرض square_hd
پیش‌فرض realistic_image

سبک بصری اعمال‌شده روی تصاویر تولیدشده.

پیشرفته style_id · enable_safety_checker · colors

شناسه اختیاری برای مرجع سبک سفارشی.

پیش‌فرض []

آرایه حاوی رنگ‌های ترجیحی.

POST /run/recraft-20b?wait=20 قیمت → ⁨‎$۰٫۰۲۲⁩
# 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
≤ ۱٬۰۰۰ نویسه
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
۰ – ۲۵۵
مقدار مؤلفه قرمز.
colors[].gاختیاری
نوعinteger
پیش‌فرض0
۰ – ۲۵۵
مقدار مؤلفه سبز.
colors[].bاختیاری
نوعinteger
پیش‌فرض0
۰ – ۲۵۵
مقدار مؤلفه آبی.
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 کپی‌ای در فضای ذخیره‌سازی ماست: برای همیشه (با هزینه به‌ازای هر GB-ماه) یا به‌مدت ۷ روز رایگان، بر اساس تنظیم حساب شما یا ?storage=.
ساختار یکسان در همه مدل‌هاtype، url، content_type، width، height و duration برای تصاویر، ویدیو و صدا یکسان هستند. output شیء نتیجه اختصاصی مدل است.
فیلدهای خروجی
images
array of object {url, content_type, file_name, file_size}

برای عامل‌های هوش مصنوعی: این صفحه به‌صورت Markdown در دسترس است https://doitong.com/fa/developers/models/recraft-20b.md. همه مدل‌ها و راهنماها: https://doitong.com/developers/llms.txt