Neidio i'r cynnwys

GPT Image 2 API · Edit

Integreiddio

ID y model 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"

Y cais hwn: ≈$0.222 222 o gredydau API Ei redeg ar y dudalen hon

Cael allwedd API
OpenAI Golygu Delweddau #gpt-image-2#openai#chatgpt-images-2

Golygu GPT Image 2 gyda hyd at 16 o ddelweddau cyfeirio a mwgwd opsiynol

Wedi'i wneud ar Doitong

Gwaith cyhoeddus a wnaed gyda GPT Image 2 API gan gymuned Doitong. Ailddefnyddiwch anogwr mewn un clic.

Gwaith cyhoeddus wedi'i ddangos: 16
Art style: Реалистичный кулинарный блог. Финальный кадр, средний план ведущей. Она улыбается свое...

Art style: Реалистичный кулинарный блог. Финальный кадр, средний план ведущей. Она улыбается своей самой широкой и дружелюбной улыбкой, глядя в камеру. Она делает призывающий жест руками, словно приглашая к общению. Перед ней на столе по-прежнему лежат аппетитные булочки. Освещение становится...

Grungy analog photo of Daphne Blake (from Serial scooby doo) watching her own movie on a 90s CRT ...

Grungy analog photo of Daphne Blake (from Serial scooby doo) watching her own movie on a 90s CRT TV in a dimly lit bedroom. The TV clearly shows animated scene from scooby doo, with a cartoon-style Daphne in her classic clothes on screen, smiling. Daphne Blake is sitting cross-legged on the floor...

Fotografia realistica scattata dall’interno di un appartamento situato a un piano abbastanza alto...

Fotografia realistica scattata dall’interno di un appartamento situato a un piano abbastanza alto, guardando verso il basso attraverso una finestra aperta su una normale strada cittadina. In strada, una folla numerosa di manifestanti avanza compatta; alcune persone indossano passamontagna. Sul...

Art style: Disney-inspired. Золушка walking further back in the frame; Косметолог standing in the...

Art style: Disney-inspired. Золушка walking further back in the frame; Косметолог standing in the near foreground. The couch and strip of reflective floor separate them. Золушка is walking on glossy floor near the open doorway further back in the frame in the midground. Torso in three-quarter...

Art style: Реалистичный кулинарный блог. Экстремально крупный план рук ведущей, разламывающих гот...

Art style: Реалистичный кулинарный блог. Экстремально крупный план рук ведущей, разламывающих готовую, горячую булочку. Булочка имеет аппетитную золотисто-коричневую корочку, густо посыпанную поджаренным кунжутом. В месте разлома видна пористая, воздушная и очень мягкая текстура мякиша...

Art style: Реалистичный кулинарный блог. Финальный кадр, средний план ведущей. Она улыбается свое...

Art style: Реалистичный кулинарный блог. Финальный кадр, средний план ведущей. Она улыбается своей самой широкой и дружелюбной улыбкой, глядя в камеру. Она делает призывающий жест руками, словно приглашая к общению. Перед ней на столе по-прежнему лежат аппетитные булочки. Освещение становится...

Square album cover for an energetic house dance single. A dancing crowd silhouette in a night clu...

Square album cover for an energetic house dance single. A dancing crowd silhouette in a night club under warm orange and golden stage lights, flying sparks and flames rising from the dance floor, misty Scottish highland mountains faintly visible in the glowing background. Bold modern clean...

Medium shot of launch team executives in smart casual blazers over plain t-shirts, sitting in a m...

Medium shot of launch team executives in smart casual blazers over plain t-shirts, sitting in a modern conference room facing a large display showing the 'International AI Safety Report' document title from February 2026, professional lighting. Context markers: smart casual blazer, plain t-shirt,...

Adeiladu cais

Cynhyrchir rheolyddion o sgema'r model. Mae'r cod a'r pris yn diweddaru wrth i chi eu newid.

•gofynnol 88 / 32000

Anogiad a ddefnyddir i gynhyrchu delweddau.

•gofynnol image_urls
Gollyngwch ffeil, neu · hyd at 16

URLau delwedd gyfeirio ar gyfer cynhyrchu, wedi'u cyfyngu i 16 delwedd.

image_size rhagosodedig auto

Dimensiynau allbwn, wedi'u casglu o'r delweddau a ddarperir pan gânt eu gosod i 'auto'.

