رفتن به محتوا

GPT Image 2 API · Edit

یکپارچه‌سازی

شناسه مدل openai/gpt-image-2/edit
# 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/openai/gpt-image-2/edit?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",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# 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
OpenAI ویرایش تصویر #gpt-image-2#openai#chatgpt-images-2

ویرایش GPT Image 2 با حداکثر 16 تصویر مرجع و ماسک اختیاری

ساخته‌شده در Doitong

آثار عمومی ساخته‌شده با GPT Image 2 API توسط جامعه Doitong. یک پرامپت را با یک کلیک دوباره استفاده کنید.

آثار عمومی نمایش‌داده‌شده: 16
A polished studio concept art board — a single composite page that reads as a high-end pre-produc...

A polished studio concept art board — a single composite page that reads as a high-end pre-production pitch deck for an animated short. NOT a vintage pencil sketch, NOT a finished movie frame, but a polished concept page in the visual treatment described below. Layout: TOP HEADER (left): bold...

Создай не меняя черты лица. Фотореалистичный винтажный cinematic portrait. В кадре большое наполь...

Создай не меняя черты лица. Фотореалистичный винтажный cinematic portrait. В кадре большое напольное зеркало в тонкой арочной раме. Спиной к камере у зеркала стоит взрослая девушка-, корпус развёрнут к своему отражению, голова слегка повёрнута в профиль, взгляд направлен в зеркало на свою...

Создай не меняя черты лица. Фотореалистичный винтажный cinematic portrait. В кадре большое наполь...

Создай не меняя черты лица. Фотореалистичный винтажный cinematic portrait. В кадре большое напольное зеркало в тонкой арочной раме. Спиной к камере у зеркала стоит взрослая девушка-, корпус развёрнут к своему отражению, голова слегка повёрнута в профиль, взгляд направлен в зеркало на свою...

Create image: ultra realistic image: man 35 years old sitting in super luxury house (ref4). Luxur...

Create image: ultra realistic image: man 35 years old sitting in super luxury house (ref4). Luxury furniture, marble floor with east carpet. The most luxurious way. Middle shot One cake in front of him on the marble table, with thin golden lit candles. A man sits relaxed on a luxurious sofa. The...

Create image: ultra realistic image: man 35 years old sitting in super luxury house. Luxury furni...

Create image: ultra realistic image: man 35 years old sitting in super luxury house. Luxury furniture, marble floor with east carpet. The most luxurious way. Middle shot One cake in front of him on the marble table, with thin golden lit candles. A man sits relaxed on a luxurious sofa. The man is...

Сделай этикетку на продукцию оформленную красиво и стильно в соответствии с составом. Можешь орие...

Сделай этикетку на продукцию оформленную красиво и стильно в соответствии с составом. Можешь ориентироваться по стилю на фото 1. Текст на этикетке: производитель ИП Стрини Ю.Л. «соломка горбуши», состав: рыба горбуша, соль, сахар, специи. Срок хранения при t не от 0 до -3 60 суток. Вес: 500гр

Create image: ultra realistic image: man 35 years old (attached reference ) sitting in super luxu...

Create image: ultra realistic image: man 35 years old (attached reference ) sitting in super luxury house. Luxury furniture, marble floor with east carpet. The most luxurious way. Middle shot One cake in front of him on the marble table, with thin golden lit candles. A man sits relaxed on a...

Create image: ultra realistic image: man 35 years old sitting in super luxury house. Luxury furni...

Create image: ultra realistic image: man 35 years old sitting in super luxury house. Luxury furniture, marble floor with east carpet. The most luxurious way. Middle shot One cake in front of him on the marble table, with thin golden lit candles. A man sits relaxed on a luxurious sofa. The man is...

ساخت درخواست

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

•الزامی 88 / 32000

پرامپت استفاده‌شده برای تولید تصاویر.

•الزامی image_urls
یک فایل بیندازید، یا · حداکثر 16

