Leum chun t-susbaint

GPT Image 2 API

Amalaich

ID a’ mhodail 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-iarrtas seo: ≈$0.106 106 creideasan API Ruith e air an duilleig seo

Faigh iuchair API
OpenAI Teacsa gu Ìomhaigh #gpt-image-2#openai#typography#chatgpt-images-2

GPT Image 2 teacsa-gu-ìomhaigh le meudan sùbailte suas ri oir 3840px, airson clò-sgrìobhadh mionaideach

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

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.

image_size bun-roghainn landscape_4_3

Gabhaidh meudan às-chuir ri ainm ro-shuidhichte, nì {width, height}, no 'auto' airson an roghainn meud as fheàrr aig a’ mhodail. Feumaidh gach meud concrait tomhasan a ghabhas roinneadh le 16, oirean nach eil nas fhaide na 3840px, co-mheas taobh aig a’ char as motha 3:1, agus àireamh iomlan piogsail de 655,360–8,294,400.

num_images bun-roghainn 1

Àireamh nan ìomhaighean ri chruthachadh.

Adhartach background · quality · output_format · enable_safety_checker
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?wait=20 tuairmse → $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"

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

A’ gineadh ìomhaighean bho phrompt le suas ri 32000 caractaran. Bidh `image_size` a’ gabhail ri ro-shuidhichte, auto no leud is àirde soilleir, far am feum an dà mheud a bhith nan iomadan de 16 le oir as àirde 3840px. Faodaidh càileachd a bhith auto, low, medium no high, le suas ri 4 ìomhaighean gach gairm 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_sizeroghainneil
Seòrsaobject
Bun-roghainnlandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
Gabhaidh meudan às-chuir ri ainm ro-shuidhichte, nì {width, height}, no 'auto' airson an roghainn meud as fheàrr aig a’ mhodail. Feumaidh gach meud concrait tomhasan a ghabhas roinneadh le 16, oirean nach eil nas fhaide na 3840px, co-mheas taobh aig a’ char as motha 3:1, agus àireamh iomlan piogsail de 655,360–8,294,400.
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.
riatanach Ainm canonical, gabhar ris cuideachd

Toradh

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"
  }
}
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: Teacsa gu Ìomhaigh

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