Ruka hadi kwenye maudhui

gpt-image-1 · Edit Image

Unganisha

Kitambulisho cha modeli gpt-image-1/edit-image
# 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/gpt-image-1/edit-image?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"

Faili kama mfano: $ 0.27 salio za API 270 faili zako hupimwa kabla ya kuendesha Iendeshe kwenye ukurasa huu

Pata ufunguo wa API

Hubadilisha au kuchanganya picha za marejeo kwa kidokezo, ikiwa na mpangilio wa uaminifu wa ingizo na chaguo la mandharinyuma yenye uwazi

Imetengenezwa kwenye Doitong

Kazi za umma zilizotengenezwa kwa gpt-image-1 na jumuiya ya Doitong. Tumia tena kidokezo kwa kubofya mara moja.

Kazi za umma zilizoonyeshwa: 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,...

Unda ombi

Vidhibiti vinazalishwa kutoka kwenye schema ya modeli. Msimbo na bei husasishwa unapovibadilisha.

•inahitajika

Kidokezo kilichotumika kuzalisha picha.

•inahitajika image_urls
Dondosha faili, au

URL zinazoelekeza kwenye picha za marejeleo za uzalishaji.

image_size chaguomsingi auto

Uwiano wa picha ya picha inayotokana.

quality chaguomsingi auto

Ubora wa picha inayotokana.

input_fidelity chaguomsingi high

Kiwango ambacho picha inayotokana inafuata ingizo.

num_images chaguomsingi 1

Idadi ya picha za kuzalisha.

Ya kina background · output_format · enable_safety_checker
background chaguomsingi auto

Mandharinyuma ya picha inayotokana.

output_format chaguomsingi png

Umbizo la faili la picha za tokeo.

POST /run/gpt-image-1/edit-image?wait=20 makadirio → $ 0.27
# 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/gpt-image-1/edit-image?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"

Endesha ombi hili

Key yako inabaki kwenye kivinjari hiki: inatumwa kwa Doitong API pekee na kuhifadhiwa (localStorage) tu ukiweka tiki kwenye Kumbuka. Pata ufunguo wa API

Kuhusu gpt-image-1 · Edit Image

Huzalisha picha mpya kutoka kwa picha moja au zaidi za marejeo katika `image_urls` na kidokezo. `input_fidelity` inaweza kuwa low au high (high kwa chaguomsingi) ili kudhibiti jinsi maingizo yanavyohifadhiwa. Ukubwa ni auto, 1024x1024, 1536x1024 au 1024x1536, ikiwa na mandharinyuma ya auto, transparent au opaque, hadi picha 4, na tokeo la png, jpeg au webp.

Vigezo

Tuma jina rasmi au jina asilia, si yote mawili. Majina rasmi

JinaAina ChaguomsingiInaruhusiwa Maelezo
promptinahitajika
Ainastring
≥ herufi 2
Kidokezo kilichotumika kuzalisha picha.
image_urlsinahitajika images
Ainaurl[] · image
URL zinazoelekeza kwenye picha za marejeleo za uzalishaji.
image_sizesi lazima
Ainaenum
Chaguomsingiauto
auto1024x10241536x10241024x1536
Uwiano wa picha ya picha inayotokana.
backgroundsi lazima
Ainaenum
Chaguomsingiauto
autotransparentopaque
Mandharinyuma ya picha inayotokana.
qualitysi lazima
Ainaenum
Chaguomsingiauto
autolowmediumhigh
Ubora wa picha inayotokana.
input_fidelitysi lazima
Ainaenum
Chaguomsingihigh
lowhigh
Kiwango ambacho picha inayotokana inafuata ingizo.
num_imagessi lazima num_outputs
Ainainteger
Chaguomsingi1
1 – 4
Idadi ya picha za kuzalisha.
output_formatsi lazima
Ainaenum
Chaguomsingipng
jpegpngwebp
Umbizo la faili la picha za tokeo.
enable_safety_checkersi lazima
Ainaboolean
Chaguomsingitrue
Ukaguzi unaweza kulegezwa kwa kuweka false, ikiwa mpigaji simu ameidhinishwa.
inahitajika Jina rasmi, pia linakubalika

Vigezo vya faili vinakubali URL ya umma ya https://, data: URI ya hadi 10 MB, au file_url ya upakiaji. Faili

Tokeo

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "gpt-image-1/edit-image",
  "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": 270,
    "usd": "0.27",
    "charged": 270,
    "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"
  }
}
Faili zako, chaguo lakoKila outputs[].url ni nakala kwenye hifadhi yetu: huhifadhiwa milele (hutozwa kwa GB kwa mwezi) au 7 siku bila malipo, kulingana na mpangilio wa akaunti yako au ?storage=.
Muundo uleule kwenye kila modelitype, url, content_type, width, height na duration, kwa picha, video na sauti. output ni kitu cha matokeo cha modeli yenyewe.
Sehemu za tokeo
images
array of object {url, content_type, file_name, file_size, width, height}Picha zilizozalishwa na modeli.

Miundo zaidi: Uhariri wa Picha

Kwa mawakala wa AI: ukurasa huu katika Markdown unapatikana kwenye https://doitong.com/sw/developers/models/gpt-image-1/edit-image.md. Modeli na miongozo yote: https://doitong.com/developers/llms.txt