İçeriğe geç

GPT Image 2 API

Entegre et

Model kimliği 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"

Bu istek: ≈$0,106 106 API kredisi Bu sayfada çalıştır

API anahtarı al
OpenAI Metinden Görsele #gpt-image-2#openai#typography#chatgpt-images-2

İnce tipografiye yönelik, kenarı 3840px'e kadar esnek boyutlu GPT Image 2 metinden görüntü oluşturma

Doitong'ta oluşturuldu

Doitong topluluğunun GPT Image 2 API ile oluşturduğu herkese açık çalışmalar. Bir istemi tek tıklamayla yeniden kullanın.

Gösterilen herkese açık çalışma sayısı: 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,...

İstek oluştur

Kontroller model şemasından oluşturulur. Değerleri değiştirdikçe kod ve fiyat güncellenir.

•gerekli 88 / 32000

Görsel üretmek için kullanılan istem.

image_size varsayılan landscape_4_3

Çıktı boyutları hazır ayar adı, {width, height} nesnesi veya modelin en iyi boyutu seçmesi için 'auto' kabul eder. Tüm somut boyutlar 16'ya bölünebilir olmalı, kenarlar 3840px'i aşmamalı, en-boy oranı en fazla 3:1 ve toplam piksel sayısı 655,360–8,294,400 olmalıdır.

num_images varsayılan 1

Üretilecek görsel sayısı.

Gelişmiş background · quality · output_format · enable_safety_checker
background varsayılan auto

Ortaya çıkan görselin arka planı.

quality varsayılan high

Modelin isteme bağlı olarak en iyi kaliteyi seçmesi için 'auto' seçeneğini de içeren görsel kalite seçimi.

output_format varsayılan png

Çıktı görsellerinin dosya biçimi.

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

Bu isteği çalıştır

Anahtarınız bu tarayıcıda kalır: yalnızca Doitong API'ye gönderilir ve yalnızca Hatırla seçeneğini işaretlerseniz localStorage'a kaydedilir. API anahtarı al

GPT Image 2 API hakkında

En fazla 32000 karakterlik bir istemden görüntüler oluşturur. `image_size`, hazır ayarları, auto değerini veya açık genişlik ve yüksekliği kabul eder; her iki boyut da 16'nın katı olmalı ve maksimum kenar 3840px olmalıdır. Kalite auto, low, medium veya high olabilir; her çağrıda png, jpeg veya webp olarak en fazla 4 görüntü üretir.

Parametreler

Kanonik adı veya yerel adı gönderin; ikisini birden göndermeyin. Kanonik adlar

AdTür Varsayılanİzin verilen Açıklama
promptgerekli
Türstring
≤ 32.000 karakter≥ 2 karakter
Görsel üretmek için kullanılan istem.
image_sizeisteğe bağlı
Türobject
Varsayılanlandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9auto
Çıktı boyutları hazır ayar adı, {width, height} nesnesi veya modelin en iyi boyutu seçmesi için 'auto' kabul eder. Tüm somut boyutlar 16'ya bölünebilir olmalı, kenarlar 3840px'i aşmamalı, en-boy oranı en fazla 3:1 ve toplam piksel sayısı 655,360–8,294,400 olmalıdır.
backgroundisteğe bağlı
Türenum
Varsayılanauto
autotransparentopaque
Ortaya çıkan görselin arka planı.
qualityisteğe bağlı
Türenum
Varsayılanhigh
autolowmediumhigh
Modelin isteme bağlı olarak en iyi kaliteyi seçmesi için 'auto' seçeneğini de içeren görsel kalite seçimi.
num_imagesisteğe bağlı num_outputs
Türinteger
Varsayılan1
1 – 4
Üretilecek görsel sayısı.
output_formatisteğe bağlı
Türenum
Varsayılanpng
jpegpngwebp
Çıktı görsellerinin dosya biçimi.
enable_safety_checkeristeğe bağlı
Türboolean
Varsayılantrue
Çağıran yetkiliyse false ayarlanarak tarama gevşetilebilir.
gerekli Kanonik ad, bu ad da kabul edilir

Çıktı

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"
  }
}
Dosyalarınız, seçiminizHer outputs[].url, depolamamızdaki bir kopyadır: sonsuza kadar (GB-ay başına ücretli) veya ücretsiz olarak 7 gün boyunca, hesap ayarınızla ya da ?storage= ile saklanır.
Her modelde aynı yapıGörüntüler, video ve ses için type, url, content_type, width, height ve duration aynıdır. output, modelin kendi sonuç nesnesidir.
Çıktı alanları
images
array of object {url, content_type, file_name, file_size, width, height}Model tarafından oluşturulan görseller.

Daha fazla model: Metinden Görsele

AI aracıları için: bu sayfanın Markdown biçimi şurada: https://doitong.com/tr/developers/models/openai/gpt-image-2.md. Tüm modeller ve kılavuzlar: https://doitong.com/developers/llms.txt