URL تصاویر مرجع برای تولید، با محدودیت 16 تصویر.

image_size پیش‌فرض auto

ابعاد خروجی که هنگام تنظیم روی 'auto' از تصاویر ارائه‌شده استنباط می‌شود.

num_images پیش‌فرض 1

تعداد تصاویر برای تولید.

پیشرفته mask · background · quality · output_format · enable_safety_checker
mask_url
یک فایل بیندازید، یا

URL تصویر ماسکی که ناحیه ویرایش هنگام تولید را مشخص می‌کند.

background پیش‌فرض auto

پس‌زمینه تصویر نتیجه.

quality پیش‌فرض high

انتخاب کیفیت تصویر، شامل 'auto' برای انتخاب وابسته به پرامپتِ بهترین کیفیت توسط مدل.

output_format پیش‌فرض png

قالب فایل تصاویر خروجی.

POST /run/openai/gpt-image-2/edit?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/openai/gpt-image-2/edit?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",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# 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

درباره GPT Image 2 API · Edit

تصاویر را از حداکثر 16 URL در `image_urls` و با راهنمایی پرامپتی حداکثر 32000 نویسه‌ای ویرایش یا ترکیب می‌کند. `mask_url` ناحیه ویرایش را محدود می‌کند. مقدار پیش‌فرض `image_size`، گزینه auto است که اندازه را از ورودی‌ها تشخیص می‌دهد. کیفیت از auto تا high است و حداکثر 4 خروجی در قالب png، jpeg یا webp برمی‌گرداند.

پارامترها

نام استاندارد یا نام بومی را ارسال کنید، نه هر دو. نام‌های استاندارد

نامنوع پیش‌فرضمجاز توضیحات
promptالزامی
نوعstring
≤ ۳۲٬۰۰۰ نویسه≥ ۲ نویسه
پرامپت استفاده‌شده برای تولید تصاویر.
image_urlsالزامی images
نوعurl[] · image
≤ ۱۶ مورد
URL تصاویر مرجع برای تولید، با محدودیت 16 تصویر.
image_sizeاختیاری
نوعobject
پیش‌فرضauto
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
ابعاد خروجی که هنگام تنظیم روی 'auto' از تصاویر ارائه‌شده استنباط می‌شود.
backgroundاختیاری
نوعenum
پیش‌فرضauto
autotransparentopaque
پس‌زمینه تصویر نتیجه.
qualityاختیاری
نوعenum
پیش‌فرضhigh
autolowmediumhigh
انتخاب کیفیت تصویر، شامل 'auto' برای انتخاب وابسته به پرامپتِ بهترین کیفیت توسط مدل.
num_imagesاختیاری num_outputs
نوعinteger
پیش‌فرض1
۱ – ۴
تعداد تصاویر برای تولید.
output_formatاختیاری
نوعenum
پیش‌فرضpng
jpegpngwebp
قالب فایل تصاویر خروجی.
enable_safety_checkerاختیاری
نوعboolean
پیش‌فرضtrue
با تنظیم false، در صورت مجاز بودن فراخواننده، می‌توان بررسی را آسان‌گیرانه‌تر کرد.
mask_urlاختیاری mask
نوعurl · image
URL تصویر ماسکی که ناحیه ویرایش هنگام تولید را مشخص می‌کند.
الزامی نام استاندارد، همچنین پذیرفته می‌شود

پارامترهای فایل یک URL عمومی https://، یک URI از نوع data: تا سقف 10 MB، یا file_url یک فایل بارگذاری‌شده را می‌پذیرند. فایل‌ها

خروجی

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "openai/gpt-image-2/edit",
  "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": 222,
    "usd": "0.222",
    "charged": 222,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "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,
        "width": 1024,
        "height": 768
      }
    ]
  },
  "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, width, height}تصاویر تولیدشده توسط مدل.

مدل‌های بیشتر: ویرایش تصویر

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