Léim chuig an ábhar

GPT Image 2 API

Comhtháthú

Aitheantas na samhla openai/gpt-image-2
# 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?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"
  }'

# 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.106 106 gcreidmheas API Rith ar an leathanach seo

Faigh eochair API
OpenAI Téacs go hÍomhá #gpt-image-2#openai#typography#chatgpt-images-2

Téacs-go-híomhá GPT Image 2 le méideanna solúbtha suas le ciumhais 3840px, dírithe ar chlóghrafaíocht mhín

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.

image_size réamhshocrú landscape_4_3

Glacann toisí aschuir le hainm réamhshocraithe, réad {width, height}, nó 'auto' don rogha méide is fearr ón tsamhail. Ní mór do gach méid nithiúil a bheith inroinnte ar 16, gan ciumhais níos faide ná 3840px, cóimheas gné nach mó ná 3:1, agus líon iomlán picteilíní idir 655,360–8,294,400.

num_images réamhshocrú 1

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

Ardleibhéal background · quality · output_format · enable_safety_checker
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?wait=20 luachan → $0.106
# 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?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"
  }'

# 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

Gineann sé íomhánna ó leid suas le 32000 carachtar. Glacann `image_size` le réamhshocruithe, auto, nó leithead agus airde sainráite, agus caithfidh an dá thoise a bheith ina n-iolraithe de 16 le huasciumhais 3840px. Is féidir cáilíocht a bheith auto, low, medium nó high, le suas le 4 íomhá in aghaidh an ghlao 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_sizeroghnach
Cineálobject
Réamhshocrúlandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
Glacann toisí aschuir le hainm réamhshocraithe, réad {width, height}, nó 'auto' don rogha méide is fearr ón tsamhail. Ní mór do gach méid nithiúil a bheith inroinnte ar 16, gan ciumhais níos faide ná 3840px, cóimheas gné nach mó ná 3:1, agus líon iomlán picteilíní idir 655,360–8,294,400.
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.
riachtanach Ainm canónach, glactar leis freisin

Aschur

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "openai/gpt-image-2",
  "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": 106,
    "usd": "0.106",
    "charged": 106,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "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: Téacs go hÍomhá

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