GPT-Image-2 API は、直接画像を出す Image API と、assistant flow 用の Responses image_generation に分けて考えます。
公式契約、公式料金、provider 契約を分けてから実装します。
このページは OpenAI が GPT Image 2 のモデルページと価格根拠を公開した後に書き直しました。以前の公開待ち前提は現在の契約ではありません。
要点
| 質問 | 答え |
|---|---|
| 直接画像 | Image API で model: "gpt-image-2"。 |
| Assistant | 主モデルに image_generation tool を付ける。 |
| Provider | laozhang.ai は provider 契約として扱う。 |
公式根拠
| 公式根拠 | 現在の契約 | 出典 |
|---|---|---|
| モデル ID | gpt-image-2 | OpenAI |
| Snapshot | gpt-image-2-2026-04-21 | OpenAI |
| 直接 API | 生成と編集の例は model: "gpt-image-2" を使います。 | ガイド |
| Responses | 主モデルに image_generation tool を付けます。gpt-image-2 は Responses の model ではありません。 | Responses |
| 料金 | image input $8、cached $2、output $30;text input $5、cached $1.25、output $10 / 1M tokens。 | 料金 |
| 見積もり | 1024x1024:$0.006、$0.053、$0.211;縦横例は $0.005、$0.041、$0.165。 | コスト |
surface の選択が endpoint、cost、latency、storage、error handling を決めます。

先に Image API か Responses を選ぶ
Image API は生成や edit が直接成果物の時に向きます。Responses は会話、agent、tools、複数 step が関係する時に使います。
| ルート | 使う場面 | 停止ルール |
|---|---|---|
| Image API | 直接 output | 不要な orchestration を足さない。 |
| Responses | assistant flow | gpt-image-2 を main model にしない。 |
| Provider | gateway / payment | base URL、model、price、rights を記録。 |

本番前の parameter
size、quality、format、compression、timeout を決めます。gpt-image-2 は transparent background 非対応で、文字や複雑な構図は人間の確認が必要です。
本番前の実装契約
最小 snippet だけでは不十分です。公開できる integration は、generation、edit、Responses、preview、cost log を分けてから traffic を流します。
| パターン | 記録するもの | 失敗ルール |
|---|---|---|
| Direct generation | model, size, quality, output_format, prompt version, request ID | size や format が無効なら UI 側で止める。 |
| Reference edit | 画像数、権利、hash、image input tokens | subject や protected text が変わったら採用しない。 |
| Responses | main model、image_generation、response trace、artifact | 画像が assistant flow の一部の時だけ使う。 |
| Streaming / partial images | stream, partial_images, preview 数、追加 cost | preview を cost log に入れないなら固定費を約束しない。 |
| Provider gateway | base URL、model mapping、price、failed-call billing | owner や request ID がなければ本番 route にしない。 |

AI引用向け短答
直接生成や edit は Image API で gpt-image-2 を使います。Responses では主モデルに image_generation を付け、provider price は公式価格と分けます。
次に読む
FAQ
Responses の model に入れる?
いいえ。主モデル + image_generation tool です。
透明背景は?
現在の gpt-image-2 では非対応です。
provider はいつ?
payment、gateway、compatibility、fallback が必要な時だけです。
