Leum chun t-susbaint

GPT Image 2 API · Edit

Amalaich

ID a’ mhodail 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"

An t-iarrtas seo: ≈$0.222 222 creideasan API Ruith e air an duilleig seo

Faigh iuchair API
OpenAI Deasachadh Ìomhaighean #gpt-image-2#openai#chatgpt-images-2

Deasachadh GPT Image 2 le suas ri 16 ìomhaighean iomraidh agus masg roghainneil

Air a dhèanamh air Doitong

Obraichean poblach a rinn coimhearsnachd Doitong le GPT Image 2 API. Ath-chleachd prompt ann an aon bhriogadh.

Obraichean poblach air an sealltainn: 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...

Tog iarrtas

Tha na smachdan air an cruthachadh bho sgeama a’ mhodail. Bidh an còd agus a’ phrìs ag ùrachadh fhad ’s a dh’atharraicheas tu iad.

•riatanach 88 / 32000

Prompt a chaidh a chleachdadh airson ìomhaighean a chruthachadh.

•riatanach image_urls
Leig às faidhle, no · suas ri 16

URLan ìomhaighean iomraidh airson gineadh, cuibhrichte ri 16 ìomhaighean.

image_size bun-roghainn auto

Meudan às-chuir, air an co-dhùnadh bho na h-ìomhaighean a chaidh a thoirt seachad nuair a tha iad air an suidheachadh gu 'auto'.

num_images bun-roghainn 1

Àireamh nan ìomhaighean ri chruthachadh.

Adhartach mask · background · quality · output_format · enable_safety_checker
mask_url
Leig às faidhle, no

URL airson ìomhaigh maise a chomharraicheas an roinn ri deasachadh rè gineadh.

background bun-roghainn auto

Cùl-raon na h-ìomhaighe a thàinig às.

quality bun-roghainn high

Taghadh càileachd ìomhaighe, a’ gabhail a-steach 'auto' airson roghainn a tha an urra ris a’ phrompt den chàileachd as fheàrr leis a’ mhodail.

output_format bun-roghainn png

Cruth faidhle nan ìomhaighean às-chuir.

POST /run/openai/gpt-image-2/edit?wait=20 tuairmse → $0.222
# 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"

Ruith an t-iarrtas seo

Fuirichidh an iuchair agad sa bhrobhsair seo: thèid a cur chun Doitong API a-mhàin agus a sàbhaladh (localStorage) a-mhàin ma chuireas tu comharra ri Cuimhnich. Faigh iuchair API

Mu GPT Image 2 API · Edit

Deasaich no dèan co-dhèanamh de dh’ìomhaighean bho suas ri 16 URLan ann an `image_urls`, air an stiùireadh le prompt de suas ri 32000 caractar. Bidh `mask_url` a’ cuingealachadh an deasachaidh ri roinn shònraichte. Tha `image_size` a’ cleachdadh auto mar bhun-roghainn, a nì tomhas air a’ mheud bho na h-ion-chur. Tha càileachd a’ dol bho auto gu high, le suas ri 4 toraidhean ann an png, jpeg no webp.

Paramadairean

Cuir an t-ainm canonical no an t-ainm dùthchasach, chan e an dà chuid. Ainmean canonical

AinmSeòrsa Bun-roghainnCeadaichte Tuairisgeul
promptriatanach
Seòrsastring
≤ 32,000 caractar≥ 2 caractar
Prompt a chaidh a chleachdadh airson ìomhaighean a chruthachadh.
image_urlsriatanach images
Seòrsaurl[] · image
≤ 16 nì
URLan ìomhaighean iomraidh airson gineadh, cuibhrichte ri 16 ìomhaighean.
image_sizeroghainneil
Seòrsaobject
Bun-roghainnauto
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
Meudan às-chuir, air an co-dhùnadh bho na h-ìomhaighean a chaidh a thoirt seachad nuair a tha iad air an suidheachadh gu 'auto'.
backgroundroghainneil
Seòrsaenum
Bun-roghainnauto
autotransparentopaque
Cùl-raon na h-ìomhaighe a thàinig às.
qualityroghainneil
Seòrsaenum
Bun-roghainnhigh
autolowmediumhigh
Taghadh càileachd ìomhaighe, a’ gabhail a-steach 'auto' airson roghainn a tha an urra ris a’ phrompt den chàileachd as fheàrr leis a’ mhodail.
num_imagesroghainneil num_outputs
Seòrsainteger
Bun-roghainn1
1 – 4
Àireamh nan ìomhaighean ri chruthachadh.
output_formatroghainneil
Seòrsaenum
Bun-roghainnpng
jpegpngwebp
Cruth faidhle nan ìomhaighean às-chuir.
enable_safety_checkerroghainneil
Seòrsaboolean
Bun-roghainntrue
Faodar sgrìonadh a shocrachadh le false, ma tha cead aig an neach-gairm.
mask_urlroghainneil mask
Seòrsaurl · image
URL airson ìomhaigh maise a chomharraicheas an roinn ri deasachadh rè gineadh.
riatanach Ainm canonical, gabhar ris cuideachd

Gabhaidh paramadairean faidhle ri URL poblach https://, URI data: suas ri 10 MB, no file_url de luchdachadh suas. Faidhlichean

Toradh

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"
  }
}
Na faidhlichean agad, do roghainnTha gach outputs[].url na lethbhreac air an stòradh againn: air a chumail gu bràth (air a phàigheadh gach GB-mìos) no 7 latha an-asgaidh, a rèir suidheachadh a’ chunntais agad no ?storage=.
An aon chruth air gach modailtype, url, content_type, width, height agus duration, airson dealbhan, bhidio agus fuaim le chèile. ’S e output nì toraidh a’ mhodail fhèin.
Raointean toraidh
images
array of object {url, content_type, file_name, file_size, width, height}Ìomhaighean a chaidh a chruthachadh leis a’ mhodail.

Barrachd mhodalan: Deasachadh Ìomhaighean

Do riochdairean AI: tha an duilleag seo mar Markdown aig https://doitong.com/gd/developers/models/openai/gpt-image-2/edit.md. Na modailean agus na treòraichean uile: https://doitong.com/developers/llms.txt