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
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...

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