num_images rhagosodedig 1

Nifer y delweddau i'w cynhyrchu.

Uwch mask · background · quality · output_format · enable_safety_checker
mask_url
Gollyngwch ffeil, neu

URL ar gyfer delwedd mwgwd sy'n nodi'r rhan i'w golygu wrth gynhyrchu.

background rhagosodedig auto

Cefndir y ddelwedd sy'n deillio.

quality rhagosodedig high

Dewis ansawdd delwedd, gan gynnwys 'auto' ar gyfer dewis sy'n dibynnu ar yr anogiad o'r ansawdd gorau gan y model.

output_format rhagosodedig png

Fformat ffeil yr allbwn delweddau.

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

Rhedeg y cais hwn

Mae'ch allwedd yn aros yn y porwr hwn: caiff ei hanfon at Doitong API yn unig a'i chadw (localStorage) dim ond os ticiwch Cofio. Cael allwedd API

Ynglŷn â GPT Image 2 API · Edit

Yn golygu neu’n cyfansoddi delweddau o hyd at 16 URL yn `image_urls`, wedi’u harwain gan anogwr o hyd at 32000 o nodau. Mae `mask_url` yn cyfyngu’r golygu i ran benodol. Mae `image_size` yn rhagosod i auto, sy’n casglu’r maint o’r mewnbynnau. Mae ansawdd yn amrywio o auto i high, gyda hyd at 4 allbwn yn png, jpeg neu webp.

Paramedrau

Anfonwch naill ai'r enw canonaidd neu'r enw brodorol, nid y ddau. Enwau canonaidd

EnwMath RhagosodedigCaniateir Disgrifiad
promptgofynnol
Mathstring
≤ 32,000 nod≥ 2 nod
Anogiad a ddefnyddir i gynhyrchu delweddau.
image_urlsgofynnol images
Mathurl[] · image
≤ 16 eitem
URLau delwedd gyfeirio ar gyfer cynhyrchu, wedi'u cyfyngu i 16 delwedd.
image_sizedewisol
Mathobject
Rhagosodedigauto
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
Dimensiynau allbwn, wedi'u casglu o'r delweddau a ddarperir pan gânt eu gosod i 'auto'.
backgrounddewisol
Mathenum
Rhagosodedigauto
autotransparentopaque
Cefndir y ddelwedd sy'n deillio.
qualitydewisol
Mathenum
Rhagosodedighigh
autolowmediumhigh
Dewis ansawdd delwedd, gan gynnwys 'auto' ar gyfer dewis sy'n dibynnu ar yr anogiad o'r ansawdd gorau gan y model.
num_imagesdewisol num_outputs
Mathinteger
Rhagosodedig1
1 – 4
Nifer y delweddau i'w cynhyrchu.
output_formatdewisol
Mathenum
Rhagosodedigpng
jpegpngwebp
Fformat ffeil yr allbwn delweddau.
enable_safety_checkerdewisol
Mathboolean
Rhagosodedigtrue
Gellir llacio'r sgrinio drwy osod false, ar yr amod bod y galwr wedi'i awdurdodi.
mask_urldewisol mask
Mathurl · image
URL ar gyfer delwedd mwgwd sy'n nodi'r rhan i'w golygu wrth gynhyrchu.
gofynnol Enw canonaidd, derbyniol hefyd

Mae paramedrau ffeil yn derbyn URL cyhoeddus https://, URI data: hyd at 10 MB, neu file_url uwchlwythiad. Ffeiliau

Allbwn

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"
  }
}
Eich ffeiliau, eich dewisMae pob outputs[].url yn gopi ar ein storio: wedi'i gadw am byth (telir fesul GB-mis) neu am 7 diwrnod am ddim, yn ôl gosodiad eich cyfrif neu ?storage=.
Yr un siâp ar bob modeltype, url, content_type, width, height a duration, ar gyfer delweddau, fideo a sain fel ei gilydd. Gwrthrych canlyniad y model ei hun yw output.
Meysydd yr allbwn
images
array of object {url, content_type, file_name, file_size, width, height}Delweddau a gynhyrchir gan y model.

Mwy o fodelau: Golygu Delweddau

Ar gyfer asiantau AI: mae'r dudalen hon fel Markdown ar gael yn https://doitong.com/cy/developers/models/openai/gpt-image-2/edit.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt