Léim chuig an ábhar

GPT Image 2 API · Edit

Comhtháthú

Aitheantas na samhla 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-iarratas seo: ≈$0.222 222 gcreidmheas API Rith ar an leathanach seo

Faigh eochair API
OpenAI Eagarthóireacht Íomhá #gpt-image-2#openai#chatgpt-images-2

Eagarthóireacht GPT Image 2 le suas le 16 íomhá thagartha agus masc roghnach

Déanta ar Doitong

Saothair phoiblí déanta leis an GPT Image 2 API ag pobal Doitong. Athúsáid leid le clic amháin.

Saothair phoiblí ar taispeáint: 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,...

Tóg iarratas

Gintear na rialtáin ó scéim na samhla. Nuashonraítear an cód agus an praghas de réir mar a athraíonn tú iad.

•riachtanach 88 / 32000

Leid a úsáidtear chun íomhánna a ghiniúint.

•riachtanach image_urls
Scaoil comhad, nó · suas le 16

URLanna íomhánna tagartha don ghiniúint, teoranta do 16 íomhá.

image_size réamhshocrú auto

Toisí aschuir, tátaithe ó na híomhánna soláthraithe nuair atá 'auto' socraithe.

num_images réamhshocrú 1

Líon na n-íomhánna atá le táirgeadh.

Ardleibhéal mask · background · quality · output_format · enable_safety_checker
mask_url
Scaoil comhad, nó

URL d’íomhá mhaisc a shainaithníonn an réigiún atá le cur in eagar le linn giniúna.

background réamhshocrú auto

Cúlra na híomhá iarmharaí.

quality réamhshocrú high

Roghnú cáilíochta íomhá, lena n-áirítear 'auto' le haghaidh rogha spleách ar an leid den cháilíocht is fearr ag an tsamhail.

output_format réamhshocrú png

Formáid comhaid na n-íomhánna aschuir.

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

Rith an t-iarratas seo

Fanann d'eochair sa bhrabhsálaí seo: seoltar chuig Doitong API amháin í agus sábháiltear (localStorage) í ach amháin má chuireann tú tic le Meabhraigh. Faigh eochair API

Maidir le GPT Image 2 API · Edit

Eagraíonn nó cumascann sé íomhánna ó suas le 16 URL in `image_urls`, faoi threoir leide suas le 32000 carachtar. Cuireann `mask_url` teorainn leis an eagarthóireacht go réigiún. Is é auto an réamhshocrú do `image_size`, agus faigheann sé an méid ó na hionchuir. Réimsíonn cáilíocht ó auto go high, le suas le 4 aschur i png, jpeg nó webp.

Paraiméadair

Seol an t-ainm canónach nó an t-ainm dúchasach, ní an dá cheann. Ainmneacha canónacha

AinmCineál RéamhshocrúCeadaithe Cur síos
promptriachtanach
Cineálstring
≤ 32,000 gcarachtar≥ 2 charachtar
Leid a úsáidtear chun íomhánna a ghiniúint.
image_urlsriachtanach images
Cineálurl[] · image
≤ 16 mír
URLanna íomhánna tagartha don ghiniúint, teoranta do 16 íomhá.
image_sizeroghnach
Cineálobject
Réamhshocrúauto
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
Toisí aschuir, tátaithe ó na híomhánna soláthraithe nuair atá 'auto' socraithe.
backgroundroghnach
Cineálenum
Réamhshocrúauto
autotransparentopaque
Cúlra na híomhá iarmharaí.
qualityroghnach
Cineálenum
Réamhshocrúhigh
autolowmediumhigh
Roghnú cáilíochta íomhá, lena n-áirítear 'auto' le haghaidh rogha spleách ar an leid den cháilíocht is fearr ag an tsamhail.
num_imagesroghnach num_outputs
Cineálinteger
Réamhshocrú1
1 – 4
Líon na n-íomhánna atá le táirgeadh.
output_formatroghnach
Cineálenum
Réamhshocrúpng
jpegpngwebp
Formáid comhaid na n-íomhánna aschuir.
enable_safety_checkerroghnach
Cineálboolean
Réamhshocrútrue
Is féidir an scagadh a mhaolú trí false a shocrú, ar choinníoll go bhfuil údarú ag an nglaoiteoir.
mask_urlroghnach mask
Cineálurl · image
URL d’íomhá mhaisc a shainaithníonn an réigiún atá le cur in eagar le linn giniúna.
riachtanach Ainm canónach, glactar leis freisin

Glacann paraiméadair chomhaid le URL poiblí https://, URI data: suas le 10 MB, nó file_url uaslódála. Comhaid

Aschur

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"
  }
}
Do chuid comhad, do roghaIs cóip ar ár stóráil é gach outputs[].url: coinnithe go deo (íoctha in aghaidh GB-mhí) nó ar feadh 7 lá saor in aisce, de réir shocrú do chuntais nó ?storage=.
An cruth céanna ar gach samhailtype, url, content_type, width, height agus duration, d'íomhánna, d'fhíseáin agus d'fhuaim araon. Is é output réad toraidh na samhla féin.
Réimsí aschuir
images
array of object {url, content_type, file_name, file_size, width, height}Íomhánna a tháirgeann an tsamhail.

Tuilleadh samhlacha: Eagarthóireacht Íomhá

Do ghníomhairí AI: tá an leathanach seo mar Markdown ag https://doitong.com/ga/developers/models/openai/gpt-image-2/edit.md. Gach samhail agus treoir: https://doitong.com/developers/llms.txt